@automattic/newspack-blocks 2.6.2 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/babel/135eb7c6e583be53418b26a29fcc4d81.json.gz +0 -0
- package/.cache/babel/2bec24377bb9890c2268bcd4c8f3953c.json.gz +0 -0
- package/.cache/babel/9ba57ee86df44178ceb255eaf0e770e3.json.gz +0 -0
- package/.cache/babel/a804bf1963e56137e59e37a567cb5e2e.json.gz +0 -0
- package/.cache/babel/b94e6dc0852876a37bd23ec88c5b2583.json.gz +0 -0
- package/.cache/babel/c04d2af94bb0f10f408a15534301cc86.json.gz +0 -0
- package/.cache/babel/c8d4b9ae4be3002e8507d71f1136ebc6.json.gz +0 -0
- package/.cache/babel/d21f5515648ce2a2349b0ee5cc787fce.json.gz +0 -0
- package/.cache/babel/d3eee0c40fc44bc734dee21a645a4f7d.json.gz +0 -0
- package/.cache/babel/d661309b03e38954105e706a32ef09f6.json.gz +0 -0
- package/.cache/babel/e2dd36051554e75a2bf087b85c11e43d.json.gz +0 -0
- package/.hooks/pre-push +2 -2
- package/CHANGELOG.md +21 -0
- package/composer.lock +38 -36
- package/dist/donate/view.asset.php +1 -1
- package/dist/donate/view.css +1 -1
- package/dist/donate/view.rtl.css +1 -1
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.js +11 -11
- package/dist/editor.rtl.css +1 -1
- package/dist/frequencyBased.asset.php +1 -1
- package/dist/frequencyBased.css +1 -1
- package/dist/frequencyBased.rtl.css +1 -1
- package/dist/modalCheckout.asset.php +1 -1
- package/dist/modalCheckout.css +1 -1
- package/dist/modalCheckout.rtl.css +1 -1
- package/dist/tiersBased.asset.php +1 -1
- package/dist/tiersBased.css +1 -1
- package/dist/tiersBased.js +1 -1
- package/dist/tiersBased.rtl.css +1 -1
- package/includes/class-modal-checkout.php +11 -14
- package/includes/class-newspack-blocks.php +87 -43
- package/languages/newspack-blocks-de_DE.po +0 -40
- package/languages/newspack-blocks-es_ES.po +0 -40
- package/languages/newspack-blocks-fr_BE.po +0 -40
- package/languages/newspack-blocks-pt_PT.po +0 -40
- package/languages/newspack-blocks.pot +0 -38
- package/newspack-blocks.php +2 -14
- package/package.json +7 -8
- package/src/blocks/checkout-button/edit.js +5 -1
- package/src/blocks/donate/block.json +0 -12
- package/src/blocks/donate/edit/FrequencyBasedLayout.tsx +61 -106
- package/src/blocks/donate/edit/TierBasedLayout.tsx +7 -26
- package/src/blocks/donate/edit/components/index.tsx +0 -1
- package/src/blocks/donate/edit/index.tsx +157 -152
- package/src/blocks/donate/frequency-based/style.scss +5 -0
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-base.php +33 -147
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-frequency-based.php +21 -10
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-tiers-based.php +3 -50
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer.php +1 -14
- package/src/blocks/donate/styles/editor.scss +6 -28
- package/src/blocks/donate/styles/style-variations.scss +17 -8
- package/src/blocks/donate/styles/view.scss +9 -0
- package/src/blocks/donate/tiers-based/style.scss +0 -11
- package/src/blocks/donate/tiers-based/utils.test.js +38 -0
- package/src/blocks/donate/tiers-based/utils.ts +1 -2
- package/src/blocks/donate/tiers-based/view.ts +0 -33
- package/src/blocks/donate/types.ts +0 -16
- package/src/blocks/donate/utils.ts +31 -0
- package/src/blocks/homepage-articles/block.json +18 -0
- package/src/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php +1 -1
- package/src/blocks/homepage-articles/edit.js +3 -0
- package/src/blocks/homepage-articles/utils.ts +4 -0
- package/src/blocks/homepage-articles/view.php +4 -4
- package/src/components/query-controls.js +41 -8
- package/src/modal-checkout/checkout.scss +4 -5
- package/src/types/index.d.ts +4 -3
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
- package/webpack.config.js +0 -1
- package/.cache/babel/18dda1142078f066419138e7284f03bf.json.gz +0 -0
- package/.cache/babel/1f43960564787ebde7c6d44957cddf0e.json.gz +0 -0
- package/.cache/babel/225618337c609eed2be110274ff82be1.json.gz +0 -0
- package/.cache/babel/29d960d2fc51492a4bea1f4f165810fb.json.gz +0 -0
- package/.cache/babel/2f22325668b5763f8f2c9557833af36f.json.gz +0 -0
- package/.cache/babel/39bcc541624feefe54d1493493ae1ce8.json.gz +0 -0
- package/.cache/babel/4d450b37d365154f05b17cbf6a009255.json.gz +0 -0
- package/.cache/babel/87e2dc4a961b25b0de8d1a8ac88eea13.json.gz +0 -0
- package/.cache/babel/91884d41523f3790da70ea305ee187f2.json.gz +0 -0
- package/.cache/babel/b1ac90699e641ff99e1449b5d7b686e5.json.gz +0 -0
- package/.cache/babel/c5a441fdf7d90d45d2cbeb89967c61fe.json.gz +0 -0
- package/.cache/babel/c7cfb8590e887722a3e715c72ee99bac.json.gz +0 -0
- package/.cache/babel/e1d8932bb19afa36f476f107dbc6ca39.json.gz +0 -0
- package/.cache/babel/f60f8c23ec2b4448cb2815d79207d8c0.json.gz +0 -0
- package/dist/donateStreamlined.asset.php +0 -1
- package/dist/donateStreamlined.css +0 -1
- package/dist/donateStreamlined.js +0 -1
- package/dist/donateStreamlined.rtl.css +0 -1
- package/src/blocks/donate/class-wp-rest-newspack-donate-controller.php +0 -206
- package/src/blocks/donate/edit/components/AdditionalFields.tsx +0 -282
- package/src/blocks/donate/streamlined/index.test.js +0 -132
- package/src/blocks/donate/streamlined/index.ts +0 -356
- package/src/blocks/donate/streamlined/style.scss +0 -306
- package/src/blocks/donate/streamlined/utils.test.js +0 -18
- package/src/blocks/donate/streamlined/utils.ts +0 -217
- package/src/blocks/donate/tiers-based/view.test.js +0 -209
package/dist/editor.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
(()=>{var e={1984:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9307);const a=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},
|
|
1
|
+
(()=>{var e={1984:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9307);const a=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},4688:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9307),a=n(444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}))},9862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9307),a=n(444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"}))},8341:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9307),a=n(444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"}))},5573:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9307),a=n(444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"}))},614:(e,t)=>{
|
|
2
2
|
/*!
|
|
3
3
|
* calendar.js: inspired by the calendar module from Python
|
|
4
4
|
* Copyright(c) 2011 Luciano Ramalho <luciano@ramalho.org>
|
|
5
5
|
* MIT Licensed
|
|
6
6
|
*/
|
|
7
|
-
t.version="0.1.0";var n=function(e){this.message=e,this.toString=function(){return this.constructor.name+": "+this.message}},r=function(e){this.firstWeekDay=e||0};r.prototype={constructor:r,weekStartDate:function(e){for(var t=new Date(e.getTime());t.getDay()!==this.firstWeekDay;)t.setDate(t.getDate()-1);return t},monthDates:function(e,t,r,a){if("number"!=typeof e||e<1970)throw new n("year must be a number >= 1970");if("number"!=typeof t||t<0||t>11)throw new n("month must be a number (Jan is 0)");var i=[],o=[],s=0,l=this.weekStartDate(new Date(e,t,1));do{for(s=0;s<7;s++)o.push(r?r(l):l),(l=new Date(l.getTime())).setDate(l.getDate()+1);i.push(a?a(o):o),o=[]}while(l.getMonth()<=t&&l.getFullYear()===e);return i},monthDays:function(e,t){return this.monthDates(e,t,(function(e){return e.getMonth()===t?e.getDate():0}))},monthText:function(e,t){if(void 0===e){var n=new Date;e=n.getFullYear(),t=n.getMonth()}return this.monthDates(e,t,(function(e){for(var n=e.getMonth()===t?e.getDate().toString():" ";n.length<2;)n=" "+n;return n}),(function(e){return e.join(" ")})).join("\n")}};for(var a="JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC".split(" "),i=0;i<a.length;i++)r[a[i]]=i;t.Calendar=r},1924:(e,t,n)=>{"use strict";var r=n(210),a=n(5559),i=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?a(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),a=n(210),i=a("%Function.prototype.apply%"),o=a("%Function.prototype.call%"),s=a("%Reflect.apply%",!0)||r.call(o,i),l=a("%Object.getOwnPropertyDescriptor%",!0),c=a("%Object.defineProperty%",!0),u=a("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=s(r,o,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var p=function(){return s(r,i,arguments)};c?c(e.exports,"apply",{value:p}):e.exports.apply=p},4184:(e,t)=>{var n;
|
|
8
|
-
/*!
|
|
9
|
-
Copyright (c) 2018 Jed Watson.
|
|
10
|
-
Licensed under the MIT License (MIT), see
|
|
11
|
-
http://jedwatson.github.io/classnames
|
|
12
|
-
*/!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var o=a.apply(null,n);o&&e.push(o)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},6511:(e,t,n)=>{"use strict";var r=n(7418),a={};function i(e,t,n,r,a,i,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,o,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var o="mixins";e.exports=function(e,t,n){var s=[],l={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},c={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},u={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)d(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=h(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(i(!(n in u),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return i("DEFINE_MANY_MERGED"===(c.hasOwnProperty(n)?c[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=h(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function p(e,t){var n=l.hasOwnProperty(t)?l[t]:null;b.hasOwnProperty(t)&&i("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&i("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function d(e,n){if(n){i("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),i(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,a=r.__reactAutoBindPairs;for(var s in n.hasOwnProperty(o)&&u.mixins(e,n.mixins),n)if(n.hasOwnProperty(s)&&s!==o){var c=n[s],d=r.hasOwnProperty(s);if(p(d,s),u.hasOwnProperty(s))u[s](e,c);else{var f=l.hasOwnProperty(s);if("function"==typeof c&&!f&&!d&&!1!==n.autobind)a.push(s,c),r[s]=c;else if(d){var v=l[s];i(f&&("DEFINE_MANY_MERGED"===v||"DEFINE_MANY"===v),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",v,s),"DEFINE_MANY_MERGED"===v?r[s]=h(r[s],c):"DEFINE_MANY"===v&&(r[s]=m(r[s],c))}else r[s]=c}}}else;}function f(e,t){for(var n in i(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(i(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function h(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var a={};return f(a,n),f(a,r),a}}function m(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function v(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},b={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},w=function(){};return r(w.prototype,e.prototype,b),function(e){var t=function(e,r,o){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],a=t[n+1];e[r]=v(e,a)}}(this),this.props=e,this.context=r,this.refs=a,this.updater=o||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;i("object"==typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new w,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],s.forEach(d.bind(null,t)),d(t,g),d(t,e),d(t,y),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),i(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),l)t.prototype[r]||(t.prototype[r]=null);return t}}},2555:(e,t,n)=>{"use strict";var r=n(9196),a=n(6511);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=a(r.Component,r.isValidElement,i)},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,a="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==a)throw new TypeError(t+i);for(var o,s=n.call(arguments,1),l=function(){if(this instanceof o){var t=i.apply(this,s.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,s.concat(n.call(arguments)))},c=Math.max(0,i.length-s.length),u=[],p=0;p<c;p++)u.push("$"+p);if(o=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),i.prototype){var d=function(){};d.prototype=i.prototype,o.prototype=new d,d.prototype=null}return o}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,a=SyntaxError,i=Function,o=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(O){l=null}var c=function(){throw new o},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(t){return c}}}():c,p=n(1405)(),d=n(8185)(),f=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),h={},m="undefined"!=typeof Uint8Array&&f?f(Uint8Array):r,v={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&f?f(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(O){var g=f(f(O));v["%Error.prototype%"]=g}var y=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&f&&(n=f(a.prototype))}return v[t]=n,n},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=n(8612),k=n(7642),_=w.call(Function.call,Array.prototype.concat),E=w.call(Function.apply,Array.prototype.splice),S=w.call(Function.call,String.prototype.replace),x=w.call(Function.call,String.prototype.slice),C=w.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,P=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,M,(function(e,t,n,a){r[r.length]=n?S(a,T,"$1"):t||e})),r},A=function(e,t){var n,r=e;if(k(b,r)&&(r="%"+(n=b[r])[0]+"%"),k(v,r)){var i=v[r];if(i===h&&(i=y(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new a("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P(e),r=n.length>0?n[0]:"",i=A("%"+r+"%",t),s=i.name,c=i.value,u=!1,p=i.alias;p&&(r=p[0],E(n,_([0,1],p)));for(var d=1,f=!0;d<n.length;d+=1){var h=n[d],m=x(h,0,1),g=x(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new a("property names with quotes must have matching quotes");if("constructor"!==h&&f||(u=!0),k(v,s="%"+(r+="."+h)+"%"))c=v[s];else if(null!=c){if(!(h in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&d+1>=n.length){var y=l(c,h);c=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[h]}else f=k(c,h),c=c[h];f&&!u&&(v[s]=c)}}return c}},8185:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=n(5419);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&a())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},8679:(e,t,n)=>{"use strict";var r=n(1296),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=f(n);a&&a!==h&&e(t,a,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=l(t),m=l(n),v=0;v<o.length;++v){var g=o[v];if(!(i[g]||r&&r[g]||m&&m[g]||s&&s[g])){var y=d(n,g);try{c(t,g,y)}catch(b){}}}}return t}},6103:(e,t)=>{"use strict";
|
|
7
|
+
t.version="0.1.0";var n=function(e){this.message=e,this.toString=function(){return this.constructor.name+": "+this.message}},r=function(e){this.firstWeekDay=e||0};r.prototype={constructor:r,weekStartDate:function(e){for(var t=new Date(e.getTime());t.getDay()!==this.firstWeekDay;)t.setDate(t.getDate()-1);return t},monthDates:function(e,t,r,a){if("number"!=typeof e||e<1970)throw new n("year must be a number >= 1970");if("number"!=typeof t||t<0||t>11)throw new n("month must be a number (Jan is 0)");var o=[],i=[],s=0,l=this.weekStartDate(new Date(e,t,1));do{for(s=0;s<7;s++)i.push(r?r(l):l),(l=new Date(l.getTime())).setDate(l.getDate()+1);o.push(a?a(i):i),i=[]}while(l.getMonth()<=t&&l.getFullYear()===e);return o},monthDays:function(e,t){return this.monthDates(e,t,(function(e){return e.getMonth()===t?e.getDate():0}))},monthText:function(e,t){if(void 0===e){var n=new Date;e=n.getFullYear(),t=n.getMonth()}return this.monthDates(e,t,(function(e){for(var n=e.getMonth()===t?e.getDate().toString():" ";n.length<2;)n=" "+n;return n}),(function(e){return e.join(" ")})).join("\n")}};for(var a="JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC".split(" "),o=0;o<a.length;o++)r[a[o]]=o;t.Calendar=r},1924:(e,t,n)=>{"use strict";var r=n(210),a=n(5559),o=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?a(n):n}},5559:(e,t,n)=>{"use strict";var r=n(2514),a=n(210),o=n(2490),i=a("%TypeError%"),s=a("%Function.prototype.apply%"),l=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(l,s),u=a("%Object.defineProperty%",!0),p=a("%Math.max%");if(u)try{u({},"a",{value:1})}catch(f){u=null}e.exports=function(e){if("function"!=typeof e)throw new i("a function is required");var t=c(r,l,arguments);return o(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,s,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6511:(e,t,n)=>{"use strict";var r=n(7418),a={};function o(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var i="mixins";e.exports=function(e,t,n){var s=[],l={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},c={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},u={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)d(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=h(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(o(!(n in u),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return o("DEFINE_MANY_MERGED"===(c.hasOwnProperty(n)?c[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=h(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function p(e,t){var n=l.hasOwnProperty(t)?l[t]:null;b.hasOwnProperty(t)&&o("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&o("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function d(e,n){if(n){o("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),o(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,a=r.__reactAutoBindPairs;for(var s in n.hasOwnProperty(i)&&u.mixins(e,n.mixins),n)if(n.hasOwnProperty(s)&&s!==i){var c=n[s],d=r.hasOwnProperty(s);if(p(d,s),u.hasOwnProperty(s))u[s](e,c);else{var f=l.hasOwnProperty(s);if("function"==typeof c&&!f&&!d&&!1!==n.autobind)a.push(s,c),r[s]=c;else if(d){var v=l[s];o(f&&("DEFINE_MANY_MERGED"===v||"DEFINE_MANY"===v),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",v,s),"DEFINE_MANY_MERGED"===v?r[s]=h(r[s],c):"DEFINE_MANY"===v&&(r[s]=m(r[s],c))}else r[s]=c}}}else;}function f(e,t){for(var n in o(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(o(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function h(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var a={};return f(a,n),f(a,r),a}}function m(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function v(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},b={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},w=function(){};return r(w.prototype,e.prototype,b),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],a=t[n+1];e[r]=v(e,a)}}(this),this.props=e,this.context=r,this.refs=a,this.updater=i||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;o("object"==typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new w,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],s.forEach(d.bind(null,t)),d(t,g),d(t,e),d(t,y),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),o(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),l)t.prototype[r]||(t.prototype[r]=null);return t}}},2555:(e,t,n)=>{"use strict";var r=n(9196),a=n(6511);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=a(r.Component,r.isValidElement,o)},2296:(e,t,n)=>{"use strict";var r=n(1044)(),a=n(210),o=r&&a("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(c){o=!1}var i=a("%SyntaxError%"),s=a("%TypeError%"),l=n(7296);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===r&&p?p.enumerable:!r,value:n,writable:null===a&&p?p.writable:!a});else{if(!u&&(r||a||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,a="[object Function]",o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},i=function(e,t){for(var n=[],r=t||0,a=0;r<e.length;r+=1,a+=1)n[a]=e[r];return n},s=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var l=this;if("function"!=typeof l||n.apply(l)!==a)throw new TypeError(t+l);for(var c,u=i(arguments,1),p=function(){if(this instanceof c){var t=l.apply(this,o(u,arguments));return Object(t)===t?t:this}return l.apply(e,o(u,arguments))},d=r(0,l.length-u.length),f=[],h=0;h<d;h++)f[h]="$"+h;if(c=Function("binder","return function ("+s(f,",")+"){ return binder.apply(this,arguments); }")(p),l.prototype){var m=function(){};m.prototype=l.prototype,c.prototype=new m,m.prototype=null}return c}},2514:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,a=SyntaxError,o=Function,i=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(O){l=null}var c=function(){throw new i},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(t){return c}}}():c,p=n(1405)(),d=n(8185)(),f=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),h={},m="undefined"!=typeof Uint8Array&&f?f(Uint8Array):r,v={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&f?f(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(O){var g=f(f(O));v["%Error.prototype%"]=g}var y=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&f&&(n=f(a.prototype))}return v[t]=n,n},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=n(2514),k=n(8824),_=w.call(Function.call,Array.prototype.concat),E=w.call(Function.apply,Array.prototype.splice),S=w.call(Function.call,String.prototype.replace),x=w.call(Function.call,String.prototype.slice),C=w.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,P=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,T,(function(e,t,n,a){r[r.length]=n?S(a,M,"$1"):t||e})),r},A=function(e,t){var n,r=e;if(k(b,r)&&(r="%"+(n=b[r])[0]+"%"),k(v,r)){var o=v[r];if(o===h&&(o=y(r)),void 0===o&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new a("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),s=o.name,c=o.value,u=!1,p=o.alias;p&&(r=p[0],E(n,_([0,1],p)));for(var d=1,f=!0;d<n.length;d+=1){var h=n[d],m=x(h,0,1),g=x(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new a("property names with quotes must have matching quotes");if("constructor"!==h&&f||(u=!0),k(v,s="%"+(r+="."+h)+"%"))c=v[s];else if(null!=c){if(!(h in c)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&d+1>=n.length){var y=l(c,h);c=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[h]}else f=k(c,h),c=c[h];f&&!u&&(v[s]=c)}}return c}},7296:(e,t,n)=>{"use strict";var r=n(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(a){r=null}e.exports=r},1044:(e,t,n)=>{"use strict";var r=n(210)("%Object.defineProperty%",!0),a=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};a.hasArrayLengthDefineBug=function(){if(!a())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},8185:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=n(5419);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&a())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},8824:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,o=n(2514);e.exports=o.call(r,a)},8679:(e,t,n)=>{"use strict";var r=n(1296),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=f(n);a&&a!==h&&e(t,a,r)}var i=u(n);p&&(i=i.concat(p(n)));for(var s=l(t),m=l(n),v=0;v<i.length;++v){var g=i[v];if(!(o[g]||r&&r[g]||m&&m[g]||s&&s[g])){var y=d(n,g);try{c(t,g,y)}catch(b){}}}}return t}},6103:(e,t)=>{"use strict";
|
|
13
8
|
/** @license React v16.13.1
|
|
14
9
|
* react-is.production.min.js
|
|
15
10
|
*
|
|
@@ -17,12 +12,12 @@ t.version="0.1.0";var n=function(e){this.message=e,this.toString=function(){retu
|
|
|
17
12
|
*
|
|
18
13
|
* This source code is licensed under the MIT license found in the
|
|
19
14
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case i:case s:case o:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case v:case m:case l:return e;default:return t}}case a:return t}}}function _(e){return k(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||k(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===i},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===o},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===o||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=k},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},3393:function(e){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return o(e)?e:G(e)}function r(e){return s(e)?e:W(e)}function a(e){return l(e)?e:Y(e)}function i(e){return o(e)&&!c(e)?e:X(e)}function o(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return!(!e||!e[f])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[h])}t(r,n),t(a,n),t(i,n),n.isIterable=o,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=a,n.Set=i;var p="@@__IMMUTABLE_ITERABLE__@@",d="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},w={value:!1},k={value:!1};function _(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function S(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),a=0;a<n;a++)r[a]=e[a+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(T)),e.size}function M(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function T(){return!0}function P(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function A(e,t){return I(e,t,0)}function O(e,t){return I(e,t,t)}function I(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,D=1,z=2,L="function"==typeof Symbol&&Symbol.iterator,R="@@iterator",j=L||R;function B(e){this.next=e}function F(e,t,n,r){var a=0===e?t:1===e?n:[t,n];return r?r.value=a:r={value:a,done:!1},r}function $(){return{value:void 0,done:!0}}function H(e){return!!V(e)}function q(e){return e&&"function"==typeof e.next}function Z(e){var t=V(e);return t&&t.call(e)}function V(e){var t=e&&(L&&e[L]||e[R]);if("function"==typeof t)return t}function U(e){return e&&"number"==typeof e.length}function G(e){return null==e?oe():o(e)?e.toSeq():ce(e)}function W(e){return null==e?oe().toKeyedSeq():o(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?oe():o(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function X(e){return(null==e?oe():o(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=N,B.VALUES=D,B.ENTRIES=z,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[j]=function(){return this},t(G,n),G.of=function(){return G(arguments)},G.prototype.toSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq {","}")},G.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},G.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},G.prototype.__iterator=function(e,t){return de(this,e,t,!0)},t(W,G),W.prototype.toKeyedSeq=function(){return this},t(Y,G),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return de(this,e,t,!1)},t(X,G),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},G.isSeq=ie,G.Keyed=W,G.Set=X,G.Indexed=Y;var K,Q,J,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ae(e){this._iterator=e,this._iteratorCache=[]}function ie(e){return!(!e||!e[ee])}function oe(){return K||(K=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():q(e)?new ae(e).fromEntrySeq():H(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return U(e)?new te(e):q(e)?new ae(e):H(e)?new re(e):void 0}function pe(e,t,n,r){var a=e._cache;if(a){for(var i=a.length-1,o=0;o<=i;o++){var s=a[n?i-o:o];if(!1===t(s[1],r?s[0]:o,e))return o+1}return o}return e.__iterateUncached(t,n)}function de(e,t,n,r){var a=e._cache;if(a){var i=a.length-1,o=0;return new B((function(){var e=a[n?i-o:o];return o++>i?$():F(t,r?e[0]:o-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?he(t,e,"",{"":e}):me(e)}function he(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return he(e,n,r,t)}))):ve(t)?e.call(r,n,W(t).map((function(n,r){return he(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?W(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var a=r.next().value;return a&&ge(a[1],e)&&(n||ge(a[0],t))}))&&r.next().done}var a=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{a=!0;var i=e;e=t,t=i}var p=!0,d=t.__iterate((function(t,r){if(n?!e.has(t):a?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===d}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Q)return Q;Q=this}}function we(e,t){if(!e)throw new Error(t)}function ke(e,t,n){if(!(this instanceof ke))return new ke(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(J)return J;J=this}}function _e(){throw TypeError("Abstract")}function Ee(){}function Se(){}function xe(){}G.prototype[ee]=!0,t(te,Y),te.prototype.get=function(e,t){return this.has(e)?this._array[M(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,a=0;a<=r;a++)if(!1===e(n[t?r-a:a],a,this))return a+1;return a},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,a=0;return new B((function(){return a>r?$():F(e,a,n[t?r-a++:a++])}))},t(ne,W),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,a=r.length-1,i=0;i<=a;i++){var o=r[t?a-i:i];if(!1===e(n[o],o,this))return i+1}return i},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,a=r.length-1,i=0;return new B((function(){var o=r[t?a-i:i];return i++>a?$():F(e,o,n[o])}))},ne.prototype[h]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=Z(this._iterable),r=0;if(q(n))for(var a;!(a=n.next()).done&&!1!==e(a.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=Z(this._iterable);if(!q(n))return new B($);var r=0;return new B((function(){var t=n.next();return t.done?t:F(e,r++,t.value)}))},t(ae,Y),ae.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,a=this._iteratorCache,i=0;i<a.length;)if(!1===e(a[i],i++,this))return i;for(;!(n=r.next()).done;){var o=n.value;if(a[i]=o,!1===e(o,i++,this))break}return i},ae.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,a=0;return new B((function(){if(a>=r.length){var t=n.next();if(t.done)return t;r[a]=t.value}return F(e,a,r[a++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return P(e,t,n)?this:new be(this._value,O(t,n)-A(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},be.prototype.__iterator=function(e,t){var n=this,r=0;return new B((function(){return r<n.size?F(e,r++,n._value):$()}))},be.prototype.equals=function(e){return e instanceof be?ge(this._value,e._value):ye(e)},t(ke,Y),ke.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ke.prototype.get=function(e,t){return this.has(e)?this._start+M(this,e)*this._step:t},ke.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ke.prototype.slice=function(e,t){return P(e,t,this.size)?this:(e=A(e,this.size),(t=O(t,this.size))<=e?new ke(0,0):new ke(this.get(e,this._end),this.get(t,this._end),this._step))},ke.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ke.prototype.lastIndexOf=function(e){return this.indexOf(e)},ke.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,a=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(a,i,this))return i+1;a+=t?-r:r}return i},ke.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,a=t?this._start+n*r:this._start,i=0;return new B((function(){var o=a;return a+=t?-r:r,i>n?$():F(e,i++,o)}))},ke.prototype.equals=function(e){return e instanceof ke?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(_e,n),t(Ee,_e),t(Se,_e),t(xe,_e),_e.Keyed=Ee,_e.Indexed=Se,_e.Set=xe;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Me(e){return e>>>1&1073741824|3221225471&e}function Te(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Me(n)}if("string"===t)return e.length>Be?Pe(e):Ae(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Oe(e);if("function"==typeof e.toString)return Ae(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Pe(e){var t=He[e];return void 0===t&&(t=Ae(e),$e===Fe&&($e=0,He={}),$e++,He[e]=t),t}function Ae(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Me(t)}function Oe(e){var t;if(Le&&void 0!==(t=ze.get(e)))return t;if(void 0!==(t=e[je]))return t;if(!Ne){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[je]))return t;if(void 0!==(t=De(e)))return t}if(t=++Re,1073741824&Re&&(Re=0),Le)ze.set(e,t);else{if(void 0!==Ie&&!1===Ie(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Ne)Object.defineProperty(e,je,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[je]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[je]=t}}return t}var Ie=Object.isExtensible,Ne=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function De(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var ze,Le="function"==typeof WeakMap;Le&&(ze=new WeakMap);var Re=0,je="__immutablehash__";"function"==typeof Symbol&&(je=Symbol(je));var Be=16,Fe=255,$e=0,He={};function qe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ze(e){return null==e?at():Ve(e)&&!u(e)?e:at().withMutations((function(t){var n=r(e);qe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ve(e){return!(!e||!e[Ge])}t(Ze,Ee),Ze.of=function(){var t=e.call(arguments,0);return at().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Ze.prototype.toString=function(){return this.__toString("Map {","}")},Ze.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ze.prototype.set=function(e,t){return it(this,e,t)},Ze.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},Ze.prototype.remove=function(e){return it(this,e,b)},Ze.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},Ze.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ze.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,En(e),t,n);return r===b?void 0:r},Ze.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):at()},Ze.prototype.merge=function(){return dt(this,void 0,arguments)},Ze.prototype.mergeWith=function(t){return dt(this,t,e.call(arguments,1))},Ze.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,at(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ze.prototype.mergeDeep=function(){return dt(this,ft,arguments)},Ze.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return dt(this,ht(t),n)},Ze.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,at(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ze.prototype.sort=function(e){return Ht(pn(this,e))},Ze.prototype.sortBy=function(e,t){return Ht(pn(this,t,e))},Ze.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ze.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},Ze.prototype.asImmutable=function(){return this.__ensureOwner()},Ze.prototype.wasAltered=function(){return this.__altered},Ze.prototype.__iterator=function(e,t){return new et(this,e,t)},Ze.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ze.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ze.isMap=Ve;var Ue,Ge="@@__IMMUTABLE_MAP__@@",We=Ze.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Xe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ke(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return F(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var a=Object.create(We);return a.size=e,a._root=t,a.__ownerID=n,a.__hash=r,a.__altered=!1,a}function at(){return Ue||(Ue=rt(0))}function it(e,t,n){var r,a;if(e._root){var i=_(w),o=_(k);if(r=ot(e._root,e.__ownerID,0,void 0,t,n,i,o),!o.value)return e;a=e.size+(i.value?n===b?-1:1:0)}else{if(n===b)return e;a=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=a,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(a,r):at()}function ot(e,t,n,r,a,i,o,s){return e?e.update(t,n,r,a,i,o,s):i===b?e:(E(s),E(o),new Je(t,r,[a,i]))}function st(e){return e.constructor===Je||e.constructor===Qe}function lt(e,t,n,r,a){if(e.keyHash===r)return new Qe(t,r,[e.entry,a]);var i,o=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Xe(t,1<<o|1<<s,o===s?[lt(e,t,n+v,r,a)]:(i=new Je(t,r,a),o<s?[e,i]:[i,e]))}function ct(e,t,n,r){e||(e=new S);for(var a=new Je(e,Te(n),[n,r]),i=0;i<t.length;i++){var o=t[i];a=a.update(e,0,void 0,o[0],o[1])}return a}function ut(e,t,n,r){for(var a=0,i=0,o=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(a|=l,o[i++]=u)}return new Xe(e,a,o)}function pt(e,t,n,r,a){for(var i=0,o=new Array(g),s=0;0!==n;s++,n>>>=1)o[s]=1&n?t[i++]:void 0;return o[r]=a,new Ke(e,i+1,o)}function dt(e,t,n){for(var a=[],i=0;i<n.length;i++){var s=n[i],l=r(s);o(s)||(l=l.map((function(e){return fe(e)}))),a.push(l)}return mt(e,t,a)}function ft(e,t,n){return e&&e.mergeDeep&&o(t)?e.mergeDeep(t):ge(e,t)?e:t}function ht(e){return function(t,n,r){if(t&&t.mergeDeepWith&&o(n))return t.mergeDeepWith(e,n);var a=e(t,n,r);return ge(t,a)?t:a}}function mt(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,b,(function(e){return e===b?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},a=0;a<n.length;a++)n[a].forEach(r)})):e.constructor(n[0])}function vt(e,t,n,r){var a=e===b,i=t.next();if(i.done){var o=a?n:e,s=r(o);return s===o?e:s}we(a||e&&e.set,"invalid keyPath");var l=i.value,c=a?b:e.get(l,b),u=vt(c,t,n,r);return u===c?e:u===b?e.remove(l):(a?at():e).set(l,u)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var a=r?e:x(e);return a[t]=n,a}function bt(e,t,n,r){var a=e.length+1;if(r&&t+1===a)return e[t]=n,e;for(var i=new Array(a),o=0,s=0;s<a;s++)s===t?(i[s]=n,o=-1):i[s]=e[s+o];return i}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var a=new Array(r),i=0,o=0;o<r;o++)o===t&&(i=1),a[o]=e[o+i];return a}We[Ge]=!0,We[m]=We.remove,We.removeIn=We.deleteIn,Ye.prototype.get=function(e,t,n,r){for(var a=this.entries,i=0,o=a.length;i<o;i++)if(ge(n,a[i][0]))return a[i][1];return r},Ye.prototype.update=function(e,t,n,r,a,i,o){for(var s=a===b,l=this.entries,c=0,u=l.length;c<u&&!ge(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===a:s)return this;if(E(o),(s||!p)&&E(i),!s||1!==l.length){if(!p&&!s&&l.length>=kt)return ct(e,l,r,a);var d=e&&e===this.ownerID,f=d?l:x(l);return p?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,a]:f.push([r,a]),d?(this.entries=f,this):new Ye(e,f)}},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Te(n));var a=1<<((0===e?t:t>>>e)&y),i=this.bitmap;return 0==(i&a)?r:this.nodes[gt(i&a-1)].get(e+v,t,n,r)},Xe.prototype.update=function(e,t,n,r,a,i,o){void 0===n&&(n=Te(r));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&a===b)return this;var p=gt(c&l-1),d=this.nodes,f=u?d[p]:void 0,h=ot(f,e,t+v,n,r,a,i,o);if(h===f)return this;if(!u&&h&&d.length>=_t)return pt(e,d,c,s,h);if(u&&!h&&2===d.length&&st(d[1^p]))return d[1^p];if(u&&h&&1===d.length&&st(h))return h;var m=e&&e===this.ownerID,g=u?h?c:c^l:c|l,w=u?h?yt(d,p,h,m):wt(d,p,m):bt(d,p,h,m);return m?(this.bitmap=g,this.nodes=w,this):new Xe(e,g,w)},Ke.prototype.get=function(e,t,n,r){void 0===t&&(t=Te(n));var a=(0===e?t:t>>>e)&y,i=this.nodes[a];return i?i.get(e+v,t,n,r):r},Ke.prototype.update=function(e,t,n,r,a,i,o){void 0===n&&(n=Te(r));var s=(0===t?n:n>>>t)&y,l=a===b,c=this.nodes,u=c[s];if(l&&!u)return this;var p=ot(u,e,t+v,n,r,a,i,o);if(p===u)return this;var d=this.count;if(u){if(!p&&--d<Et)return ut(e,c,d,s)}else d++;var f=e&&e===this.ownerID,h=yt(c,s,p,f);return f?(this.count=d,this.nodes=h,this):new Ke(e,d,h)},Qe.prototype.get=function(e,t,n,r){for(var a=this.entries,i=0,o=a.length;i<o;i++)if(ge(n,a[i][0]))return a[i][1];return r},Qe.prototype.update=function(e,t,n,r,a,i,o){void 0===n&&(n=Te(r));var s=a===b;if(n!==this.keyHash)return s?this:(E(o),E(i),lt(this,e,t,n,[r,a]));for(var l=this.entries,c=0,u=l.length;c<u&&!ge(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===a:s)return this;if(E(o),(s||!p)&&E(i),s&&2===u)return new Je(e,this.keyHash,l[1^c]);var d=e&&e===this.ownerID,f=d?l:x(l);return p?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,a]:f.push([r,a]),d?(this.entries=f,this):new Qe(e,this.keyHash,f)},Je.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},Je.prototype.update=function(e,t,n,r,a,i,o){var s=a===b,l=ge(r,this.entry[0]);return(l?a===this.entry[1]:s)?this:(E(o),s?void E(i):l?e&&e===this.ownerID?(this.entry[1]=a,this):new Je(e,this.keyHash,[r,a]):(E(i),lt(this,e,t,Te(r),[r,a])))},Ye.prototype.iterate=Qe.prototype.iterate=function(e,t){for(var n=this.entries,r=0,a=n.length-1;r<=a;r++)if(!1===e(n[t?a-r:r]))return!1},Xe.prototype.iterate=Ke.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,a=n.length-1;r<=a;r++){var i=n[t?a-r:r];if(i&&!1===i.iterate(e,t))return!1}},Je.prototype.iterate=function(e,t){return e(this.entry)},t(et,B),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,a=t.index++;if(r.entry){if(0===a)return tt(e,r.entry)}else if(r.entries){if(a<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-a:a])}else if(a<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-a:a];if(i){if(i.entry)return tt(e,i.entry);t=this._stack=nt(i,t)}continue}t=this._stack=this._stack.__prev}return $()};var kt=g/4,_t=g/2,Et=g/4;function St(e){var t=Dt();if(null==e)return t;if(xt(e))return e;var n=a(e),r=n.size;return 0===r?t:(qe(r),r>0&&r<g?Nt(0,r,v,null,new Tt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function xt(e){return!(!e||!e[Ct])}t(St,Se),St.of=function(){return this(arguments)},St.prototype.toString=function(){return this.__toString("List [","]")},St.prototype.get=function(e,t){if((e=M(this,e))>=0&&e<this.size){var n=jt(this,e+=this._origin);return n&&n.array[e&y]}return t},St.prototype.set=function(e,t){return zt(this,e,t)},St.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},St.prototype.insert=function(e,t){return this.splice(e,0,t)},St.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=v,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Dt()},St.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Bt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},St.prototype.pop=function(){return Bt(this,0,-1)},St.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Bt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},St.prototype.shift=function(){return Bt(this,1)},St.prototype.merge=function(){return Ft(this,void 0,arguments)},St.prototype.mergeWith=function(t){return Ft(this,t,e.call(arguments,1))},St.prototype.mergeDeep=function(){return Ft(this,ft,arguments)},St.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ft(this,ht(t),n)},St.prototype.setSize=function(e){return Bt(this,0,e)},St.prototype.slice=function(e,t){var n=this.size;return P(e,t,n)?this:Bt(this,A(e,n),O(t,n))},St.prototype.__iterator=function(e,t){var n=0,r=It(this,t);return new B((function(){var t=r();return t===Ot?$():F(e,n++,t)}))},St.prototype.__iterate=function(e,t){for(var n,r=0,a=It(this,t);(n=a())!==Ot&&!1!==e(n,r++,this););return r},St.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},St.isList=xt;var Ct="@@__IMMUTABLE_LIST__@@",Mt=St.prototype;function Tt(e,t){this.array=e,this.ownerID=t}Mt[Ct]=!0,Mt[m]=Mt.remove,Mt.setIn=We.setIn,Mt.deleteIn=Mt.removeIn=We.removeIn,Mt.update=We.update,Mt.updateIn=We.updateIn,Mt.mergeIn=We.mergeIn,Mt.mergeDeepIn=We.mergeDeepIn,Mt.withMutations=We.withMutations,Mt.asMutable=We.asMutable,Mt.asImmutable=We.asImmutable,Mt.wasAltered=We.wasAltered,Tt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&y;if(r>=this.array.length)return new Tt([],e);var a,i=0===r;if(t>0){var o=this.array[r];if((a=o&&o.removeBefore(e,t-v,n))===o&&i)return this}if(i&&!a)return this;var s=Rt(this,e);if(!i)for(var l=0;l<r;l++)s.array[l]=void 0;return a&&(s.array[r]=a),s},Tt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,a=n-1>>>t&y;if(a>=this.array.length)return this;if(t>0){var i=this.array[a];if((r=i&&i.removeAfter(e,t-v,n))===i&&a===this.array.length-1)return this}var o=Rt(this,e);return o.array.splice(a+1),r&&(o.array[a]=r),o};var Pt,At,Ot={};function It(e,t){var n=e._origin,r=e._capacity,a=$t(r),i=e._tail;return o(e._root,e._level,0);function o(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,o){var s=o===a?i&&i.array:e&&e.array,l=o>n?0:n-o,c=r-o;return c>g&&(c=g),function(){if(l===c)return Ot;var e=t?--c:l++;return s&&s[e]}}function l(e,a,i){var s,l=e&&e.array,c=i>n?0:n-i>>a,u=1+(r-i>>a);return u>g&&(u=g),function(){for(;;){if(s){var e=s();if(e!==Ot)return e;s=null}if(c===u)return Ot;var n=t?--u:c++;s=o(l&&l[n],a-v,i+(n<<a))}}}}function Nt(e,t,n,r,a,i,o){var s=Object.create(Mt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=a,s.__ownerID=i,s.__hash=o,s.__altered=!1,s}function Dt(){return Pt||(Pt=Nt(0,0,v))}function zt(e,t,n){if((t=M(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Bt(e,t).set(0,n):Bt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,a=e._root,i=_(k);return t>=$t(e._capacity)?r=Lt(r,e.__ownerID,0,t,n,i):a=Lt(a,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=a,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,a,r):e}function Lt(e,t,n,r,a,i){var o,s=r>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===a)return e;if(n>0){var c=e&&e.array[s],u=Lt(c,t,n-v,r,a,i);return u===c?e:((o=Rt(e,t)).array[s]=u,o)}return l&&e.array[s]===a?e:(E(i),o=Rt(e,t),void 0===a&&s===o.array.length-1?o.array.pop():o.array[s]=a,o)}function Rt(e,t){return t&&e&&t===e.ownerID?e:new Tt(e?e.array.slice():[],t)}function jt(e,t){if(t>=$t(e._capacity))return e._tail;if(t<1<<e._level+v){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&y],r-=v;return n}}function Bt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,a=e._origin,i=e._capacity,o=a+t,s=void 0===n?i:n<0?i+n:a+n;if(o===a&&s===i)return e;if(o>=s)return e.clear();for(var l=e._level,c=e._root,u=0;o+u<0;)c=new Tt(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=v);u&&(o+=u,a+=u,s+=u,i+=u);for(var p=$t(i),d=$t(s);d>=1<<l+v;)c=new Tt(c&&c.array.length?[c]:[],r),l+=v;var f=e._tail,h=d<p?jt(e,s-1):d>p?new Tt([],r):f;if(f&&d>p&&o<i&&f.array.length){for(var m=c=Rt(c,r),g=l;g>v;g-=v){var b=p>>>g&y;m=m.array[b]=Rt(m.array[b],r)}m.array[p>>>v&y]=f}if(s<i&&(h=h&&h.removeAfter(r,0,s)),o>=d)o-=d,s-=d,l=v,c=null,h=h&&h.removeBefore(r,0,o);else if(o>a||d<p){for(u=0;c;){var w=o>>>l&y;if(w!==d>>>l&y)break;w&&(u+=(1<<l)*w),l-=v,c=c.array[w]}c&&o>a&&(c=c.removeBefore(r,l,o-u)),c&&d<p&&(c=c.removeAfter(r,l,d-u)),u&&(o-=u,s-=u)}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=l,e._root=c,e._tail=h,e.__hash=void 0,e.__altered=!0,e):Nt(o,s,l,c,h)}function Ft(e,t,n){for(var r=[],i=0,s=0;s<n.length;s++){var l=n[s],c=a(l);c.size>i&&(i=c.size),o(l)||(c=c.map((function(e){return fe(e)}))),r.push(c)}return i>e.size&&(e=e.setSize(i)),mt(e,t,r)}function $t(e){return e<g?0:e-1>>>v<<v}function Ht(e){return null==e?Vt():qt(e)?e:Vt().withMutations((function(t){var n=r(e);qe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function qt(e){return Ve(e)&&u(e)}function Zt(e,t,n,r){var a=Object.create(Ht.prototype);return a.size=e?e.size:0,a._map=e,a._list=t,a.__ownerID=n,a.__hash=r,a}function Vt(){return At||(At=Zt(at(),Dt()))}function Ut(e,t,n){var r,a,i=e._map,o=e._list,s=i.get(t),l=void 0!==s;if(n===b){if(!l)return e;o.size>=g&&o.size>=2*i.size?(r=(a=o.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=a.__ownerID=e.__ownerID)):(r=i.remove(t),a=s===o.size-1?o.pop():o.set(s,void 0))}else if(l){if(n===o.get(s)[1])return e;r=i,a=o.set(s,[t,n])}else r=i.set(t,o.size),a=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=a,e.__hash=void 0,e):Zt(r,a)}function Gt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Wt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){this._iter=e,this.size=e.size}function Kt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===z){var r=e.__iterator(t,n);return new B((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===D?N:D,n)},t}function Qt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,a){var i=e.get(r,b);return i===b?a:t.call(n,i,r,e)},r.__iterateUncached=function(r,a){var i=this;return e.__iterate((function(e,a,o){return!1!==r(t.call(n,e,a,o),a,i)}),a)},r.__iteratorUncached=function(r,a){var i=e.__iterator(z,a);return new B((function(){var a=i.next();if(a.done)return a;var o=a.value,s=o[0];return F(r,s,t.call(n,o[1],s,e),a)}))},r}function Jt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Kt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var a=bn(e);return r&&(a.has=function(r){var a=e.get(r,b);return a!==b&&!!t.call(n,a,r,e)},a.get=function(r,a){var i=e.get(r,b);return i!==b&&t.call(n,i,r,e)?i:a}),a.__iterateUncached=function(a,i){var o=this,s=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return s++,a(e,r?i:s-1,o)}),i),s},a.__iteratorUncached=function(a,i){var o=e.__iterator(z,i),s=0;return new B((function(){for(;;){var i=o.next();if(i.done)return i;var l=i.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return F(a,r?c:s++,u,i)}}))},a}function tn(e,t,n){var r=Ze().asMutable();return e.__iterate((function(a,i){r.update(t.call(n,a,i,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),a=(u(e)?Ht():Ze()).asMutable();e.__iterate((function(i,o){a.update(t.call(n,i,o,e),(function(e){return(e=e||[]).push(r?[o,i]:i),e}))}));var i=yn(e);return a.map((function(t){return mn(e,i(t))}))}function rn(e,t,n,r){var a=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=a:n|=0),P(t,n,a))return e;var i=A(t,a),o=O(n,a);if(i!=i||o!=o)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=o-i;l==l&&(s=l<0?0:l);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ie(e)&&s>=0&&(c.get=function(t,n){return(t=M(this,t))>=0&&t<s?e.get(t+i,n):n}),c.__iterateUncached=function(t,n){var a=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=o++<i))return c++,!1!==t(e,r?n:c-1,a)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var a=0!==s&&e.__iterator(t,n),o=0,l=0;return new B((function(){for(;o++<i;)a.next();if(++l>s)return $();var e=a.next();return r||t===D?e:F(t,l-1,t===N?void 0:e.value[1],e)}))},c}function an(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,a){var i=this;if(a)return this.cacheResult().__iterate(r,a);var o=0;return e.__iterate((function(e,a,s){return t.call(n,e,a,s)&&++o&&r(e,a,i)})),o},r.__iteratorUncached=function(r,a){var i=this;if(a)return this.cacheResult().__iterator(r,a);var o=e.__iterator(z,a),s=!0;return new B((function(){if(!s)return $();var e=o.next();if(e.done)return e;var a=e.value,l=a[0],c=a[1];return t.call(n,c,l,i)?r===z?e:F(r,l,c,e):(s=!1,$())}))},r}function on(e,t,n,r){var a=bn(e);return a.__iterateUncached=function(a,i){var o=this;if(i)return this.cacheResult().__iterate(a,i);var s=!0,l=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return l++,a(e,r?i:l-1,o)})),l},a.__iteratorUncached=function(a,i){var o=this;if(i)return this.cacheResult().__iterator(a,i);var s=e.__iterator(z,i),l=!0,c=0;return new B((function(){var e,i,u;do{if((e=s.next()).done)return r||a===D?e:F(a,c++,a===N?void 0:e.value[1],e);var p=e.value;i=p[0],u=p[1],l&&(l=t.call(n,u,i,o))}while(l);return a===z?e:F(a,i,u,e)}))},a}function sn(e,t){var n=s(e),a=[e].concat(t).map((function(e){return o(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===a.length)return e;if(1===a.length){var i=a[0];if(i===e||n&&s(i)||l(e)&&l(i))return i}var c=new te(a);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=a.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,a){var i=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,a){return(!t||c<t)&&o(e)?l(e,c+1):!1===r(e,n?a:i++,u)&&(s=!0),!s}),a)}return l(e,0),i},r.__iteratorUncached=function(r,a){var i=e.__iterator(r,a),s=[],l=0;return new B((function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(r===z&&(c=c[1]),t&&!(s.length<t)||!o(c))return n?e:F(r,l++,c,e);s.push(i),i=c.__iterator(r,a)}else i=s.pop()}return $()}))},r}function cn(e,t,n){var r=yn(e);return e.toSeq().map((function(a,i){return r(t.call(n,a,i,e))})).flatten(!0)}function un(e,t){var n=bn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var a=this,i=0;return e.__iterate((function(e,r){return(!i||!1!==n(t,i++,a))&&!1!==n(e,i++,a)}),r),i},n.__iteratorUncached=function(n,r){var a,i=e.__iterator(D,r),o=0;return new B((function(){return(!a||o%2)&&(a=i.next()).done?a:o%2?F(n,o++,t):F(n,o++,a.value,a)}))},n}function pn(e,t,n){t||(t=kn);var r=s(e),a=0,i=e.toSeq().map((function(t,r){return[r,t,a++,n?n(t,r,e):t]})).toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?W(i):l(e)?Y(i):X(i)}function dn(e,t,n){if(t||(t=kn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return fn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return fn(t,e,n)?n:e}))}function fn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hn(e,t,r){var a=bn(e);return a.size=new te(r).map((function(e){return e.size})).min(),a.__iterate=function(e,t){for(var n,r=this.__iterator(D,t),a=0;!(n=r.next()).done&&!1!==e(n.value,a++,this););return a},a.__iteratorUncached=function(e,a){var i=r.map((function(e){return e=n(e),Z(a?e.reverse():e)})),o=0,s=!1;return new B((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?$():F(e,o++,t.apply(null,n.map((function(e){return e.value}))))}))},a}function mn(e,t){return ie(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return qe(e.size),C(e)}function yn(e){return s(e)?r:l(e)?a:i}function bn(e){return Object.create((s(e)?W:l(e)?Y:X).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function kn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=Z(e);if(!t){if(!U(e))throw new TypeError("Expected iterable or array-like: "+e);t=Z(n(e))}return t}function Sn(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var o=Object.keys(e);Tn(a,o),a.size=o.length,a._name=t,a._keys=o,a._defaultValues=e}this._map=Ze(i)},a=r.prototype=Object.create(xn);return a.constructor=r,r}t(Ht,Ze),Ht.of=function(){return this(arguments)},Ht.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ht.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Vt()},Ht.prototype.set=function(e,t){return Ut(this,e,t)},Ht.prototype.remove=function(e){return Ut(this,e,b)},Ht.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ht.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Ht.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ht.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Zt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ht.isOrderedMap=qt,Ht.prototype[h]=!0,Ht.prototype[m]=Ht.prototype.remove,t(Gt,W),Gt.prototype.get=function(e,t){return this._iter.get(e,t)},Gt.prototype.has=function(e){return this._iter.has(e)},Gt.prototype.valueSeq=function(){return this._iter.valueSeq()},Gt.prototype.reverse=function(){var e=this,t=Jt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Gt.prototype.map=function(e,t){var n=this,r=Qt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Gt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(a){return e(a,t?--n:n++,r)}),t)},Gt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(D,t),r=t?gn(this):0;return new B((function(){var a=n.next();return a.done?a:F(e,t?--r:r++,a.value,a)}))},Gt.prototype[h]=!0,t(Wt,Y),Wt.prototype.includes=function(e){return this._iter.includes(e)},Wt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Wt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(D,t),r=0;return new B((function(){var t=n.next();return t.done?t:F(e,r++,t.value,t)}))},t(Yt,X),Yt.prototype.has=function(e){return this._iter.includes(e)},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(D,t);return new B((function(){var t=n.next();return t.done?t:F(e,t.value,t.value,t)}))},t(Xt,W),Xt.prototype.entrySeq=function(){return this._iter.toSeq()},Xt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){vn(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Xt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(D,t);return new B((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){vn(r);var a=o(r);return F(e,a?r.get(0):r[0],a?r.get(1):r[1],t)}}}))},Wt.prototype.cacheResult=Gt.prototype.cacheResult=Yt.prototype.cacheResult=Xt.prototype.cacheResult=wn,t(Sn,Ee),Sn.prototype.toString=function(){return this.__toString(Mn(this)+" {","}")},Sn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Sn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Sn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Cn(this,at()))},Sn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Mn(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Cn(this,n)},Sn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Cn(this,t)},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Sn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Cn(this,t,e):(this.__ownerID=e,this._map=t,this)};var xn=Sn.prototype;function Cn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Mn(e){return e._name||e.constructor.name||"Record"}function Tn(e,t){try{t.forEach(Pn.bind(void 0,e))}catch(n){}}function Pn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function An(e){return null==e?Rn():On(e)&&!u(e)?e:Rn().withMutations((function(t){var n=i(e);qe(n.size),n.forEach((function(e){return t.add(e)}))}))}function On(e){return!(!e||!e[Nn])}xn[m]=xn.remove,xn.deleteIn=xn.removeIn=We.removeIn,xn.merge=We.merge,xn.mergeWith=We.mergeWith,xn.mergeIn=We.mergeIn,xn.mergeDeep=We.mergeDeep,xn.mergeDeepWith=We.mergeDeepWith,xn.mergeDeepIn=We.mergeDeepIn,xn.setIn=We.setIn,xn.update=We.update,xn.updateIn=We.updateIn,xn.withMutations=We.withMutations,xn.asMutable=We.asMutable,xn.asImmutable=We.asImmutable,t(An,xe),An.of=function(){return this(arguments)},An.fromKeys=function(e){return this(r(e).keySeq())},An.prototype.toString=function(){return this.__toString("Set {","}")},An.prototype.has=function(e){return this._map.has(e)},An.prototype.add=function(e){return zn(this,this._map.set(e,!0))},An.prototype.remove=function(e){return zn(this,this._map.remove(e))},An.prototype.clear=function(){return zn(this,this._map.clear())},An.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},An.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},An.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},An.prototype.merge=function(){return this.union.apply(this,arguments)},An.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},An.prototype.sort=function(e){return jn(pn(this,e))},An.prototype.sortBy=function(e,t){return jn(pn(this,t,e))},An.prototype.wasAltered=function(){return this._map.wasAltered()},An.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},An.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},An.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},An.isSet=On;var In,Nn="@@__IMMUTABLE_SET__@@",Dn=An.prototype;function zn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(Dn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Rn(){return In||(In=Ln(at()))}function jn(e){return null==e?qn():Bn(e)?e:qn().withMutations((function(t){var n=i(e);qe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Bn(e){return On(e)&&u(e)}Dn[Nn]=!0,Dn[m]=Dn.remove,Dn.mergeDeep=Dn.merge,Dn.mergeDeepWith=Dn.mergeWith,Dn.withMutations=We.withMutations,Dn.asMutable=We.asMutable,Dn.asImmutable=We.asImmutable,Dn.__empty=Rn,Dn.__make=Ln,t(jn,An),jn.of=function(){return this(arguments)},jn.fromKeys=function(e){return this(r(e).keySeq())},jn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},jn.isOrderedSet=Bn;var Fn,$n=jn.prototype;function Hn(e,t){var n=Object.create($n);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function qn(){return Fn||(Fn=Hn(Vt()))}function Zn(e){return null==e?Xn():Vn(e)?e:Xn().unshiftAll(e)}function Vn(e){return!(!e||!e[Gn])}$n[h]=!0,$n.__empty=qn,$n.__make=Hn,t(Zn,Se),Zn.of=function(){return this(arguments)},Zn.prototype.toString=function(){return this.__toString("Stack [","]")},Zn.prototype.get=function(e,t){var n=this._head;for(e=M(this,e);n&&e--;)n=n.next;return n?n.value:t},Zn.prototype.peek=function(){return this._head&&this._head.value},Zn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Yn(e,t)},Zn.prototype.pushAll=function(e){if(0===(e=a(e)).size)return this;qe(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Yn(t,n)},Zn.prototype.pop=function(){return this.slice(1)},Zn.prototype.unshift=function(){return this.push.apply(this,arguments)},Zn.prototype.unshiftAll=function(e){return this.pushAll(e)},Zn.prototype.shift=function(){return this.pop.apply(this,arguments)},Zn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xn()},Zn.prototype.slice=function(e,t){if(P(e,t,this.size))return this;var n=A(e,this.size);if(O(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=r,this._head=a,this.__hash=void 0,this.__altered=!0,this):Yn(r,a)},Zn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Zn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Zn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new B((function(){if(r){var t=r.value;return r=r.next,F(e,n++,t)}return $()}))},Zn.isStack=Vn;var Un,Gn="@@__IMMUTABLE_STACK__@@",Wn=Zn.prototype;function Yn(e,t,n,r){var a=Object.create(Wn);return a.size=e,a._head=t,a.__ownerID=n,a.__hash=r,a.__altered=!1,a}function Xn(){return Un||(Un=Yn(0))}function Kn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Wn[Gn]=!0,Wn.withMutations=We.withMutations,Wn.asMutable=We.asMutable,Wn.asImmutable=We.asImmutable,Wn.wasAltered=We.wasAltered,n.Iterator=B,Kn(n,{toArray:function(){qe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Wt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Gt(this,!0)},toMap:function(){return Ze(this.toKeyedSeq())},toObject:function(){qe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Ht(this.toKeyedSeq())},toOrderedSet:function(){return jn(s(this)?this.valueSeq():this)},toSet:function(){return An(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Zn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(z)},every:function(e,t){qe(this.size);var n=!0;return this.__iterate((function(r,a,i){if(!e.call(t,r,a,i))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return qe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){qe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Qt(this,e,t))},reduce:function(e,t,n){var r,a;return qe(this.size),arguments.length<2?a=!0:r=t,this.__iterate((function(t,i,o){a?(a=!1,r=t):r=e.call(n,r,t,i,o)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Jt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(D)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(nr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,a,i){if(e.call(t,n,a,i))return r=[a,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(T)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Xt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,a=En(e);!(n=a.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return dn(this,e)},maxBy:function(e,t){return dn(this,t,e)},min:function(e){return dn(this,e?rr(e):or)},minBy:function(e,t){return dn(this,t?rr(t):or,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,on(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,an(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var Qn=n.prototype;Qn[p]=!0,Qn[j]=Qn.values,Qn.__toJS=Qn.toArray,Qn.__toStringMapper=ar,Qn.inspect=Qn.toSource=function(){return this.toString()},Qn.chain=Qn.flatMap,Qn.contains=Qn.includes,Kn(r,{flip:function(){return mn(this,Kt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(a,i){return e.call(t,[i,a],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,a){return e.call(t,r,a,n)})).flip())}});var Jn=r.prototype;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function ar(e){return"string"==typeof e?JSON.stringify(e):String(e)}function ir(){return x(arguments)}function or(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0;return lr(e.__iterate(n?t?function(e,t){r=31*r+cr(Te(e),Te(t))|0}:function(e,t){r=r+cr(Te(e),Te(t))|0}:t?function(e){r=31*r+Te(e)|0}:function(e){r=r+Te(e)|0}),r)}function lr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Me((t=Ce(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Jn[d]=!0,Jn[j]=Qn.entries,Jn.__toJS=Qn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+ar(e)},Kn(a,{toKeyedSeq:function(){return new Gt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Jt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=A(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,ln(this,e,!1))},get:function(e,t){return(e=M(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=M(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,un(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=hn(this.toSeq(),Y.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},keySeq:function(){return ke(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,on(this,e,t,!1))},zip:function(){return mn(this,hn(this,ir,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,mn(this,hn(this,e,t))}}),a.prototype[f]=!0,a.prototype[h]=!0,Kn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Qn.includes,i.prototype.contains=i.prototype.includes,Kn(W,r.prototype),Kn(Y,a.prototype),Kn(X,i.prototype),Kn(Ee,r.prototype),Kn(Se,a.prototype),Kn(xe,i.prototype),{Iterable:n,Seq:G,Collection:_e,Map:Ze,OrderedMap:Ht,List:St,Stack:Zn,Set:An,OrderedSet:jn,Record:Sn,Range:ke,Repeat:be,is:ge,fromJS:fe}}()},3542:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";var r=n(5)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=n(18)()?Symbol:n(20)},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateRange=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(_n=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);_n=!0);}catch(s){r=!0,a=s}finally{try{!_n&&o.return&&o.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a="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},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.extendMoment=function(e){return e.range=function(t,n){return p.hasOwnProperty(t)?new d(e(this).startOf(t),e(this).endOf(t)):new d(t,n)},e.rangeFromInterval=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e();if(e.isMoment(r)||(r=e(r)),!r.isValid())throw new Error("Invalid date.");var a=r.clone().add(n,t),i=[];return i.push(e.min(r,a)),i.push(e.max(r,a)),new d(i)},e.parseZoneRange=function(t){var n=f(t),r=e.parseZone(n[0]),a=e.parseZone(n[1]);return new d(r,a)},e.fn.range=e.range,e.range.constructor=d,e.isRange=function(e){return e instanceof d},e.fn.within=function(e){return e.contains(this.toDate())},e};var o=l(n(2)),s=l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p={year:!0,quarter:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0},d=t.DateRange=function(){function e(t,n){u(this,e);var i=t,s=n;if(1===arguments.length||void 0===n)if("object"===(void 0===t?"undefined":a(t))&&2===t.length){var l=r(t,2);i=l[0],s=l[1]}else if("string"==typeof t){var c=f(t),p=r(c,2);i=p[0],s=p[1]}this.start=i||0===i?(0,o.default)(i):(0,o.default)(-864e13),this.end=s||0===s?(0,o.default)(s):(0,o.default)(864e13)}return i(e,[{key:"adjacent",value:function(e){var t=this.start.isSame(e.end),n=this.end.isSame(e.start);return t&&e.start.valueOf()<=this.start.valueOf()||n&&e.end.valueOf()>=this.end.valueOf()}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1};return this.overlaps(e,t)?new this.constructor(o.default.min(this.start,e.start),o.default.max(this.end,e.end)):null}},{key:"by",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this;return c({},s.default.iterator,(function(){var r=t.exclusive||!1,a=t.step||1,i=Math.abs(n.start.diff(n.end,e))/a,o=0;return{next:function(){var t=n.start.clone().add(o*a,e),s=r?!(o<i):!(o<=i);return o++,{done:s,value:s?void 0:t}}}}))}},{key:"byRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this,r=t.step||1,a=this.valueOf()/e.valueOf()/r,i=t.exclusive||!1,l=Math.floor(a),u=0;return c({},s.default.iterator,(function(){return l===1/0?{done:!0}:{next:function(){var t=(0,o.default)(n.start.valueOf()+e.valueOf()*u*r),s=l===a&&i?!(u<l):!(u<=l);return u++,{done:s,value:s?void 0:t}}}}))}},{key:"center",value:function(){var e=this.start.valueOf()+this.diff()/2;return(0,o.default)(e)}},{key:"clone",value:function(){return new this.constructor(this.start,this.end)}},{key:"contains",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1},r=this.start.valueOf(),a=this.end.valueOf(),i=t.valueOf(),o=t.valueOf();t instanceof e&&(i=t.start.valueOf(),o=t.end.valueOf());var s=r<i||r<=i&&!n.exclusive,l=a>o||a>=o&&!n.exclusive;return s&&l}},{key:"diff",value:function(e,t){return this.end.diff(this.start,e,t)}},{key:"duration",value:function(e,t){return this.diff(e,t)}},{key:"intersect",value:function(e){var t=this.start.valueOf(),n=this.end.valueOf(),r=e.start.valueOf(),a=e.end.valueOf();if(t==n){if(t==r||t==a)return null;if(t>r&&t<a)return this}else if(r==a){if(r==t||r==n)return null;if(r>t&&r<n)return e}return t<=r&&r<n&&n<a?new this.constructor(r,n):r<t&&t<a&&a<=n?new this.constructor(t,a):r<t&&t<=n&&n<a?this:t<=r&&r<=a&&a<=n?e:null}},{key:"isEqual",value:function(e){return this.start.isSame(e.start)&&this.end.isSame(e.end)}},{key:"isSame",value:function(e){return this.isEqual(e)}},{key:"overlaps",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1},n=null!==this.intersect(e);return t.adjacent&&!n?this.adjacent(e):n}},{key:"reverseBy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this;return c({},s.default.iterator,(function(){var r=t.exclusive||!1,a=t.step||1,i=Math.abs(n.start.diff(n.end,e))/a,o=0;return{next:function(){var t=n.end.clone().subtract(o*a,e),s=r?!(o<i):!(o<=i);return o++,{done:s,value:s?void 0:t}}}}))}},{key:"reverseByRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this,r=t.step||1,a=this.valueOf()/e.valueOf()/r,i=t.exclusive||!1,l=Math.floor(a),u=0;return c({},s.default.iterator,(function(){return l===1/0?{done:!0}:{next:function(){var t=(0,o.default)(n.end.valueOf()-e.valueOf()*u*r),s=l===a&&i?!(u<l):!(u<=l);return u++,{done:s,value:s?void 0:t}}}}))}},{key:"subtract",value:function(e){var t=this.start.valueOf(),n=this.end.valueOf(),r=e.start.valueOf(),a=e.end.valueOf();return null===this.intersect(e)?[this]:r<=t&&t<n&&n<=a?[]:r<=t&&t<a&&a<n?[new this.constructor(a,n)]:t<r&&r<n&&n<=a?[new this.constructor(t,r)]:t<r&&r<a&&a<n?[new this.constructor(t,r),new this.constructor(a,n)]:t<r&&r<n&&a<n?[new this.constructor(t,r),new this.constructor(r,n)]:[]}},{key:"toDate",value:function(){return[this.start.toDate(),this.end.toDate()]}},{key:"toString",value:function(){return this.start.format()+"/"+this.end.format()}},{key:"valueOf",value:function(){return this.end.valueOf()-this.start.valueOf()}}]),e}();function f(e){return e.split("/")}},function(e,t,n){"use strict";var r,a=n(6),i=n(13),o=n(9),s=n(15);r=e.exports=function(e,t){var n,r,o,l,c;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],null==e?(n=o=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),o=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:o},l?a(i(l),c):c},r.gs=function(e,t,n){var r,l,c,u;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:o(t)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,l=!1):(r=s.call(e,"c"),l=s.call(e,"e")),u={get:t,set:n,configurable:r,enumerable:l},c?a(i(c),u):u}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";e.exports=n(7)()?Object.assign:n(8)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(10),a=n(14),i=Math.max;e.exports=function(e,t){var n,o,s,l=i(arguments.length,2);for(e=Object(a(e)),s=function(r){try{e[r]=t[r]}catch(a){n||(n=a)}},o=1;o<l;++o)r(t=arguments[o]).forEach(s);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(11)()?Object.keys:n(12)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(0),a=Object.keys;e.exports=function(e){return a(r(e)?Object(e):e)}},function(e,t,n){"use strict";var r=n(0),a=Array.prototype.forEach,i=Object.create,o=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=i(null);return a.call(arguments,(function(e){r(e)&&o(Object(e),t)})),t}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(16)()?String.prototype.contains:n(17)},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r={object:!0,symbol:!0};e.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(t){return!1}return!!r[typeof Symbol.iterator]&&!!r[typeof Symbol.toPrimitive]&&!!r[typeof Symbol.toStringTag]}},function(e,t,n){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},function(e,t,n){"use strict";var r,a,i,o,s=n(4),l=n(21),c=Object.create,u=Object.defineProperties,p=Object.defineProperty,d=Object.prototype,f=c(null);if("function"==typeof Symbol){r=Symbol;try{String(r()),o=!0}catch(v){}}var h,m=(h=c(null),function(e){for(var t,n,r=0;h[e+(r||"")];)++r;return h[e+=r||""]=!0,p(d,t="@@"+e,s.gs(null,(function(e){n||(n=!0,p(this,t,s(e)),n=!1)}))),t});i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return a(e)},e.exports=a=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?r(t):(n=c(i.prototype),t=void 0===t?"":String(t),u(n,{__description__:s("",t),__name__:s("",m(t))}))},u(a,{for:s((function(e){return f[e]?f[e]:f[e]=a(String(e))})),keyFor:s((function(e){var t;for(t in l(e),f)if(f[t]===e)return t})),hasInstance:s("",r&&r.hasInstance||a("hasInstance")),isConcatSpreadable:s("",r&&r.isConcatSpreadable||a("isConcatSpreadable")),iterator:s("",r&&r.iterator||a("iterator")),match:s("",r&&r.match||a("match")),replace:s("",r&&r.replace||a("replace")),search:s("",r&&r.search||a("search")),species:s("",r&&r.species||a("species")),split:s("",r&&r.split||a("split")),toPrimitive:s("",r&&r.toPrimitive||a("toPrimitive")),toStringTag:s("",r&&r.toStringTag||a("toStringTag")),unscopables:s("",r&&r.unscopables||a("unscopables"))}),u(i.prototype,{constructor:s(a),toString:s("",(function(){return this.__name__}))}),u(a.prototype,{toString:s((function(){return"Symbol ("+l(this).__description__+")"})),valueOf:s((function(){return l(this)}))}),p(a.prototype,a.toPrimitive,s("",(function(){var e=l(this);return"symbol"==typeof e?e:e.toString()}))),p(a.prototype,a.toStringTag,s("c","Symbol")),p(i.prototype,a.toStringTag,s("c",a.prototype[a.toStringTag])),p(i.prototype,a.toPrimitive,s("c",a.prototype[a.toPrimitive]))},function(e,t,n){"use strict";var r=n(19);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}}])},e.exports=r(n(6292))},989:(e,t,n)=>{"use strict";n.d(t,{fM:()=>Ue,Vk:()=>Ye,ah:()=>tt,zx:()=>In,Zb:()=>Dn,$_:()=>kr,RG:()=>br,rj:()=>Pr,OQ:()=>Sr,RZ:()=>Mr,u_:()=>Or,VQ:()=>Nr,qX:()=>Br,pe:()=>Hr,xf:()=>Vr,J2:()=>ea,M$:()=>na,Yw:()=>la,_g:()=>ha,w4:()=>ga,Pi:()=>ba,PT:()=>hr});var r={};n.r(r),n.d(r,{BrowserRouter:()=>yn,HashRouter:()=>bn,Link:()=>Cn,MemoryRouter:()=>Gt,NavLink:()=>Pn,Prompt:()=>Yt,Redirect:()=>Jt,Route:()=>rn,Router:()=>Ut,StaticRouter:()=>un,Switch:()=>pn,generatePath:()=>Qt,matchPath:()=>nn,useHistory:()=>hn,useLocation:()=>mn,useParams:()=>vn,useRouteMatch:()=>gn,withRouter:()=>dn});var a=n(4942),i=n(9307),o=n(5609),s=n(1984),l=n(444);const c=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));var u=n(4184),p=n.n(u),d=n(9196),f=n.n(d);var h=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Bn){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),m=Math.abs,v=String.fromCharCode,g=Object.assign;function y(e){return e.trim()}function b(e,t,n){return e.replace(t,n)}function w(e,t){return e.indexOf(t)}function k(e,t){return 0|e.charCodeAt(t)}function _(e,t,n){return e.slice(t,n)}function E(e){return e.length}function S(e){return e.length}function x(e,t){return t.push(e),e}var C=1,M=1,T=0,P=0,A=0,O="";function I(e,t,n,r,a,i,o){return{value:e,root:t,parent:n,type:r,props:a,children:i,line:C,column:M,length:o,return:""}}function N(e,t){return g(I("",null,null,"",null,null,0),e,{length:-e.length},t)}function D(){return A=P>0?k(O,--P):0,M--,10===A&&(M=1,C--),A}function z(){return A=P<T?k(O,P++):0,M++,10===A&&(M=1,C++),A}function L(){return k(O,P)}function R(){return P}function j(e,t){return _(O,e,t)}function B(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function F(e){return C=M=1,T=E(O=e),P=0,[]}function $(e){return O="",e}function H(e){return y(j(P-1,V(91===e?e+2:40===e?e+1:e)))}function q(e){for(;(A=L())&&A<33;)z();return B(e)>2||B(A)>3?"":" "}function Z(e,t){for(;--t&&z()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return j(e,R()+(t<6&&32==L()&&32==z()))}function V(e){for(;z();)switch(A){case e:return P;case 34:case 39:34!==e&&39!==e&&V(A);break;case 40:41===e&&V(e);break;case 92:z()}return P}function U(e,t){for(;z()&&e+A!==57&&(e+A!==84||47!==L()););return"/*"+j(t,P-1)+"*"+v(47===e?e:z())}function G(e){for(;!B(L());)z();return j(e,P)}var W="-ms-",Y="-moz-",X="-webkit-",K="comm",Q="rule",J="decl",ee="@keyframes";function te(e,t){for(var n="",r=S(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function ne(e,t,n,r){switch(e.type){case"@import":case J:return e.return=e.return||e.value;case K:return"";case ee:return e.return=e.value+"{"+te(e.children,r)+"}";case Q:e.value=e.props.join(",")}return E(n=te(e.children,r))?e.return=e.value+"{"+n+"}":""}function re(e){return $(ae("",null,null,null,[""],e=F(e),0,[0],e))}function ae(e,t,n,r,a,i,o,s,l){for(var c=0,u=0,p=o,d=0,f=0,h=0,m=1,g=1,y=1,_=0,S="",C=a,M=i,T=r,P=S;g;)switch(h=_,_=z()){case 40:if(108!=h&&58==k(P,p-1)){-1!=w(P+=b(H(_),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:P+=H(_);break;case 9:case 10:case 13:case 32:P+=q(h);break;case 92:P+=Z(R()-1,7);continue;case 47:switch(L()){case 42:case 47:x(oe(U(z(),R()),t,n),l);break;default:P+="/"}break;case 123*m:s[c++]=E(P)*y;case 125*m:case 59:case 0:switch(_){case 0:case 125:g=0;case 59+u:f>0&&E(P)-p&&x(f>32?se(P+";",r,n,p-1):se(b(P," ","")+";",r,n,p-2),l);break;case 59:P+=";";default:if(x(T=ie(P,t,n,c,u,a,s,S,C=[],M=[],p),i),123===_)if(0===u)ae(P,t,T,T,C,i,p,s,M);else switch(99===d&&110===k(P,3)?100:d){case 100:case 109:case 115:ae(e,T,T,r&&x(ie(e,T,T,0,0,a,s,S,a,C=[],p),M),a,M,p,s,r?C:M);break;default:ae(P,T,T,T,[""],M,0,s,M)}}c=u=f=0,m=y=1,S=P="",p=o;break;case 58:p=1+E(P),f=h;default:if(m<1)if(123==_)--m;else if(125==_&&0==m++&&125==D())continue;switch(P+=v(_),_*m){case 38:y=u>0?1:(P+="\f",-1);break;case 44:s[c++]=(E(P)-1)*y,y=1;break;case 64:45===L()&&(P+=H(z())),d=L(),u=p=E(S=P+=G(R())),_++;break;case 45:45===h&&2==E(P)&&(m=0)}}return i}function ie(e,t,n,r,a,i,o,s,l,c,u){for(var p=a-1,d=0===a?i:[""],f=S(d),h=0,v=0,g=0;h<r;++h)for(var w=0,k=_(e,p+1,p=m(v=o[h])),E=e;w<f;++w)(E=y(v>0?d[w]+" "+k:b(k,/&\f/g,d[w])))&&(l[g++]=E);return I(e,t,n,0===a?Q:s,l,c,u)}function oe(e,t,n){return I(e,t,n,K,v(A),_(e,2,-2),0)}function se(e,t,n,r){return I(e,t,n,J,_(e,0,r),_(e,r+1,-1),r)}var le=function(e,t,n){for(var r=0,a=0;r=a,a=L(),38===r&&12===a&&(t[n]=1),!B(a);)z();return j(e,P)},ce=function(e,t){return $(function(e,t){var n=-1,r=44;do{switch(B(r)){case 0:38===r&&12===L()&&(t[n]=1),e[n]+=le(P-1,t,n);break;case 2:e[n]+=H(r);break;case 4:if(44===r){e[++n]=58===L()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=v(r)}}while(r=z());return e}(F(e),t))},ue=new WeakMap,pe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ue.get(n))&&!r){ue.set(e,!0);for(var a=[],i=ce(t,a),o=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=a[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},de=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fe(e,t){switch(function(e,t){return 45^k(e,0)?(((t<<2^k(e,0))<<2^k(e,1))<<2^k(e,2))<<2^k(e,3):0}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return X+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return X+e+Y+e+W+e+e;case 6828:case 4268:return X+e+W+e+e;case 6165:return X+e+W+"flex-"+e+e;case 5187:return X+e+b(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return X+e+W+"flex-item-"+b(e,/flex-|-self/,"")+e;case 4675:return X+e+W+"flex-line-pack"+b(e,/align-content|flex-|-self/,"")+e;case 5548:return X+e+W+b(e,"shrink","negative")+e;case 5292:return X+e+W+b(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+b(e,"-grow","")+X+e+W+b(e,"grow","positive")+e;case 4554:return X+b(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return b(b(b(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return b(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return b(b(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+X+e+e;case 4095:case 3583:case 4068:case 2532:return b(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(e)-1-t>6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return b(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~w(e,"stretch")?fe(b(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==k(e,t+1))break;case 6444:switch(k(e,E(e)-3-(~w(e,"!important")&&10))){case 107:return b(e,":",":-webkit-")+e;case 101:return b(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===k(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(k(e,t+11)){case 114:return X+e+W+b(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return X+e+W+b(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return X+e+W+b(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return X+e+W+e+e}return e}var he=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case J:e.return=fe(e.value,e.length);break;case ee:return te([N(e,{value:b(e.value,"@","@-webkit-")})],r);case Q:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return te([N(e,{props:[b(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return te([N(e,{props:[b(t,/:(plac\w+)/,":-webkit-input-$1")]}),N(e,{props:[b(t,/:(plac\w+)/,":-moz-$1")]}),N(e,{props:[b(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}];const me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||he;var a,i,o={},s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)}));var l,c,u,p,d=[ne,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(c=[pe,de].concat(r,d),u=S(c),function(e,t,n,r){for(var a="",i=0;i<u;i++)a+=c[i](e,t,n,r)||"";return a});i=function(e,t,n,r){l=n,te(re(e?e+"{"+t.styles+"}":t.styles),f),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new h({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return m.sheet.hydrate(s),m};var ve=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};const ge=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const ye={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};const be=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}};var we=/[A-Z]|^ms/g,ke=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_e=function(e){return 45===e.charCodeAt(1)},Ee=function(e){return null!=e&&"boolean"!=typeof e},Se=be((function(e){return _e(e)?e:e.replace(we,"-$&").toLowerCase()})),xe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ke,(function(e,t,n){return Me={name:t,styles:n,next:Me},t}))}return 1===ye[e]||_e(e)||"number"!=typeof t||0===t?t:t+"px"};function Ce(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Me={name:n.name,styles:n.styles,next:Me},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Me={name:r.name,styles:r.styles,next:Me},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=Ce(e,t,n[a])+";";else for(var i in n){var o=n[i];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=i+"{"+t[o]+"}":Ee(o)&&(r+=Se(i)+":"+xe(i,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=Ce(e,t,o);switch(i){case"animation":case"animationName":r+=Se(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<o.length;l++)Ee(o[l])&&(r+=Se(i)+":"+xe(i,o[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=Me,i=n(e);return Me=a,Ce(e,t,i)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var Me,Te=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Pe=!!d.useInsertionEffect&&d.useInsertionEffect,Ae=Pe||function(e){return e()},Oe=(Pe||d.useLayoutEffect,{}.hasOwnProperty),Ie=(0,d.createContext)("undefined"!=typeof HTMLElement?me({key:"css"}):null);Ie.Provider;var Ne=function(e){return(0,d.forwardRef)((function(t,n){var r=(0,d.useContext)(Ie);return e(t,r,n)}))},De=(0,d.createContext)({});var ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Le=function(e,t){var n={};for(var r in t)Oe.call(t,r)&&(n[r]=t[r]);return n[ze]=e,n},Re=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;ve(t,n,r);Ae((function(){return function(e,t,n){ve(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}(t,n,r)}));return null},je=Ne((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var a=e[ze],i=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,i,e.className):null!=e.className&&(o=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";Me=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,a+=Ce(n,t,i)):a+=i[0];for(var o=1;o<e.length;o++)a+=Ce(n,t,e[o]),r&&(a+=i[o]);Te.lastIndex=0;for(var s,l="";null!==(s=Te.exec(a));)l+="-"+s[1];return{name:ge(a)+l,styles:a,next:Me}}(i,void 0,(0,d.useContext)(De));o+=t.key+"-"+s.name;var l={};for(var c in e)Oe.call(e,c)&&"css"!==c&&c!==ze&&(l[c]=e[c]);return l.ref=n,l.className=o,(0,d.createElement)(d.Fragment,null,(0,d.createElement)(Re,{cache:t,serialized:s,isStringTag:"string"==typeof a}),(0,d.createElement)(a,l))}));var Be=n(8679),Fe=n.n(Be),$e=n(5893),He=$e.Fragment;function qe(e,t,n){return Oe.call(t,"css")?(0,$e.jsx)(je,Le(e,t),n):(0,$e.jsx)(e,t,n)}function Ze(e,t,n){return Oe.call(t,"css")?(0,$e.jsxs)(je,Le(e,t),n):(0,$e.jsxs)(e,t,n)}class Ve extends i.Component{constructor(){super(...arguments),(0,a.Z)(this,"backgroundImageStyles",(e=>e?{backgroundImage:`url(${e})`}:{}))}render(){const{badge:e,className:t,checkbox:n,children:r,disabled:a,title:i,description:l,handoff:u,editLink:d,href:f,notification:h,notificationLevel:m,notificationHTML:v,actionContent:g,actionText:y,secondaryActionText:b,secondaryDestructive:w,image:k,imageLink:_,indent:E,isSmall:S,isMedium:x,simple:C,onClick:M,onSecondaryActionClick:T,isWaiting:P,titleLink:A,toggleChecked:O,toggleOnChange:I,hasGreyHeader:N,isPending:D}=this.props,z=h||r,L=p()("newspack-action-card",C&&"newspack-card--is-clickable",N&&"newspack-card--has-grey-header",z&&"newspack-card--has-children",E&&"newspack-card--indent",S&&"is-small",x&&"is-medium",t),R=!I||A||a?{}:{onClick:()=>I(!O),tabIndex:"0"},j=f&&0!==f.indexOf("http"),B=b&&T,F=!Array.isArray(e)&&e?[e]:e;return Ze(Dn,{className:L,onClick:C&&M,children:[Ze("div",{className:"newspack-action-card__region newspack-action-card__region-top",children:[I&&qe(o.ToggleControl,{checked:O,onChange:I,disabled:a}),k&&!I&&qe("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:qe("a",{href:_,children:qe("div",{className:"newspack-action-card__image",style:this.backgroundImageStyles(k)})})}),n&&!I&&qe("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:qe("span",{className:p()("newspack-checkbox-icon","is-primary","checked"===n&&"newspack-checkbox-icon--checked",D&&"newspack-checkbox-icon--pending"),children:"checked"===n&&qe(s.Z,{icon:c})})}),qe("div",{className:"newspack-action-card__region newspack-action-card__region-center",children:Ze(Pr,{columns:1,gutter:8,noMargin:!0,children:[Ze("h2",{children:[qe("span",{className:"newspack-action-card__title",...R,children:A?qe("a",{href:A,children:i}):i}),F?.length&&F.map(((e,t)=>qe("span",{className:"newspack-action-card__badge",children:e},`badge-${t}`)))]}),l&&Ze("p",{children:["string"==typeof l&&l,"function"==typeof l&&l()]})]})}),(y||B||g)&&Ze("div",{className:"newspack-action-card__region newspack-action-card__region-right",children:[g&&g,y&&(u?qe(Sr,{plugin:u,editLink:d,compact:!0,isLink:!0,children:y}):M||j?qe(In,{isLink:!0,href:f,onClick:M,className:"newspack-action-card__primary_button",children:y}):f?qe(o.ExternalLink,{href:f,className:"newspack-action-card__primary_button",children:y}):Ze("div",{className:"newspack-action-card__container",children:[y,P&&qe(ba,{isRight:!0})]})),B&&qe(In,{isLink:!0,onClick:T,className:"newspack-action-card__secondary_button",isDestructive:w,children:b})]})]}),h&&Ze("div",{className:"newspack-action-card__notification newspack-action-card__region-children",children:["error"===m&&qe(Br,{noticeText:h,isError:!0,rawHTML:v}),"info"===m&&qe(Br,{noticeText:h,rawHTML:v}),"success"===m&&qe(Br,{noticeText:h,isSuccess:!0,rawHTML:v}),"warning"===m&&qe(Br,{noticeText:h,isWarning:!0,rawHTML:v})]}),r&&qe("div",{className:"newspack-action-card__region-children",children:r})]})}}Ve.defaultProps={toggleChecked:!1};const Ue=Ve;var Ge=n(2819);class We extends i.Component{constructor(e){super(e),(0,a.Z)(this,"isFetchingInfoOnLoad",(()=>{const{tokens:e,fetchSavedInfo:t}=this.props;return Boolean(e.length&&t)})),this.state={suggestions:[],validValues:{},loading:this.isFetchingInfoOnLoad()},this.debouncedUpdateSuggestions=(0,Ge.debounce)(this.updateSuggestions,500)}componentDidMount(){if(this.isFetchingInfoOnLoad()){const{tokens:e,fetchSavedInfo:t}=this.props;t(e).then((e=>{const{validValues:t}=this.state;e.forEach((e=>{t[e.value]=e.label})),this.setState({validValues:t,loading:!1})}))}}componentWillUnmount(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}getLabelsForValues(e){const{validValues:t}=this.state;return e.reduce(((e,n)=>n?n.label?[...e,n.label]:t[n]?[...e,t[n]]:e:e),[])}getValuesForLabels(e){const{returnFullObjects:t}=this.props,{validValues:n}=this.state;return t?e.reduce(((e,t)=>(Object.keys(n).forEach((r=>{n[r]===t&&e.push({value:r,label:t})})),e)),[]):e.map((e=>Object.keys(n).find((t=>n[t]===e))))}updateSuggestions(e){const{fetchSuggestions:t}=this.props;t&&this.setState({loading:!0},(()=>{const n=t(e);n.then((e=>{if(this.suggestionsRequest!==n)return;const t=[...e],r={};e.forEach((e=>{r[e.value]=e.label})),this.setState({suggestions:t,validValues:r,loading:!1})})).catch((()=>{this.suggestionsRequest===n&&this.setState({loading:!1})})),this.suggestionsRequest=n}))}handleOnChange(e){const{onChange:t}=this.props;t(this.getValuesForLabels(e))}getTokens(){const{tokens:e}=this.props;return this.getLabelsForValues(e)}render(){const{help:e,label:t="",maxLength:n}=this.props,{suggestions:r,loading:a}=this.state;return Ze("div",{className:"newspack-autocomplete-tokenfield",children:[qe(o.FormTokenField,{value:this.getTokens(),suggestions:r.map((e=>e.label)),onChange:e=>this.handleOnChange(e),onInputChange:e=>this.debouncedUpdateSuggestions(e),label:t,maxLength:n}),a&&qe(o.Spinner,{}),e&&qe("p",{className:"newspack-autocomplete-tokenfield__help",children:e})]})}}const Ye=We;var Xe=n(6989),Ke=n.n(Xe),Qe=n(2629),Je=n(5736),et=n(6483);const __=Je.__,_x=Je._x,tt=e=>{let{fetchSavedPosts:t=!1,fetchSuggestions:n=!1,help:r=__("Begin typing search term, click autocomplete result to select.","newspack"),hideHelp:a=!1,label:s=__("Search","newspack"),maxItemsToSuggest:l=0,multiSelect:c=!1,onChange:u=!1,onPostTypeChange:p=!1,postTypes:d=[{slug:"post",label:"Post"}],postTypeLabel:f=__("item","newspack"),postTypeLabelPlural:h=__("items","newspack"),selectedItems:m=[],selectedPost:v=0,suggestionsToFetch:g=10}=e;const[y,b]=(0,i.useState)(!0),[w,k]=(0,i.useState)(!1),[_,E]=(0,i.useState)([]),[S,x]=(0,i.useState)(0),[C,M]=(0,i.useState)(d[0].slug),T=["newspack-autocomplete-with-suggestions"];a&&T.push("hide-help"),(0,i.useEffect)((()=>{p&&p(C),b(!0),A(null,0,C).then((e=>{0<e.length&&E(e)})).finally((()=>b(!1)))}),[C]),(0,i.useEffect)((()=>{w&&A(null,_.length,C).then((e=>{0<e.length&&E(_.concat(e))})).finally((()=>k(!1)))}),[w]);const P=t||async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t||C,r="post"===n||"page"===n?n+"s":n,a=await Ke()({path:(0,et.addQueryArgs)("/wp/v2/"+r,{per_page:100,include:e.join(","),_fields:"id,title"})});return a.map((e=>({value:parseInt(e.id),label:(0,Qe.decodeEntities)(e.title)||__("(no title)","newspack")})))},A=n||async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=n||C,a="post"===r||"page"===r?r+"s":r,i=await Ke()({parse:!1,path:(0,et.addQueryArgs)("/wp/v2/"+a,{search:e,offset:t,per_page:g,_fields:"id,title"})}),o=parseInt(i.headers.get("x-wp-total")||0),s=await i.json();return x(o),s.reduce(((e,t)=>(e.push({value:parseInt(t.id),label:(0,Qe.decodeEntities)(t?.title.rendered)||__("(no title)","newspack")}),e)),[])},O=e=>{if(!c)return u(e);const t=v?[...m,v]:[...m];e.forEach((e=>{const n=t.findIndex((t=>parseInt(t.value)===parseInt(e.value)));-1<n?t.splice(n,1):t.push(e)})),u(t.map((e=>({...e,postType:C}))))},I=e=>{if(c){const t=!!(v?[...m,v]:[...m]).find((t=>parseInt(t.value)===parseInt(e.value)&&t.label===e.label));return qe(o.CheckboxControl,{checked:t,onChange:()=>O([e]),label:e.label},e.value)}return qe(o.Button,{isLink:!0,onClick:()=>O([e]),children:e.label},e.value)};return Ze("div",{className:T.join(" "),children:[0<m.length&&(()=>{const e=v?[...m,v]:m;return Ze("div",{className:"newspack-autocomplete-with-suggestions__selected-items",children:[Ze("p",{className:"newspack-autocomplete-with-suggestions__label",children:[c?(0,Je.sprintf)(__("%1$s %2$s selected","newspack"),e.length,e.length>1?h:f):(0,Je.sprintf)(__("Selected %s","newspack"),f),1<e.length&&_x(" – ","separator character","newspack"),1<e.length&&qe(o.Button,{onClick:()=>u([]),isLink:!0,isDestructive:!0,children:__("Clear all","newspack")})]}),e.map((t=>qe(o.Button,{className:"newspack-autocomplete-with-suggestions__selected-item-button",isTertiary:!0,onClick:()=>u(e.filter((e=>e.value!==t.value))),children:t.label},t.value)))]})})(),1<d.length&&qe(o.SelectControl,{label:(0,Je.sprintf)(__("%s type","newspack"),f.charAt(0).toUpperCase()+f.slice(1)),value:C,options:d.map((e=>({label:e.label,value:e.slug}))),onChange:e=>M(e)}),qe(Ye,{tokens:[],onChange:O,fetchSuggestions:async e=>A(e,0,C),fetchSavedInfo:e=>P(e),label:s,help:!a&&r,returnFullObjects:!0}),(()=>{if(y)return qe("div",{className:"newspack-autocomplete-with-suggestions__suggestions-spinner",children:qe(o.Spinner,{})});if(0===_.length)return null;const e=c?"newspack-autocomplete-with-suggestions__search-suggestions-multiselect":"newspack-autocomplete-with-suggestions__search-suggestions";return Ze(He,{children:[!a&&qe("p",{className:"newspack-autocomplete-with-suggestions__label",children:(0,Je.sprintf)(__("Or, select a recent %s:","newspack"),f)}),Ze("div",{className:e,children:[_.map(I),_.length<(l||S)&&qe(o.Button,{disabled:w,isSecondary:!0,onClick:()=>k(!0),children:__(w?"Loading…":"Load more","newspack")})]})]})})()]})};var nt=n(9611);function rt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,nt.Z)(e,t)}var at=n(5697),it=n.n(at),ot=n(7462);function st(e){return"/"===e.charAt(0)}function lt(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const ct=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],i=e&&st(e),o=t&&st(t),s=i||o;if(e&&st(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=a.length;u>=0;u--){var p=a[u];"."===p?lt(a,u):".."===p?(lt(a,u),c++):c&&(lt(a,u),c--)}if(!s)for(;c--;c)a.unshift("..");!s||""===a[0]||a[0]&&st(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function ut(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const pt=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=ut(t),a=ut(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var dt="Invariant failed";function ft(e,t){if(!e)throw new Error(dt)}function ht(e){return"/"===e.charAt(0)?e:"/"+e}function mt(e){return"/"===e.charAt(0)?e.substr(1):e}function vt(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function gt(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function yt(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function bt(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,ot.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(Bn){throw Bn instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):Bn}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=ct(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function wt(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var kt=!("undefined"==typeof window||!window.document||!window.document.createElement);function _t(e,t){t(window.confirm(e))}var Et="popstate",St="hashchange";function xt(){try{return window.history.state||{}}catch(Bn){return{}}}function Ct(e){void 0===e&&(e={}),kt||ft(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,o=i.forceRefresh,s=void 0!==o&&o,l=i.getUserConfirmation,c=void 0===l?_t:l,u=i.keyLength,p=void 0===u?6:u,d=e.basename?gt(ht(e.basename)):"";function f(e){var t=e||{},n=t.key,r=t.state,a=window.location,i=a.pathname+a.search+a.hash;return d&&(i=vt(i,d)),bt(i,r,n)}function h(){return Math.random().toString(36).substr(2,p)}var m=wt();function v(e){(0,ot.Z)(T,e),T.length=n.length,m.notifyListeners(T.location,T.action)}function g(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||w(f(e.state))}function y(){w(f(xt()))}var b=!1;function w(e){if(b)b=!1,v();else{m.confirmTransitionTo(e,"POP",c,(function(t){t?v({action:"POP",location:e}):function(e){var t=T.location,n=_.indexOf(t.key);-1===n&&(n=0);var r=_.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(b=!0,S(a))}(e)}))}}var k=f(xt()),_=[k.key];function E(e){return d+yt(e)}function S(e){n.go(e)}var x=0;function C(e){1===(x+=e)&&1===e?(window.addEventListener(Et,g),a&&window.addEventListener(St,y)):0===x&&(window.removeEventListener(Et,g),a&&window.removeEventListener(St,y))}var M=!1;var T={length:n.length,action:"POP",location:k,createHref:E,push:function(e,t){var a="PUSH",i=bt(e,t,h(),T.location);m.confirmTransitionTo(i,a,c,(function(e){if(e){var t=E(i),o=i.key,l=i.state;if(r)if(n.pushState({key:o,state:l},null,t),s)window.location.href=t;else{var c=_.indexOf(T.location.key),u=_.slice(0,c+1);u.push(i.key),_=u,v({action:a,location:i})}else window.location.href=t}}))},replace:function(e,t){var a="REPLACE",i=bt(e,t,h(),T.location);m.confirmTransitionTo(i,a,c,(function(e){if(e){var t=E(i),o=i.key,l=i.state;if(r)if(n.replaceState({key:o,state:l},null,t),s)window.location.replace(t);else{var c=_.indexOf(T.location.key);-1!==c&&(_[c]=i.key),v({action:a,location:i})}else window.location.replace(t)}}))},go:S,goBack:function(){S(-1)},goForward:function(){S(1)},block:function(e){void 0===e&&(e=!1);var t=m.setPrompt(e);return M||(C(1),M=!0),function(){return M&&(M=!1,C(-1)),t()}},listen:function(e){var t=m.appendListener(e);return C(1),function(){C(-1),t()}}};return T}var Mt="hashchange",Tt={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+mt(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:mt,decodePath:ht},slash:{encodePath:ht,decodePath:ht}};function Pt(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function At(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function Ot(e){window.location.replace(Pt(window.location.href)+"#"+e)}function It(e){void 0===e&&(e={}),kt||ft(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?_t:r,i=n.hashType,o=void 0===i?"slash":i,s=e.basename?gt(ht(e.basename)):"",l=Tt[o],c=l.encodePath,u=l.decodePath;function p(){var e=u(At());return s&&(e=vt(e,s)),bt(e)}var d=wt();function f(e){(0,ot.Z)(x,e),x.length=t.length,d.notifyListeners(x.location,x.action)}var h=!1,m=null;function v(){var e=At(),t=c(e);if(e!==t)Ot(t);else{var n=p(),r=x.location;if(!h&&function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash}(r,n))return;if(m===yt(n))return;m=null,function(e){if(h)h=!1,f();else{var t="POP";d.confirmTransitionTo(e,t,a,(function(n){n?f({action:t,location:e}):function(e){var t=x.location,n=w.lastIndexOf(yt(t));-1===n&&(n=0);var r=w.lastIndexOf(yt(e));-1===r&&(r=0);var a=n-r;a&&(h=!0,k(a))}(e)}))}}(n)}}var g=At(),y=c(g);g!==y&&Ot(y);var b=p(),w=[yt(b)];function k(e){t.go(e)}var _=0;function E(e){1===(_+=e)&&1===e?window.addEventListener(Mt,v):0===_&&window.removeEventListener(Mt,v)}var S=!1;var x={length:t.length,action:"POP",location:b,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=Pt(window.location.href)),n+"#"+c(s+yt(e))},push:function(e,t){var n="PUSH",r=bt(e,void 0,void 0,x.location);d.confirmTransitionTo(r,n,a,(function(e){if(e){var t=yt(r),a=c(s+t);if(At()!==a){m=t,function(e){window.location.hash=e}(a);var i=w.lastIndexOf(yt(x.location)),o=w.slice(0,i+1);o.push(t),w=o,f({action:n,location:r})}else f()}}))},replace:function(e,t){var n="REPLACE",r=bt(e,void 0,void 0,x.location);d.confirmTransitionTo(r,n,a,(function(e){if(e){var t=yt(r),a=c(s+t);At()!==a&&(m=t,Ot(a));var i=w.indexOf(yt(x.location));-1!==i&&(w[i]=t),f({action:n,location:r})}}))},go:k,goBack:function(){k(-1)},goForward:function(){k(1)},block:function(e){void 0===e&&(e=!1);var t=d.setPrompt(e);return S||(E(1),S=!0),function(){return S&&(S=!1,E(-1)),t()}},listen:function(e){var t=d.appendListener(e);return E(1),function(){E(-1),t()}}};return x}function Nt(e,t,n){return Math.min(Math.max(e,t),n)}function Dt(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,a=void 0===r?["/"]:r,i=t.initialIndex,o=void 0===i?0:i,s=t.keyLength,l=void 0===s?6:s,c=wt();function u(e){(0,ot.Z)(v,e),v.length=v.entries.length,c.notifyListeners(v.location,v.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=Nt(o,0,a.length-1),f=a.map((function(e){return bt(e,void 0,"string"==typeof e?p():e.key||p())})),h=yt;function m(e){var t=Nt(v.index+e,0,v.entries.length-1),r=v.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?u({action:"POP",location:r,index:t}):u()}))}var v={length:f.length,action:"POP",location:f[d],index:d,entries:f,createHref:h,push:function(e,t){var r="PUSH",a=bt(e,t,p(),v.location);c.confirmTransitionTo(a,r,n,(function(e){if(e){var t=v.index+1,n=v.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),u({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=bt(e,t,p(),v.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(v.entries[v.index]=a,u({action:r,location:a}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(e){var t=v.index+e;return t>=0&&t<v.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return v}var zt=1073741823,Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window||"undefined"!=typeof window?window:{};function Rt(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var jt=f().createContext||function(e,t){var n,r,a="__create-react-context-"+function(){var e="__global_unique_id__";return Lt[e]=(Lt[e]||0)+1}()+"__",i=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=Rt(t.props.value),t}rt(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,a)?(n="function"==typeof t?t(r,a):zt,0!==(n|=0)&&this.emitter.set(e.value,n)):n=0}},r.render=function(){return this.props.children},n}(d.Component);i.childContextTypes=((n={})[a]=it().object.isRequired,n);var o=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}rt(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?zt:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?zt:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(d.Component);return o.contextTypes=((r={})[a]=it().object,r),{Provider:i,Consumer:o}};const Bt=jt;var Ft=n(4779),$t=n.n(Ft),Ht=(n(663),n(3366)),qt=function(e){var t=Bt();return t.displayName=e,t},Zt=qt("Router-History"),Vt=qt("Router"),Ut=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}rt(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return f().createElement(Vt.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},f().createElement(Zt.Provider,{children:this.props.children||null,value:this.props.history}))},t}(f().Component);var Gt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Dt(t.props),t}return rt(t,e),t.prototype.render=function(){return f().createElement(Ut,{history:this.history,children:this.props.children})},t}(f().Component);var Wt=function(e){function t(){return e.apply(this,arguments)||this}rt(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(f().Component);function Yt(e){var t=e.message,n=e.when,r=void 0===n||n;return f().createElement(Vt.Consumer,null,(function(e){if(e||ft(!1),!r||e.staticContext)return null;var n=e.history.block;return f().createElement(Wt,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var Xt={},Kt=0;function Qt(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(Xt[e])return Xt[e];var t=$t().compile(e);return Kt<1e4&&(Xt[e]=t,Kt++),t}(e)(t,{pretty:!0})}function Jt(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return f().createElement(Vt.Consumer,null,(function(e){e||ft(!1);var r=e.history,i=e.staticContext,o=a?r.push:r.replace,s=bt(t?"string"==typeof n?Qt(n,t.params):(0,ot.Z)({},n,{pathname:Qt(n.pathname,t.params)}):n);return i?(o(s),null):f().createElement(Wt,{onMount:function(){o(s)},onUpdate:function(e,t){var n=bt(t.to);(function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&pt(e.state,t.state)})(n,(0,ot.Z)({},s,{key:n.key}))||o(s)},to:n})}))}var en={},tn=0;function nn(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,i=void 0!==a&&a,o=n.strict,s=void 0!==o&&o,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=en[n]||(en[n]={});if(r[e])return r[e];var a=[],i={regexp:$t()(e,a,t),keys:a};return tn<1e4&&(r[e]=i,tn++),i}(n,{end:i,strict:s,sensitive:c}),a=r.regexp,o=r.keys,l=a.exec(e);if(!l)return null;var u=l[0],p=l.slice(1),d=e===u;return i&&!d?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:d,params:o.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var rn=function(e){function t(){return e.apply(this,arguments)||this}return rt(t,e),t.prototype.render=function(){var e=this;return f().createElement(Vt.Consumer,null,(function(t){t||ft(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?nn(n.pathname,e.props):t.match,a=(0,ot.Z)({},t,{location:n,match:r}),i=e.props,o=i.children,s=i.component,l=i.render;return Array.isArray(o)&&function(e){return 0===f().Children.count(e)}(o)&&(o=null),f().createElement(Vt.Provider,{value:a},a.match?o?"function"==typeof o?o(a):o:s?f().createElement(s,a):l?l(a):null:"function"==typeof o?o(a):null)}))},t}(f().Component);function an(e){return"/"===e.charAt(0)?e:"/"+e}function on(e,t){if(!e)return t;var n=an(e);return 0!==t.pathname.indexOf(n)?t:(0,ot.Z)({},t,{pathname:t.pathname.substr(n.length)})}function sn(e){return"string"==typeof e?e:yt(e)}function ln(e){return function(){ft(!1)}}function cn(){}var un=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return cn},t.handleBlock=function(){return cn},t}rt(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,i=n.context,o=void 0===i?{}:i;o.action=t,o.location=function(e,t){return e?(0,ot.Z)({},t,{pathname:an(e)+t.pathname}):t}(a,bt(e)),o.url=sn(o.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,a=void 0===r?{}:r,i=e.location,o=void 0===i?"/":i,s=(0,Ht.Z)(e,["basename","context","location"]),l={createHref:function(e){return an(n+sn(e))},action:"POP",location:on(n,bt(o)),push:this.handlePush,replace:this.handleReplace,go:ln(),goBack:ln(),goForward:ln(),listen:this.handleListen,block:this.handleBlock};return f().createElement(Ut,(0,ot.Z)({},s,{history:l,staticContext:a}))},t}(f().Component);var pn=function(e){function t(){return e.apply(this,arguments)||this}return rt(t,e),t.prototype.render=function(){var e=this;return f().createElement(Vt.Consumer,null,(function(t){t||ft(!1);var n,r,a=e.props.location||t.location;return f().Children.forEach(e.props.children,(function(e){if(null==r&&f().isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?nn(a.pathname,(0,ot.Z)({},e.props,{path:i})):t.match}})),r?f().cloneElement(n,{location:a,computedMatch:r}):null}))},t}(f().Component);function dn(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,Ht.Z)(t,["wrappedComponentRef"]);return f().createElement(Vt.Consumer,null,(function(t){return t||ft(!1),f().createElement(e,(0,ot.Z)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,Fe()(n,e)}var fn=f().useContext;function hn(){return fn(Zt)}function mn(){return fn(Vt).location}function vn(){var e=fn(Vt).match;return e?e.params:{}}function gn(e){var t=mn(),n=fn(Vt).match;return e?nn(t.pathname,e):n}var yn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Ct(t.props),t}return rt(t,e),t.prototype.render=function(){return f().createElement(Ut,{history:this.history,children:this.props.children})},t}(f().Component);var bn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=It(t.props),t}return rt(t,e),t.prototype.render=function(){return f().createElement(Ut,{history:this.history,children:this.props.children})},t}(f().Component);var wn=function(e,t){return"function"==typeof e?e(t):e},kn=function(e,t){return"string"==typeof e?bt(e,null,null,t):e},En=function(e){return e},Sn=f().forwardRef;void 0===Sn&&(Sn=En);var xn=Sn((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=(0,Ht.Z)(e,["innerRef","navigate","onClick"]),o=i.target,s=(0,ot.Z)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||o&&"_self"!==o||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return s.ref=En!==Sn&&t||n,f().createElement("a",s)}));var Cn=Sn((function(e,t){var n=e.component,r=void 0===n?xn:n,a=e.replace,i=e.to,o=e.innerRef,s=(0,Ht.Z)(e,["component","replace","to","innerRef"]);return f().createElement(Vt.Consumer,null,(function(e){e||ft(!1);var n=e.history,l=kn(wn(i,e.location),e.location),c=l?n.createHref(l):"",u=(0,ot.Z)({},s,{href:c,navigate:function(){var t=wn(i,e.location),r=yt(e.location)===yt(kn(t));(a||r?n.replace:n.push)(t)}});return En!==Sn?u.ref=t||o:u.innerRef=o,f().createElement(r,u)}))})),Mn=function(e){return e},Tn=f().forwardRef;void 0===Tn&&(Tn=Mn);var Pn=Tn((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,a=e.activeClassName,i=void 0===a?"active":a,o=e.activeStyle,s=e.className,l=e.exact,c=e.isActive,u=e.location,p=e.sensitive,d=e.strict,h=e.style,m=e.to,v=e.innerRef,g=(0,Ht.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return f().createElement(Vt.Consumer,null,(function(e){e||ft(!1);var n=u||e.location,a=kn(wn(m,n),n),y=a.pathname,b=y&&y.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?nn(n.pathname,{path:b,exact:l,sensitive:p,strict:d}):null,k=!!(c?c(w,n):w),_="function"==typeof s?s(k):s,E="function"==typeof h?h(k):h;k&&(_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(_,i),E=(0,ot.Z)({},E,o));var S=(0,ot.Z)({"aria-current":k&&r||null,className:_,style:E,to:a},g);return Mn!==Tn?S.ref=t||v:S.innerRef=v,f().createElement(Cn,S)}))}));const An=r,{useHistory:On}=An,In=e=>{let{href:t,onClick:n,...r}=e;const a=On(),[s,l]=(0,i.useState)(!1);return t&&n?r.onClick=async()=>{l(!0),await n(),l(!1),a.push(t.replace("#",""))}:(r.href=t,r.onClick=n),s&&(r.disabled=!0),qe(o.Button,{...r})};class Nn extends i.Component{render(){const{buttonsCard:e,className:t,headerActions:n,isNarrow:r,isMedium:a,isSmall:i,isWhite:o,noBorder:s,...l}=this.props;return qe("div",{className:p()("newspack-card",t,e&&"newspack-card__buttons-card",n&&"newspack-card__header-actions",a&&"newspack-card__is-medium",r&&"newspack-card__is-narrow",i&&"newspack-card__is-small",o&&"newspack-card__is-white",s&&"newspack-card__no-border"),...l})}}const Dn=Nn;class zn extends i.Component{constructor(e){super(e),(0,a.Z)(this,"state",{suggestions:{},allCategories:{},isLoading:!1}),(0,a.Z)(this,"handleOnChange",(e=>{const{onChange:t}=this.props,{suggestions:n}=this.state,r=e.filter((e=>void 0!==e)).map((e=>"string"==typeof e?n[e]:e)).filter(Boolean);t(r)})),(0,a.Z)(this,"getAvailableSuggestions",(()=>{const{value:e}=this.props,{suggestions:t}=this.state,n=e.reduce(((e,t)=>(t?.id&&e.push(t.id),e)),[]);return(0,Ge.filter)(t,(e=>{let{id:t}=e;return-1===n.indexOf(t)})).map((e=>e.name))})),this.debouncedUpdateSuggestions=(0,Ge.debounce)(this.updateSuggestions,100)}componentDidMount(){this.setState({isLoading:!0}),Ke()({path:(0,et.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{per_page:-1,_fields:"id,name"})}).then((e=>this.setState({allCategories:e}))).finally((()=>this.setState({isLoading:!1})))}componentWillUnmount(){this.debouncedUpdateSuggestions.cancel()}updateSuggestions(e){this.setState({isLoading:!0}),Ke()({path:(0,et.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((e=>{this.setState({suggestions:e.reduce(((e,t)=>({...e,[t.name]:t})),{})})})).finally((()=>this.setState({isLoading:!1})))}render(){const{className:e,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:a,label:i,value:s}=this.props,{allCategories:l,isLoading:c}=this.state;return Ze("div",{className:p()("newspack-category-autocomplete",e),children:[qe(br,{onInputChange:e=>this.debouncedUpdateSuggestions(e),value:s.reduce(((e,t)=>{const n="number"==typeof t?(0,Ge.find)(l,["id",t]):t;return n&&e.push({id:n.term_id||n.id,value:n.value||n.name}),e}),[]),suggestions:this.getAvailableSuggestions(),onChange:this.handleOnChange,label:i,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:a}),c?qe("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:qe(o.Spinner,{})}):null]})}}zn.defaultProps={taxonomy:"categories"};var Ln={grad:.9,turn:360,rad:360/(2*Math.PI)},Rn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},jn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Bn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Fn=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},$n=function(e){return{r:Bn(e.r,0,255),g:Bn(e.g,0,255),b:Bn(e.b,0,255),a:Bn(e.a)}},Hn=function(e){return{r:jn(e.r),g:jn(e.g),b:jn(e.b),a:jn(e.a,3)}},qn=/^#([0-9a-f]{3,8})$/i,Zn=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Vn=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,i=Math.max(t,n,r),o=i-Math.min(t,n,r),s=o?i===t?(n-r)/o:i===n?2+(r-t)/o:4+(t-n)/o:0;return{h:60*(s<0?s+6:s),s:i?o/i*100:0,v:i/255*100,a:a}},Un=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),o=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,o,o,l,r][c],g:255*[l,r,r,s,o,o][c],b:255*[o,o,l,r,r,s][c],a:a}},Gn=function(e){return{h:Fn(e.h),s:Bn(e.s,0,100),l:Bn(e.l,0,100),a:Bn(e.a)}},Wn=function(e){return{h:jn(e.h),s:jn(e.s),l:jn(e.l),a:jn(e.a,3)}},Yn=function(e){return Un((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Xn=function(e){return{h:(t=Vn(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},Kn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Jn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,er=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tr={string:[[function(e){var t=qn.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?jn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?jn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Jn.exec(e)||er.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:$n({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Kn.exec(e)||Qn.exec(e);if(!t)return null;var n,r,a=Gn({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Ln[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Yn(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,i=void 0===a?1:a;return Rn(t)&&Rn(n)&&Rn(r)?$n({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,i=void 0===a?1:a;if(!Rn(t)||!Rn(n)||!Rn(r))return null;var o=Gn({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return Yn(o)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,i=void 0===a?1:a;if(!Rn(t)||!Rn(n)||!Rn(r))return null;var o=function(e){return{h:Fn(e.h),s:Bn(e.s,0,100),v:Bn(e.v,0,100),a:Bn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Un(o)},"hsv"]]},nr=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},rr=function(e){return"string"==typeof e?nr(e.trim(),tr.string):"object"==typeof e&&null!==e?nr(e,tr.object):[null,void 0]},ar=function(e,t){var n=Xn(e);return{h:n.h,s:Bn(n.s+100*t,0,100),l:n.l,a:n.a}},ir=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},or=function(e,t){var n=Xn(e);return{h:n.h,s:n.s,l:Bn(n.l+100*t,0,100),a:n.a}},sr=function(){function e(e){this.parsed=rr(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return jn(ir(this.rgba),2)},e.prototype.isDark=function(){return ir(this.rgba)<.5},e.prototype.isLight=function(){return ir(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Hn(this.rgba)).r,n=e.g,r=e.b,i=(a=e.a)<1?Zn(jn(255*a)):"","#"+Zn(t)+Zn(n)+Zn(r)+i;var e,t,n,r,a,i},e.prototype.toRgb=function(){return Hn(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Hn(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return Wn(Xn(this.rgba))},e.prototype.toHslString=function(){return t=(e=Wn(Xn(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Vn(this.rgba),{h:jn(e.h),s:jn(e.s),v:jn(e.v),a:jn(e.a,3)};var e},e.prototype.invert=function(){return lr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),lr(ar(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),lr(ar(this.rgba,-e))},e.prototype.grayscale=function(){return lr(ar(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),lr(or(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),lr(or(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?lr({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):jn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Xn(this.rgba);return"number"==typeof e?lr({h:e,s:t.s,l:t.l,a:t.a}):jn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===lr(e).toHex()},e}(),lr=function(e){return e instanceof sr?e:new sr(e)},cr=[],ur=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},pr=function(e){return.2126*ur(e.r)+.7152*ur(e.g)+.0722*ur(e.b)};const{useHistory:dr}=An,fr=(e,t)=>{if((0,Ge.isArray)(e))return t},hr={usePrompt:(e,t)=>{const n=dr(),r=(0,i.useRef)(null),a=n=>{if(e)return void 0===n&&(n=window.event),n&&(n.returnValue=t),t};return(0,i.useEffect)((()=>(e&&(r.current=n.block(t),window.addEventListener("beforeunload",a)),()=>{r.current&&r.current(),window.removeEventListener("beforeunload",a)})),[t,e]),r.current},useObjectState:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,i.useState)(e),r=e=>n((t=>(0,Ge.mergeWith)({},t,e,fr))),a=e=>{if("string"==typeof e)return t=>r({[e]:t});r(e)};return[t,a]},useOnClickOutside:(e,t)=>{(0,i.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e,t])},useUniqueId:e=>(0,i.useRef)(`${e}-${Math.round(99999*Math.random())}`).current};var mr=n(9630);const vr={InteractiveDiv:e=>{let{style:t={},...n}=e;return qe("div",{tabIndex:"0",role:"button",onKeyDown:e=>mr.ENTER===e.keyCode&&n.onClick(),style:{cursor:"pointer",...t},...n})}};!function(e){e.forEach((function(e){cr.indexOf(e)<0&&(e(sr,tr),cr.push(e))}))}([function(e){e.prototype.luminance=function(){return e=pr(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,i,o,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,o=c.toRgb(),n=(s=pr(i))>(l=pr(o))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(o=void 0===(i=(n=t).size)?"normal":i,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===o?7:"AA"===a&&"large"===o?3:4.5);var n,r,a,i,o}}]);const{InteractiveDiv:gr}=vr;class yr extends i.Component{render(){const{className:e,description:t,hideHelpFromVision:n,hideLabelFromVision:r,...a}=this.props,i=p()("newspack-form-token-field__input-container",e);return Ze("div",{className:p()({"newspack-form-token-field--label-hidden":r,"newspack-form-token-field--help-hidden":n},"newspack-form-token-field"),children:[qe(o.FormTokenField,{className:i,...a}),t&&qe("p",{className:"newspack-form-token-field__help",children:t})]})}}const br=yr,wr=Je.__,kr=e=>{let{simple:t}=e;const{components_demo:n=!1,support:r=!1,setup_wizard:a=!1,reset_url:i=!1,plugin_version:s={label:"Newspack"},remove_starter_content:l=!1,support_email:c}=window.newspack_urls||{},u=[{label:s.label,url:"https://newspack.pub/category/release-notes/",external:!0},{label:wr("About","newspack"),url:"https://newspack.pub/",external:!0},{label:wr("Documentation","newspack"),url:r,external:!0}];return n&&u.push({label:wr("Components Demo","newspack"),url:n}),a&&u.push({label:wr("Setup Wizard","newspack"),url:a}),i&&u.push({label:wr("Reset Newspack","newspack"),url:i}),l&&u.push({label:wr("Remove Starter Content","newspack"),url:l}),c&&u.push({label:wr("Contact Support","newspack"),url:`mailto:${c}`}),Ze("div",{className:"newspack-footer",children:[!t&&qe("div",{className:"newspack-footer__inner",children:qe("ul",{children:u.map(((e,t)=>{let{url:n,label:r,external:a}=e;return qe("li",{children:qe(a?o.ExternalLink:"a",{href:n,children:r})},t)}))})}),qe("div",{className:"newspack-footer__logo",children:qe(Hr,{})})]})},_r=Je.__;class Er extends i.Component{constructor(){super(...arguments),(0,a.Z)(this,"componentDidMount",(()=>{this._isMounted=!0;const{plugin:e}=this.props;this.retrievePluginInfo(e)})),(0,a.Z)(this,"componentWillUnmount",(()=>{this._isMounted=!1})),(0,a.Z)(this,"retrievePluginInfo",(e=>{const{onReady:t}=this.props;Ke()({path:"/newspack/v1/plugins/"+e}).then((e=>{this._isMounted&&(t(e),this.setState({pluginInfo:e}))}))})),(0,a.Z)(this,"textForPlugin",(e=>{const t={modalBody:null,modalTitle:e.Name&&`${_r("Manage","newspack")} ${e.Name}`,primaryButton:e.Name&&`${_r("Manage","newspack")} ${e.Name}`,primaryModalButton:_r("Manage","newspack"),dismissModalButton:_r("Dismiss","newspack")};return(0,Ge.assign)(t,this.props)})),(0,a.Z)(this,"goToPlugin",(e=>{const{editLink:t,showOnBlockEditor:n}=this.props;Ke()({path:"/newspack/v1/plugins/"+e+"/handoff",method:"POST",data:{editLink:t,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!n}}).then((e=>{window.location.href=e.HandoffLink}))})),this.state={pluginInfo:[],showModal:!1}}render(){const{className:e,children:t,compact:n,useModal:r,modalTitle:a,modalBody:o,onReady:s,editLink:l,...c}=this.props,{pluginInfo:u,showModal:d}=this.state,{modalBody:f,modalTitle:h,primaryButton:m,primaryModalButton:v,dismissModalButton:g}=this.textForPlugin(u),{Configured:y,Name:b,Slug:w,Status:k}=u,_=p()(y&&"is-configured",e);return Ze(i.Fragment,{children:[b&&"active"===k&&qe(In,{className:_,isSecondary:!c.isPrimary&&!c.isTertiary&&!c.isLink,...c,onClick:()=>r?this.setState({showModal:!0}):this.goToPlugin(w),children:t||m}),b&&"active"!==k&&qe(In,{className:_,variant:"secondary",disabled:!0,...c,children:b+_r(" not installed","newspack")}),!b&&qe(In,{className:_,isSecondary:!c.isPrimary&&!c.isTertiary&&!c.isLink,...c,children:Ze(i.Fragment,{children:[!n&&qe(ba,{isLeft:!0}),_r("Retrieving Plugin Info","newspack")]})}),d&&Ze(Or,{title:h,onRequestClose:()=>this.setState({showModal:!1}),children:[qe("p",{children:f}),Ze(Dn,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[qe(In,{variant:"secondary",onClick:()=>this.setState({showModal:!1}),children:g}),qe(In,{variant:"primary",onClick:()=>this.goToPlugin(w),children:v})]})]})]})}}Er.defaultProps={onReady:()=>{}};const Sr=Er,xr=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));class Cr extends i.Component{render(){const{className:e,...t}=this.props;return qe(o.Tooltip,{...t,children:qe("span",{className:p()("newspack-info-button",e),children:qe(s.Z,{icon:xr})})})}}const Mr=Cr;n(6644);class Tr extends i.Component{render(){const{className:e,columns:t,gutter:n,noMargin:r,rowGap:a,...i}=this.props;return qe("div",{className:p()("newspack-grid",r&&"newspack-grid--no-margin",t&&"newspack-grid__columns-"+t,n&&"newspack-grid__gutter-"+n,a&&"newspack-grid__row-gap-"+a,e),...i})}}Tr.defaultProps={columns:2,gutter:32,rowGap:null};const Pr=Tr;class Ar extends i.Component{render(){const{className:e,isWide:t,isNarrow:n,...r}=this.props,a=p()("newspack-modal",t&&"newspack-modal--wide",n&&"newspack-modal--narrow",e);return qe(o.Modal,{className:a,...r})}}const Or=Ar;class Ir extends i.Component{render(){const{className:e,simple:t,size:n,white:r}=this.props,a=p()("newspack-icon",t&&"newspack-icon--simple",r&&"newspack-icon--white",e);return qe(o.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,width:n,viewBox:"0 0 32 32",className:a,children:qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16c0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16S7.164 0 16 0s16 7.164 16 16zm-10.732.622h1.72v-1.124h-2.823l1.103 1.124zm-3.249-3.31h4.97v-1.124h-6.072l1.102 1.124zm-3.248-3.31h8.217V8.877h-9.32l1.103 1.125zM9.01 8.877l13.977 14.246h-4.66l-5.866-5.98v5.98h-3.45V8.877z"})})}}Ir.defaultProps={size:32};const Nr=Ir;class Dr extends i.Component{render(){const{centered:e,className:t,height:n}=this.props,r=p()("newspack-logo__svg",e&&"is-centered",t);return qe(o.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,viewBox:"0 0 221 64",className:r,children:qe(o.Path,{d:"M32 0c17.672 0 32 14.328 32 32S49.672 64 32 64C14.326 64 0 49.672 0 32S14.328 0 32 0zm130.57 27.247c3.611 0 6.475 2.521 6.475 7.974 0 5.417-3.134 8.995-8.314 8.995-1.262 0-2.248-.172-3.305-.376v8.551h-4.022V27.67h3.85v1.486c1.534-1.191 3.237-1.908 5.316-1.908zM18.023 17.755v28.49h6.902V34.287l11.733 11.958h9.319l-27.954-28.49zm178.552 9.495c2.009 0 3.219.34 4.581.784v3.407c-1.158-.444-2.878-.921-4.513-.921-2.453 0-4.532 1.294-4.532 5.076 0 4.156 2.077 5.383 4.736 5.387 1.262 0 2.676-.273 4.516-.99v3.34c-1.636.544-3.118.92-5.025.92-6.033 0-8.417-3.442-8.417-8.45 0-5.283 3.305-8.553 8.654-8.553zm-18.195-.003c3.919 0 6.44 1.567 6.435 6.235V43.84h-3.747v-1.771h-.103c-1.327 1.022-2.93 2.079-5.314 2.079-2.112 0-4.36-1.534-4.36-4.6 0-4.133 3.545-4.912 5.997-5.252l3.51-.477v-.47c0-2.181-.886-2.897-2.93-2.897-.989 0-3.338.305-5.28 1.09l-.341-3.237c1.738-.614 4.123-1.058 6.133-1.058zm-73.55-.12c5.145 0 6.951 3.579 6.951 6.987 0 .936-.047 1.518-.102 2.06l-.034.325h-10.358c.101 3.542 2.106 4.36 5.104 4.36 1.637 0 3.158-.372 4.845-.991v3.342c-2.093.644-3.89.921-5.968.921-5.141 0-8.308-2.556-8.308-8.586 0-4.398 2.69-8.417 7.87-8.417zm39.998 0c1.771 0 3.305.172 4.804.614v3.338s-2.188-.714-4.497-.714c-1.43 0-2.76.477-2.76 1.703 0 2.725 8.042 1.262 8.04 6.883 0 4.053-3.611 5.178-7.394 5.178-1.738 0-3.487-.467-4.736-.958v-3.305c1.5.52 3.578 1.026 4.873 1.026 1.84 0 3.1-.374 3.1-1.771 0-2.829-8.04-1.33-8.04-7.156 0-2.998 2.724-4.837 6.61-4.837zm64.01-6.114v13.63c.34-.376.615-.785 5.657-6.952h5.213l-6.543 7.666 7.156 8.485h-5.248l-6.235-7.665v7.665h-4.02v-22.83h4.02zm-127.634 0l8.633 15.263V21.013h4.022v22.83h-4.416L80.81 28.578v15.263h-4.021v-22.83h4.416zm36.758 6.678l2.476 11.469 2.801-11.469h3.572l2.438 11.469 2.75-11.469h4.038l-4.54 16.151h-4.83l-1.714-9.495-2.325 9.495h-4.814l-4.268-16.15h4.416zm62.836 8.616l-3.305.512c-.987.136-2.044.732-2.044 2.231 0 1.322.75 2.067 1.84 2.067 1.157 0 2.452-.716 3.509-1.466v-3.344zm-19.318-5.752c-1.193 0-2.657.545-4.054 1.771v8.415c.885.17 1.77.306 2.997.306 2.829 0 4.464-1.805 4.464-5.517 0-3.476-1.158-4.975-3.407-4.975zm-56.685-.394c-2.009 0-3.235 1.43-3.475 3.678h6.268c0-1.975-.646-3.678-2.793-3.678zm-58.818.836H40.33l2.205 2.248h3.442v-2.248zm0-6.621H33.833l2.205 2.248h9.939v-2.248zm0-6.621h-18.64l2.204 2.248h16.436v-2.248z"})})}}Dr.defaultProps={height:56};const zr=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.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"})),Lr=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z",fillRule:"evenodd",clipRule:"evenodd"})),Rr=Je.__;class jr extends i.Component{render(){const{className:e,debugMode:t,isError:n,isHelp:r,isSuccess:a,isWarning:o,noticeText:l,rawHTML:u,style:d={},children:f=null}=this.props,h=p()("newspack-notice",e,t&&"newspack-notice__is-debug",n&&"newspack-notice__is-error",r&&"newspack-notice__is-help",a&&"newspack-notice__is-success",o&&"newspack-notice__is-warning");let m;return m=r?zr:a?c:t?Lr:xr,Ze("div",{className:h,style:d,children:[qe(s.Z,{icon:m}),Ze("div",{className:"newspack-notice__content",children:[u?qe(i.RawHTML,{children:l}):l,t&&Rr("Debug Mode","newspack"),f||null]})]})}}const Br=jr,Fr=Je.__;class $r extends i.Component{constructor(){super(...arguments),(0,a.Z)(this,"render",(()=>Ze(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"219",height:"16",viewBox:"0 0 438 32",className:"patrons-logo","aria-label":Fr("A project of WordPress.com and the Google News Initiative","newspack"),children:[qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M0 16C0 7.179 7.146 0 15.93 0c8.784 0 15.93 7.178 15.93 16 0 8.823-7.146 16-15.93 16C7.145 32 0 24.823 0 16zm27.506-.271L23.13 28.435a14.349 14.349 0 005.214-5.263 14.424 14.424 0 001.906-7.171 14.36 14.36 0 00-1.754-6.902c.062.458.097.95.097 1.477 0 1.461-.271 3.102-1.088 5.153zM18.96 9.177c-.291.027-.665.057-1.056.077l5.177 15.463 1.427-4.792c.728-1.87 1.09-3.42 1.09-4.653 0-1.775-.635-3.007-1.179-3.964l-.154-.25-.014-.022c-.66-1.071-1.239-2.008-1.239-3.105 0-1.32.997-2.55 2.404-2.55.052 0 .1.004.148.008l.037.003a14.226 14.226 0 00-9.672-3.777 14.26 14.26 0 00-6.797 1.723 14.334 14.334 0 00-5.167 4.76c.337.01.654.019.922.019 1.497 0 3.817-.185 3.817-.185.772-.046.863 1.095.093 1.186 0 0-.234.028-.589.06-.291.026-.663.056-1.053.076l5.214 15.582 3.135-9.44-2.23-6.14a26.784 26.784 0 01-1.502-.138c-.772-.047-.681-1.23.091-1.186 0 0 2.364.185 3.771.185 1.498 0 3.818-.185 3.818-.185.772-.046.863 1.095.09 1.186 0 0-.23.027-.582.06zm-7.076 20.624a14.282 14.282 0 008.803-.23 1.188 1.188 0 01-.103-.199l-4.402-12.115-4.298 12.544zM2.846 10.145a14.434 14.434 0 00.945 13.493 14.345 14.345 0 005.888 5.308l-6.833-18.8z"}),qe(o.Path,{d:"M56.125 8.758l-3.172 12.258-3.178-12.258h-3.209l.747 2.626-2.797 10.047L41.48 8.758h-3.087l4.334 16.01h3.362l2.596-8.56 2.431 8.56h3.361l4.549-16.01h-2.9zM151.302 24.767h-2.818v-2.915h2.818v2.915z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M64.38 13.13c-3.878 0-5.71 2.509-5.71 5.973 0 3.465 1.832 5.95 5.71 5.95 3.854 0 5.71-2.485 5.71-5.95 0-3.464-1.856-5.973-5.71-5.973zm0 9.654c-1.833 0-2.807-1.194-2.807-3.681 0-2.461.974-3.68 2.807-3.68 1.83 0 2.783 1.196 2.783 3.68 0 2.462-.953 3.68-2.783 3.68zM86.344 13.13c.69 0 1.285.096 2.117.262V8.756h2.807v16.01h-2.663v-1.052c-.906.767-2.404 1.34-3.64 1.34-2.5 0-4.616-1.745-4.616-5.52 0-3.798 2.117-6.404 5.995-6.404zm-.548 9.654c.904 0 1.76-.455 2.665-1.29v-5.758a5.2 5.2 0 00-1.83-.36c-2.144 0-3.38 1.362-3.38 3.968 0 2.411 1 3.44 2.545 3.44zM99.941 8.758h-5.199v16.01h2.998v-5.57h2.201c3.403 0 5.879-1.84 5.879-5.28 0-3.466-2.476-5.16-5.879-5.16zm.024 8.1H97.74v-5.734h2.225c1.809 0 2.713 1.003 2.713 2.795 0 1.768-.834 2.938-2.713 2.938zM115.57 19.032c0-3.083 1.879-5.902 5.496-5.902 3.593 0 4.854 2.509 4.854 4.9 0 .767-.046 1.195-.092 1.636l-.004.035h-7.232c.072 2.487 1.47 3.059 3.564 3.059 1.141 0 2.204-.262 3.383-.697v2.344c-1.463.453-2.718.646-4.169.646-3.588 0-5.8-1.79-5.8-6.02zm5.472-3.775c-1.403 0-2.26 1.002-2.426 2.581h4.377c0-1.387-.453-2.582-1.951-2.582z"}),qe(o.Path,{d:"M130.798 16.595c0-.861.926-1.196 1.925-1.196 1.613 0 3.14.504 3.14.504v-2.344c-1.047-.31-2.117-.43-3.353-.43-2.712 0-4.615 1.29-4.615 3.394 0 2.408 1.95 3.032 3.551 3.544 1.116.357 2.063.66 2.063 1.474 0 .98-.88 1.241-2.164 1.241-.906 0-2.357-.352-3.402-.717v2.316c.871.345 2.093.672 3.306.672 2.641 0 5.161-.787 5.161-3.63 0-2.325-1.95-2.922-3.552-3.412-1.114-.342-2.06-.631-2.06-1.416z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M164.046 19.103c0-3.464 1.833-5.971 5.711-5.971 3.853 0 5.71 2.507 5.71 5.97 0 3.466-1.857 5.951-5.71 5.951-3.878 0-5.711-2.485-5.711-5.95zm2.904 0c0 2.487.974 3.679 2.807 3.679 1.832 0 2.783-1.217 2.783-3.68 0-2.483-.951-3.678-2.783-3.678-1.833 0-2.807 1.218-2.807 3.679z"}),qe(o.Path,{d:"M191.528 13.132c-1.213 0-2.592.667-3.855 1.504l-.333.215c-.594-1.268-1.784-1.721-3.092-1.721-1.213 0-2.592.62-3.854 1.458v-1.172h-2.664v11.351h2.831V16.62c1.047-.692 2.165-1.123 2.973-1.123.927 0 1.498.5 1.498 2.102v7.17h2.807v-8.126c1.049-.693 2.167-1.146 2.975-1.146.927 0 1.498.5 1.498 2.102v7.17h2.809V16.93c0-2.2-1.309-3.798-3.593-3.798zM110.191 15.28h.095c.786-1.41 1.832-2.005 3.354-2.005.357 0 .762.046.762.046v2.461h-.285c-1.784 0-2.855.552-3.735 2.223v6.762h-2.807V13.416h2.616v1.865zM75.066 15.28h-.095v-1.864h-2.618v11.351h2.809v-6.762c.88-1.671 1.95-2.223 3.733-2.223h.287v-2.46s-.405-.047-.762-.047c-1.522 0-2.568.596-3.354 2.006zM158.983 15.424c-1.712 0-3.164.908-3.164 3.562 0 2.912 1.452 3.774 3.308 3.774.881 0 1.867-.192 3.151-.693v2.34c-1.14.383-2.176.648-3.507.648-4.213 0-5.877-2.416-5.877-5.928 0-3.703 2.306-5.997 6.043-5.997 1.403 0 2.248.24 3.2.55v2.388c-.81-.31-2.011-.644-3.154-.644zM141.016 16.595c0-.861.926-1.196 1.926-1.196 1.611 0 3.14.504 3.14.504v-2.344c-1.046-.31-2.117-.43-3.356-.43-2.711 0-4.615 1.29-4.615 3.394 0 2.408 1.95 3.032 3.552 3.544 1.116.357 2.063.66 2.063 1.474 0 .98-.88 1.241-2.165 1.241-.904 0-2.354-.352-3.401-.717v2.316c.87.345 2.094.672 3.307.672 2.642 0 5.161-.787 5.161-3.63 0-2.325-1.951-2.922-3.552-3.412-1.115-.342-2.06-.631-2.06-1.416zM300.756 24.617V8.443h2.523l7.837 12.582h.092l-.092-3.117V8.443h2.069v16.174h-2.162l-8.198-13.194h-.088l.088 3.118v10.076h-2.069z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M318.835 24.585c.704.288 1.461.42 2.22.39v-.016a5.175 5.175 0 003.041-.866 5 5 0 001.776-2.158l-1.845-.768c-.527 1.262-1.532 1.899-3.02 1.899a3.36 3.36 0 01-2.396-.98 3.775 3.775 0 01-1.118-2.642h8.73l.024-.381a6.096 6.096 0 00-1.463-4.292 5.095 5.095 0 00-3.953-1.586 4.923 4.923 0 00-3.904 1.742 6.116 6.116 0 00-1.517 4.155 5.926 5.926 0 001.566 4.223 5.302 5.302 0 001.859 1.28zm4.324-8.66c.49.485.797 1.125.868 1.811l-6.397.015a3.654 3.654 0 011.161-1.958 2.925 2.925 0 011.991-.724 3.098 3.098 0 012.377.857z"}),qe(o.Path,{d:"M339.793 24.617h-2.117l-2.748-8.496-2.722 8.496h-2.099l-3.557-11.07h2.162l2.454 8.359h.025l2.722-8.359h2.143l2.722 8.359h.025l2.43-8.359h2.118l-3.558 11.07zM345.498 24.069c.889.63 1.961.949 3.049.905v-.024a4.768 4.768 0 003.128-.979 3.073 3.073 0 001.22-2.481 2.987 2.987 0 00-.746-1.987 4.102 4.102 0 00-2.299-1.243l-2.181-.519c-.976-.23-1.464-.655-1.464-1.287a1.18 1.18 0 01.63-1.042 2.92 2.92 0 011.551-.382c1.276 0 2.117.49 2.523 1.468l1.806-.749a3.774 3.774 0 00-1.645-1.908 5.16 5.16 0 00-2.615-.666 5.214 5.214 0 00-3.074.916 2.787 2.787 0 00-1.294 2.383 2.49 2.49 0 00.947 2.045 5.298 5.298 0 002.006 1.028l2.225.543c1.008.261 1.512.75 1.512 1.468a1.312 1.312 0 01-.619 1.13 2.717 2.717 0 01-1.591.431 3.039 3.039 0 01-2.991-2.08l-1.85.769a5.333 5.333 0 001.772 2.26zM362.084 8.443h-2.074v16.17h2.074V8.442zM366.895 15.084v-1.537h-1.991v11.07h2.069v-6.122a3.726 3.726 0 01.815-2.383 2.55 2.55 0 012.093-1.028c1.815 0 2.723 1.024 2.723 3.073v6.46h2.084v-6.778a5.026 5.026 0 00-1.084-3.386 3.9 3.9 0 00-3.127-1.268 4.127 4.127 0 00-2.074.553 3.713 3.713 0 00-1.42 1.346h-.088zM379.094 10.768a1.414 1.414 0 01-1.039.43 1.396 1.396 0 01-1.035-.43 1.47 1.47 0 011.598-2.397 1.47 1.47 0 01.476 2.397zM379.094 24.617h-2.074v-11.07h2.074v11.07zM384.709 24.642c.457.157.942.209 1.421.151a4.17 4.17 0 001.664-.293l-.717-1.782c-.299.128-.622.19-.947.181-.992 0-1.488-.602-1.488-1.806v-5.647h2.703v-1.899h-2.703v-3.386h-2.074v3.386h-1.952v1.9h1.952v5.803a3.22 3.22 0 00.927 2.635c.343.34.758.6 1.214.757zM391.278 10.768a1.465 1.465 0 01-2.076.007 1.474 1.474 0 01.468-2.401 1.458 1.458 0 011.596.316 1.475 1.475 0 01.003 2.078h.009zM391.269 24.617h-2.074v-11.07h2.074v11.07z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M394.24 23.961a4.356 4.356 0 002.928 1.018l.025.01a4.055 4.055 0 003.625-1.899h.088v1.522h1.952v-6.68a4.459 4.459 0 00-1.362-3.509 5.1 5.1 0 00-3.513-1.243 4.837 4.837 0 00-2.976.847 4.306 4.306 0 00-1.508 1.84l1.893.817c.18-.5.536-.917 1-1.174a3.152 3.152 0 011.635-.43 2.993 2.993 0 012.05.733c.276.243.494.545.637.884.144.339.21.706.192 1.074v.318a5.84 5.84 0 00-3.006-.68 5.645 5.645 0 00-3.445 1.027 3.323 3.323 0 00-1.4 2.834 3.385 3.385 0 001.185 2.692zm5.583-1.85a3.383 3.383 0 01-2.333.98 2.776 2.776 0 01-1.586-.49 1.467 1.467 0 01-.673-1.282 1.966 1.966 0 01.771-1.537 3.409 3.409 0 012.274-.656 4.045 4.045 0 012.63.724 2.99 2.99 0 01-1.083 2.261z"}),qe(o.Path,{d:"M409.533 24.793a3.19 3.19 0 01-2.631-.91 3.207 3.207 0 01-.926-2.633v-5.804h-1.952v-1.899h1.952v-3.386h2.069v3.386h2.703v1.9h-2.703v5.646c0 1.204.496 1.806 1.488 1.806.325.008.648-.053.947-.18l.717 1.78a4.17 4.17 0 01-1.664.294zM414.072 11.135a1.47 1.47 0 00-.43-2.873 1.462 1.462 0 00-1.454 1.327 1.468 1.468 0 001.884 1.546zM412.617 24.617h2.064l.01-11.07h-2.074v11.07zM420.459 24.617l-4.455-11.07h2.249l3.245 8.584h.044l3.289-8.584h2.205l-4.503 11.07h-2.074z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M430.621 24.58a5.31 5.31 0 002.213.394v-.015a5.173 5.173 0 003.04-.866 4.972 4.972 0 001.781-2.158l-1.845-.768c-.527 1.262-1.532 1.899-3.02 1.899a3.353 3.353 0 01-2.396-.98 3.742 3.742 0 01-1.118-2.642h8.691l.024-.381a6.076 6.076 0 00-1.464-4.292 5.063 5.063 0 00-3.903-1.586 4.926 4.926 0 00-3.904 1.742 6.097 6.097 0 00-1.513 4.155 5.934 5.934 0 001.562 4.223c.52.553 1.151.987 1.852 1.275zm4.321-8.654c.49.484.797 1.124.868 1.81l-6.397.015a3.676 3.676 0 011.156-1.957 2.968 2.968 0 011.996-.725 3.12 3.12 0 012.377.857zM276.919 23.82V13.21l-2.454-.005v.979h-.088a4.086 4.086 0 00-3.104-1.317c-2.947 0-5.645 2.594-5.645 5.931a5.882 5.882 0 001.64 4.08 5.847 5.847 0 004.005 1.793 4 4 0 003.104-1.346h.088v.847c0 2.26-1.196 3.47-3.148 3.47a3.262 3.262 0 01-2.967-2.104l-2.254.944a5.634 5.634 0 002.079 2.546 5.61 5.61 0 003.142.948c3.035 0 5.602-1.791 5.602-6.157zm-5.421-8.643c1.761 0 3.147 1.522 3.147 3.607 0 2.055-1.361 3.557-3.147 3.557-1.786 0-3.279-1.473-3.279-3.557 0-2.085 1.517-3.607 3.279-3.607z"}),qe(o.Path,{d:"M226.063 24.034a9.134 9.134 0 003.568.637c2.737 0 4.747-.905 6.397-2.57 1.649-1.663 2.166-3.993 2.166-5.872a7.91 7.91 0 00-.136-1.566h-8.427v2.506h5.982a5.262 5.262 0 01-1.361 3.156 6.128 6.128 0 01-4.621 1.835 6.64 6.64 0 01-4.703-1.953 6.677 6.677 0 01-1.948-4.717c0-1.769.7-3.465 1.948-4.716a6.64 6.64 0 014.703-1.954 6.368 6.368 0 014.523 1.791l1.747-1.766a8.686 8.686 0 00-6.27-2.53 9.132 9.132 0 00-6.61 2.611 9.2 9.2 0 000 13.133 9.158 9.158 0 003.042 1.975z"}),qe(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M250.189 21.972a5.832 5.832 0 001.019-3.213 5.801 5.801 0 00-1.661-4.182 5.76 5.76 0 00-4.146-1.724c-1.145 0-2.264.34-3.217.976a5.833 5.833 0 00-.917 8.936 5.792 5.792 0 008.922-.793zm-4.788-6.795c1.752 0 3.265 1.458 3.265 3.582 0 2.114-1.508 3.582-3.265 3.582-1.756 0-3.264-1.468-3.264-3.582s1.513-3.582 3.264-3.582zM293.646 22.048l-2.01-1.341a3.374 3.374 0 01-2.899 1.634 2.995 2.995 0 01-2.859-1.79l7.881-3.27-.269-.67c-.493-1.312-2.01-3.759-5.045-3.759s-5.475 2.394-5.475 5.907c0 3.313 2.415 5.912 5.767 5.912a5.843 5.843 0 004.909-2.623zm-2.923-5.662l-5.27 2.197a3.258 3.258 0 01.817-2.374 3.228 3.228 0 012.263-1.076 2.285 2.285 0 012.19 1.253zM264.227 18.76a5.839 5.839 0 01-1.018 3.212 5.813 5.813 0 01-2.623 2.108 5.792 5.792 0 01-6.3-1.315 5.841 5.841 0 01-1.222-6.336 5.82 5.82 0 012.139-2.6 5.796 5.796 0 013.217-.976 5.75 5.75 0 014.148 1.723 5.791 5.791 0 011.659 4.183zm-2.542 0c0-2.125-1.513-3.583-3.265-3.583-1.751 0-3.264 1.468-3.264 3.582s1.508 3.582 3.264 3.582c1.757 0 3.265-1.468 3.265-3.582z"}),qe(o.Path,{d:"M281.457 6.941h-2.591v17.373h2.591V6.94z"})]})))}}const Hr=$r,qr=Je.__;class Zr extends i.Component{constructor(){var e;super(...arguments),e=this,(0,a.Z)(this,"componentDidMount",(()=>{const{plugins:e}=this.props;this.retrievePluginInfo(e).then((()=>{this.props.autoInstall&&this.installAllPlugins()}))})),(0,a.Z)(this,"componentDidUpdate",(e=>{const{autoInstall:t,plugins:n}=this.props,{installationInitialized:r}=this.state;n!==e.plugins&&this.retrievePluginInfo(n),t&&!r&&this.installAllPlugins()})),(0,a.Z)(this,"retrievePluginInfo",(e=>new Promise((t=>{Ke()({path:"/newspack/v1/plugins/"}).then((n=>{const r=Object.keys(n).reduce(((t,r)=>(-1===e.indexOf(r)||(t[r]={...n[r],installationStatus:"active"===n[r].Status?1:0}),t)),{});this.updatePluginInfo(r).then((()=>t()))}))})))),(0,a.Z)(this,"installAllPlugins",(()=>{const{pluginInfo:e}=this.state;this.setState({installationInitialized:!0});Object.keys(e).filter((t=>"active"!==e[t].Status)).map((e=>()=>this.installPlugin(e))).reduce(((e,t)=>e.then((e=>t().then(Array.prototype.concat.bind(e))))),Promise.resolve([]))})),(0,a.Z)(this,"installPlugin",(e=>{this.setInstallationStatus(e,2);const t={path:`/newspack/v1/plugins/${e}/configure/`,method:"post"};return Ke()(t).then((t=>{const{pluginInfo:n}=this.state;this.props.onInstalled(e),this.updatePluginInfo({...n,[e]:{...t,installationStatus:1}})})).catch((t=>{this.setInstallationStatus(e,3,t.message)}))})),(0,a.Z)(this,"setChecked",((e,t)=>{const{pluginInfo:n}=this.state;this.updatePluginInfo({...n,[e]:{...n[e],checked:t}})})),(0,a.Z)(this,"setInstallationStatus",(function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{pluginInfo:a}=e.state;e.updatePluginInfo({...a,[t]:{...a[t],installationStatus:n,notification:r}})})),(0,a.Z)(this,"updatePluginInfo",(e=>new Promise((t=>{const{onStatus:n}=this.props;this.setState({pluginInfo:e},(()=>{const r=Object.values(e).every((e=>"active"===e.Status));n({complete:r,pluginInfo:e}),t()}))})))),(0,a.Z)(this,"classForInstallationStatus",(e=>{switch(e){case 1:return"newspack-plugin-installer__status-active";case 2:return"newspack-plugin-installer__status-installing";case 3:return"newspack-plugin-installer__status-error";default:return"newspack-plugin-installer__status-none"}})),this.state={pluginInfo:{},installationInitialized:!1}}render(){const{autoInstall:e,isSmall:t,withoutFooterButton:n}=this.props,{pluginInfo:r}=this.state,a=Object.keys(r),i=[];a.forEach((e=>{const t=r[e];i.push(t.Status)}));const o=i.every((e=>"active"===e||"inactive"===e))?qr("Activate","newspack"):qr("Install","newspack"),l=a.some((e=>{const t=r[e];return"active"!==t.Status&&0===t.installationStatus}));return Ze(He,{children:[(!r||!Object.keys(r).length)&&Ze("div",{className:"newspack-plugin-installer_is-waiting",children:[qe(ba,{isLeft:!0}),qr("Retrieving plugin information…")]}),r&&a.length>0&&a.map((e=>{const n=r[e],{Name:a,Description:i,Status:o,installationStatus:l,notification:u}=n,d=2===l,f=!d&&"active"!==o;let h;2===l?h=qr("Installing…"):"uninstalled"===o?h=Ze("span",{className:"newspack-plugin-installer__status",children:[qr("Install","newspack"),qe("span",{className:"newspack-checkbox-icon"})]}):"inactive"===o?h=Ze("span",{className:"newspack-plugin-installer__status",children:[qr("Activate","newspack"),qe("span",{className:"newspack-checkbox-icon"})]}):"active"===o&&(h=Ze("span",{className:"newspack-plugin-installer__status",children:[qr("Installed","newspack"),qe("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:qe(s.Z,{icon:c})})]}));const m=p()("newspack-action-card__plugin-installer",this.classForInstallationStatus(l));return qe(Ue,{title:a,description:i,actionText:h,isSmall:t,isWaiting:d,onClick:f?()=>this.installPlugin(e):null,notification:u,notificationLevel:"error",notificationHTML:!0,className:m},e)})),!n&&!e&&r&&a.length>0&&qe("div",{className:"newspack-buttons-card",children:qe(In,{disabled:!l,isPrimary:!0,onClick:this.installAllPlugins,children:o})})]})}}Zr.defaultProps={onStatus:()=>{},onInstalled:()=>{}};const Vr=Zr;var Ur=n(2694);const Gr=Je.__,Wr=e=>Array.isArray(e.options)&&e.options.length,Yr=e=>{switch(e.type){case"int":case"integer":case"float":case"number":return"number";case"string":case"text":return"text";case"password":return"password";case"boolean":case"checkbox":return"checkbox";default:return null}},Xr=e=>{const{error:t,sectionKey:n,active:r,title:a,description:s,fields:l,disabled:c,onChange:u,onUpdate:p}=e,d=e=>({disabled:c,name:`${e.section}_${e.key}`,type:Yr(e),label:e.description,help:e.help||null,options:e.options?.map((e=>({value:e.value,label:e.name||e.label})))||null,value:e.value,multiple:!(!Wr(e)||!e.multiple)||null,checked:"boolean"===e.type?!!e.value:null,onChange:t=>{u(e.key,t)}}),f=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,Ur.applyFilters)(`newspack.settingSection.${n}.${t}`,r,e)};let h=2;return l.length%3==0?h=3:1===l.length&&(h=1),qe(Ue,{isMedium:!0,disabled:c,title:a,description:s,toggleChecked:r,hasGreyHeader:r||null===r,toggleOnChange:null!==r?e=>p({active:e}):null,actionContent:(r||null===r)&&f("buttons",qe(In,{variant:"primary",disabled:c,onClick:()=>{p()},children:Gr("Save Settings","newspack")})),children:(r||null===r)&&Ze(i.Fragment,{children:[t?.message&&qe(Br,{noticeText:t.message,isError:!0}),f("beforeControls"),qe(Pr,{columns:h,gutter:32,children:l.map((e=>{const t=(e=>{if(Wr(e))return la;switch(e.type){case"checkbox":case"boolean":return o.CheckboxControl;default:return ga}})(e);return(0,Ur.applyFilters)(`newspack.settingsSection.${n}.control`,qe(t,{...d(e)},e.key),{sectionKey:n,setting:e,onChange:u})}))})]})})},Kr=Je.__;class Qr extends i.Component{constructor(){super(...arguments),(0,a.Z)(this,"fetchSettings",(()=>{const{afterFetch:e,pluginSlug:t,isWizard:n}=this.props;this.setState({inFlight:!0}),Ke()({path:n?`/newspack/v1/wizard/${t}/settings`:`/${t}/v1/settings`}).then((t=>{this.setState({settings:t,error:null}),"function"==typeof e&&e(t)})).catch((e=>{this.setState({error:e})})).finally((()=>{this.setState({inFlight:!1})}))})),(0,a.Z)(this,"getSettingsValues",(e=>this.state.settings[e]?.reduce(((e,t)=>(e[t.key]=t.value,e)),{})||{})),(0,a.Z)(this,"handleSettingChange",(e=>(t,n)=>{const r=[...this.state.settings[e]];r.forEach((e=>{e.key===t&&(e.value=n)})),this.setState({settings:{...this.state.settings,[e]:r}})})),(0,a.Z)(this,"handleSectionUpdate",(e=>t=>{const{afterUpdate:n,pluginSlug:r,isWizard:a}=this.props;this.setState({inFlight:!0}),Ke()({path:a?`/newspack/v1/wizard/${r}/settings`:`/${r}/v1/settings`,method:"POST",data:{section:e,settings:t||this.getSettingsValues(e)}}).then((e=>{this.setState({settings:e,error:null}),"function"==typeof n&&n(e)})).catch((e=>{this.setState({error:e})})).finally((()=>{this.setState({inFlight:!1})}))})),(0,a.Z)(this,"getSectionInfo",(e=>this.state.settings[e]?.find((e=>!e.key||"active"===e.key)))),(0,a.Z)(this,"getSectionTitle",(e=>this.getSectionInfo(e)?.description)),(0,a.Z)(this,"getSectionDescription",(e=>this.getSectionInfo(e)?.help)),(0,a.Z)(this,"isSectionActive",(e=>{const{settings:t}=this.state,n=t[e]?.find((e=>"active"===e.key));return n?n.value:null})),(0,a.Z)(this,"getSectionFields",(e=>this.state.settings[e]?.filter((e=>e.key&&"active"!==e.key)))),this.state={inFlight:!1,settings:{},error:null}}componentDidMount(){this.fetchSettings()}render(){const{title:e,description:t,hasGreyHeader:n,children:r}=this.props,{settings:a,inFlight:o,error:s}=this.state;return Ze(i.Fragment,{children:[e&&qe(na,{title:e,description:t}),s&&qe(Br,{isError:!0,noticeText:s.message}),Ze("div",{className:p()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":o&&!Object.keys(a).length}),children:[Object.keys(a).map((e=>qe(Xr,{disabled:o,sectionKey:e,title:this.getSectionTitle(e),description:this.getSectionDescription(e),active:this.isSectionActive(e),fields:this.getSectionFields(e),onChange:this.handleSettingChange(e),onUpdate:this.handleSectionUpdate(e),hasGreyHeader:n},e))),r]})]})}}Qr.defaultProps={title:Kr("General Settings","newspack")},Qr.Section=Xr;class Jr extends i.Component{render(){const{className:e,padding:t,...n}=this.props,r=p()("newspack-popover",t&&"newspack-popover__padding-"+t,e);return qe(o.Popover,{className:r,...n})}}Jr.defaultProps={padding:!1};const ea=Jr;const ta=e=>{let{centered:t,className:n,description:r,heading:a,isWhite:i,noMargin:o,title:s}=e;const l=p()("newspack-section-header",t&&"newspack-section-header--is-centered",i&&"newspack-section-header--is-white",o&&"newspack-section-header--no-margin",n),c=`h${a}`;return Ze(Pr,{columns:1,gutter:8,className:l,children:["string"==typeof s&&qe(c,{children:s}),"function"==typeof s&&qe(c,{children:s()}),"string"==typeof r&&qe("p",{children:r}),"function"==typeof r&&qe("p",{children:r()})]})};ta.defaultProps={heading:2};const na=ta;var ra=n(3904);const aa=Je.__;function ia(e){let{help:t,label:n,onChange:r,optgroups:a=[],className:i,hideLabelFromVision:l,...c}=e;const u=hr.useUniqueId("group-select");return qe(o.BaseControl,{label:n,hideLabelFromVision:l,id:u,help:t,className:p()(i,"components-select-control"),children:Ze("div",{className:"relative",children:[Ze("select",{id:u,className:"components-select-control__input",onChange:e=>{const{value:t}=e.target,n=(0,Ge.find)(a,(e=>(0,Ge.some)(e.options,["value",t])));r(t,n)},"aria-describedby":t?`${u}__help`:void 0,...c,children:[qe("option",{value:"",children:aa("-- Select --","newspack")}),a.map(((e,t)=>{let{label:n,options:r}=e;return qe("optgroup",{label:n,children:r.map(((e,t)=>qe("option",{value:e.value,disabled:e.disabled,children:e.label},`${e.label}-${e.value}-${t}`)))},t)}))]}),qe("div",{className:"components-select-control__arrow-wrapper",children:qe(s.Z,{icon:ra.Z,size:18})})]})})}const oa=e=>{let{buttonOptions:t,className:n,hideLabelFromVision:r,label:a,onChange:i,value:l}=e;const c=hr.useUniqueId("button-group");return qe(o.BaseControl,{label:a,hideLabelFromVision:r,id:c.current,className:p()(n,"components-select-control"),children:qe(o.ButtonGroup,{children:t.map((e=>{const t=l===e.value;let n=()=>e.label;return e.icon&&(n=()=>qe(s.Z,{icon:e.icon})),qe(o.Button,{variant:t?"primary":null,onClick:()=>i(e.value),children:qe(n,{})},e.value)}))})})};class sa extends i.Component{render(){const{className:e,optgroups:t,buttonOptions:n,...r}=this.props;return qe("div",{className:p()("newspack-select-control",t&&"newspack-grouped-select-control",n&&"newspack-buttons-select-control",e),children:t?qe(ia,{optgroups:t,...r}):n?qe(oa,{buttonOptions:n,...r}):qe(o.SelectControl,{...r})})}}const la=sa;n(2073);var ca=n(6292),ua=n.n(ca);(0,n(3542).extendMoment)(ua());const pa=e=>{let{children:t,className:n,columns:r,gutter:a,noBorder:i,rowGap:o,...s}=e;const l=p()("newspack-settings__card",i&&"newspack-settings__no-border",n);return qe(Ue,{...s,className:l,notificationLevel:"info",noBorder:i,children:qe(Pr,{columns:r,gutter:a,rowGap:o,children:t})})};pa.defaultProps={columns:3,gutter:32};Je.__;const{NavLink:da,useHistory:fa}=An,ha=e=>{let{items:t,className:n,disableUpcoming:r}=e;const{location:a}=fa(),i=(0,Ge.findIndex)(t,["path",a.pathname]);return qe("div",{className:p()("newspack-tabbed-navigation",n),children:qe("ul",{children:t.map(((e,t)=>qe("li",{children:qe(da,{to:e.path,exact:!0,activeClassName:"selected",className:p()({disabled:r&&t>i}),children:e.label})},t)))})})},ma=Je.__;class va extends i.Component{constructor(e){super(e),this.wrapperRef=(0,i.createRef)()}componentDidMount(){if(this.wrapperRef.current){const e=this.wrapperRef.current.querySelector("label");e&&e.setAttribute("data-required-text",ma("(required)","newspack"))}}render(){const{className:e,required:t,isWide:n,withMargin:r=!0,...a}=this.props,i=p()("newspack-text-control",{"newspack-text-control--wide":n},{"newspack-text-control--with-margin":r},e);return t?qe("div",{ref:this.wrapperRef,className:"newspack-text-control--required",children:qe(o.TextControl,{className:i,required:t,...a})}):qe(o.TextControl,{className:i,...a})}}const ga=va;class ya extends i.Component{render(){const{className:e,isRight:t,isLeft:n,isCenter:r,...a}=this.props,i=p()("newspack-waiting",e,{"is-right":t,"is-left":n,"is-center":r});return qe(o.Spinner,{className:i,...a})}}const ba=ya,wa=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),ka=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})),_a=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),Ea=(0,i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(l.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Sa=Je.__,xa="newspack-components-web-preview-wrapper";class Ca extends i.Component{constructor(e){super(e),(0,a.Z)(this,"state",{device:"desktop",loaded:!1,isPreviewVisible:!1}),(0,a.Z)(this,"getWebPreviewModal",(()=>{const{beforeLoad:e=(()=>{}),onClose:t=(()=>{}),url:n}=this.props,{device:r,loaded:a,isPreviewVisible:s}=this.state;if(!this.modalDOMElement||!s)return null;const l=p()("newspack-web-preview",r,a&&"is-loaded");return e(),(0,i.createPortal)(qe("div",{className:l,children:Ze("div",{className:"newspack-web-preview__interior",children:[Ze("div",{className:"newspack-web-preview__toolbar",children:[qe("div",{className:"newspack-web-preview__toolbar-left",children:Ze(o.ButtonGroup,{children:[qe(o.Button,{onClick:()=>this.setState({device:"desktop"}),variant:"desktop"===r&&"primary",icon:wa,label:Sa("Preview Desktop Size","newspack")}),qe(o.Button,{onClick:()=>this.setState({device:"tablet"}),variant:"tablet"===r&&"primary",icon:ka,label:Sa("Preview Tablet Size","newspack")}),qe(o.Button,{onClick:()=>this.setState({device:"phone"}),variant:"phone"===r&&"primary",icon:_a,label:Sa("Preview Phone Size","newspack")})]})}),qe("div",{className:"newspack-web-preview__toolbar-right",children:qe(o.Button,{onClick:()=>{t(),this.setState({isPreviewVisible:!1,loaded:!1})},icon:Ea,label:Sa("Close Preview","newspack")})})]}),Ze("div",{className:"newspack-web-preview__content",children:[!a&&Ze("div",{className:"newspack-web-preview__is-waiting",children:[qe(ba,{isLeft:!0}),Sa("Loading…","newspack")]}),qe("iframe",{ref:this.iframeRef,title:"web-preview",src:n,onLoad:()=>{this.setState({loaded:!0}),this.props.onLoad(this.iframeRef.current)}})]})]})}),this.modalDOMElement)})),(0,a.Z)(this,"showPreview",(()=>{this.setState({isPreviewVisible:!0})})),this.iframeRef=(0,i.createRef)()}componentDidMount(){const e=document.getElementById(xa);this.modalDOMElement=e||document.createElement("div"),e||(this.modalDOMElement.id=xa,document.body.appendChild(this.modalDOMElement))}componentDidUpdate(){!0===this.state.isPreviewVisible?document.body.classList.add("newspack-web-preview--open"):document.body.classList.remove("newspack-web-preview--open")}render(){const{label:e,variant:t,renderButton:n}=this.props;return Ze(i.Fragment,{children:[n?n({showPreview:this.showPreview}):qe(o.Button,{variant:t,onClick:this.showPreview,tabIndex:"0",children:e}),this.getWebPreviewModal()]})}}Ca.defaultProps={url:"//newspack.pub",label:Sa("Preview","newspack"),onLoad:()=>{}};var Ma=n(9818);const Ta=(0,i.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)(l.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Pa=e=>t=>({type:e,payload:t}),Aa="newspack/wizards",Oa={isLoading:!0,isQuietLoading:!1,apiData:{},error:null},Ia=e=>JSON.parse(JSON.stringify(e)),Na={startLoadingData:Pa("START_LOADING_DATA"),finishLoadingData:Pa("FINISH_LOADING_DATA"),fetchFromAPI:Pa("FETCH_FROM_API"),setAPIDataForWizard:Pa("SET_API_DATA"),updateWizardSettings:Pa("UPDATE_WIZARD_SETTINGS"),setError:Pa("SET_ERROR"),*saveWizardSettings(e){let{slug:t,section:n="",payloadPath:r=!1,updatePayload:a=null}=e;a&&(yield Na.updateWizardSettings({slug:t,...a}));const i=(0,Ma.select)(Aa).getWizardAPIData(t),o=yield Na.fetchFromAPI({path:`/newspack/v1/wizard/${t}/${n}`,method:"POST",data:r?(0,Ge.get)(i,r):i,isQuietFetch:!0});if(!(0,Ge.isEmpty)(o))return Na.setAPIDataForWizard({slug:t,data:o})},*wizardApiFetch(e){return yield Na.fetchFromAPI(e)}},Da=(0,Ma.createReduxStore)(Aa,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oa,{type:t,payload:n={}}=arguments.length>1?arguments[1]:void 0;switch(t){case"START_LOADING_DATA":return n.isQuietLoading?{...e,isQuietLoading:!0}:{...e,isLoading:!0};case"FINISH_LOADING_DATA":return{...e,isLoading:!1,isQuietLoading:!1};case"SET_API_DATA":return(0,Ge.set)(Ia(e),["apiData",n.slug],n.data);case"UPDATE_WIZARD_SETTINGS":return(0,Ge.set)(Ia(e),["apiData",n.slug,...n.path],n.value);case"SET_ERROR":return{...e,error:n};default:return e}},actions:Na,selectors:{isLoading:e=>e.isLoading,isQuietLoading:e=>e.isQuietLoading,getWizardAPIData:(e,t)=>e.apiData[t]||{},getError:e=>e.error},controls:{FETCH_FROM_API:e=>((0,Ma.dispatch)(Aa).startLoadingData({isQuietLoading:Boolean(e.payload.isQuietFetch)}),Ke()(e.payload).catch((e=>((0,Ma.dispatch)(Aa).setError(e),{error:e}))).finally((e=>((0,Ma.dispatch)(Aa).finishLoadingData(),e))))},resolvers:{*getWizardAPIData(e){if(e){const t=yield Na.fetchFromAPI({path:`/newspack/v1/wizard/${e}`});return Na.setAPIDataForWizard({slug:e,data:t})}return Na.finishLoadingData()}}}),za=Je.__,La=()=>{const e=(0,Ma.useSelect)((e=>e(Aa).getError()));if(!e)return null;const{level:t,message:n}=(e=>{let{data:t,message:n,code:r}=e,a="fatal";return t&&"level"in t?a=t.level:"rest_invalid_param"===r&&(a="notice"),{message:n,level:a}})(e);if("fatal"===t){const e="undefined"!=typeof newspack_urls&&newspack_urls.dashboard;return Ze(Or,{title:za("Unrecoverable error"),onRequestClose:e?()=>window.location=e:void 0,children:[qe(Br,{noticeText:n,isError:!0,rawHTML:!0}),e&&qe(Dn,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:qe(In,{isPrimary:!0,href:e,children:za("Return to Dashboard","newspack")})})]})}return qe(Br,{isError:!0,className:"newspack-wizard__above-header",noticeText:n,rawHTML:!0})},Ra=Je.__;(0,Ma.register)(Da);const{HashRouter:ja,Redirect:Ba,Route:Fa,Switch:$a}=An,Ha=e=>{let{sections:t=[],apiSlug:n,headerText:r,subHeaderText:a,hasSimpleFooter:o,className:s,renderAboveSections:l,requiredPlugins:c=[]}=e;const u=(0,Ma.useSelect)((e=>e(Aa).isLoading())),d=(0,Ma.useSelect)((e=>e(Aa).isQuietLoading()));(0,Ma.useSelect)((e=>e(Aa).getWizardAPIData(n)));let f=t.filter((e=>!e.isHidden));const[h,m]=(0,i.useState)(0===c.length);return h||(r=c.length>1?Ra("Required plugins","newspack"):Ra("Required plugin","newspack"),f=[{path:"/",render:()=>qe(Vr,{plugins:c,onStatus:e=>{let{complete:t}=e;return m(t)}})}]),Ze(He,{children:[qe(La,{}),qe("div",{className:p()(u?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":d}),children:Ze(ja,{hashType:"slash",children:[newspack_aux_data.is_debug_mode&&qe(Br,{debugMode:!0}),qe("div",{className:"bg-white",children:qe("div",{className:"newspack-wizard__header__inner",children:Ze("div",{className:"newspack-wizard__title",children:[qe(In,{isLink:!0,href:newspack_urls.dashboard,label:Ra("Return to Dashboard","newspack"),showTooltip:!0,icon:Ta,iconSize:36,children:qe(Nr,{size:36})}),Ze("div",{children:[r&&qe("h2",{children:r}),a&&qe("span",{children:a})]})]})})}),f.length>1&&qe(ha,{items:f}),Ze($a,{children:[f.map(((e,t)=>{const n=e.render;return qe(Fa,{path:e.path,children:Ze("div",{className:p()("newspack-wizard newspack-wizard__content",s),children:["function"==typeof l?l():null,qe(n,{})]})},t)})),qe(Ba,{to:f[0].path})]})]})}),!u&&qe(kr,{simple:o})]})};Ha.useWizardData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Ma.useSelect)((t=>t(Aa).getWizardAPIData(`newspack-${e}-wizard`)))||t},Ha.STORE_NAMESPACE=Aa;const{Redirect:qa,Route:Za}=An},6018:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},6644:(e,t,n)=>{"use strict";var r=n(1763),a=n(115),i=n(6018);e.exports={formats:i,parse:a,stringify:r}},115:(e,t,n)=>{"use strict";var r=n(8046),a=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var p=0;n.depth>0&&null!==(s=o.exec(i))&&p<n.depth;){if(p+=1,!n.plainObjects&&a.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var a=r?t:l(t,n),i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s&&n.parseArrays)o=[].concat(a);else{o=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[])[u]=a:o[c]=a:o={0:a}}a=o}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,p),f=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var m,v,g=d[n],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1;-1===b?(m=t.decoder(g,o.decoder,h,"key"),v=t.strictNullHandling?null:""):(m=t.decoder(g.slice(0,b),o.decoder,h,"key"),v=r.maybeMap(l(g.slice(b+1),t),(function(e){return t.decoder(e,o.decoder,h,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===h&&(v=s(v)),g.indexOf("[]=")>-1&&(v=i(v)?[v]:v),a.call(c,m)?c[m]=r.combine(c[m],v):c[m]=v}return c}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(u),f=0;f<d.length;++f){var h=d[f],m=c(h,u[h],n,"string"==typeof e);p=r.merge(p,m,n)}return!0===n.allowSparse?p:r.compact(p)}},1763:(e,t,n)=>{"use strict";var r=n(7478),a=n(8046),i=n(6018),o=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},p=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h=function e(t,n,i,o,s,c,p,d,h,m,v,g,y,b,w){var k,_=t;if(w.has(t))throw new RangeError("Cyclic object value");if("function"==typeof p?_=p(n,_):_ instanceof Date?_=m(_):"comma"===i&&l(_)&&(_=a.maybeMap(_,(function(e){return e instanceof Date?m(e):e}))),null===_){if(o)return c&&!y?c(n,f.encoder,b,"key",v):n;_=""}if("string"==typeof(k=_)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||a.isBuffer(_))return c?[g(y?n:c(n,f.encoder,b,"key",v))+"="+g(c(_,f.encoder,b,"value",v))]:[g(n)+"="+g(String(_))];var E,S=[];if(void 0===_)return S;if("comma"===i&&l(_))E=[{value:_.length>0?_.join(",")||null:void 0}];else if(l(p))E=p;else{var x=Object.keys(_);E=d?x.sort(d):x}for(var C=0;C<E.length;++C){var M=E[C],T="object"==typeof M&&void 0!==M.value?M.value:_[M];if(!s||null!==T){var P=l(_)?"function"==typeof i?i(n,M):n:n+(h?"."+M:"["+M+"]");w.set(t,!0);var A=r();u(S,e(T,P,i,o,s,c,p,d,h,m,v,g,y,b,A))}}return S};e.exports=function(e,t){var n,a=e,c=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!o.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],a=f.filter;return("function"==typeof e.filter||l(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof c.filter?a=(0,c.filter)("",a):l(c.filter)&&(n=c.filter);var p,d=[];if("object"!=typeof a||null===a)return"";p=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=s[p];n||(n=Object.keys(a)),c.sort&&n.sort(c.sort);for(var v=r(),g=0;g<n.length;++g){var y=n[g];c.skipNulls&&null===a[y]||u(d,h(a[y],y,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,v))}var b=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),b.length>0?w+b:""}},8046:(e,t,n)=>{"use strict";var r=n(6018),a=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var a=t[r],o=a.obj[a.prop],s=Object.keys(o),l=0;l<s.length;++l){var c=s[l],u=o[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:o,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)void 0!==n[a]&&r.push(n[a]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(a){return r}},encode:function(e,t,n,a,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<s.length;++c){var u=s.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=o[u]:u<2048?l+=o[192|u>>6]+o[128|63&u]:u<55296||u>=57344?l+=o[224|u>>12]+o[128|u>>6&63]+o[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(a.call(t,i)){var o=t[i];o&&"object"==typeof o&&n&&"object"==typeof n?t[i]=e(o,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var o=n[i];return a.call(t,i)?t[i]=e(t[i],o,r):t[i]=o,t}),o)}}},2073:(e,t,n)=>{"use strict";var r=b(n(9196)),a=b(n(5697)),i=b(n(2555)),o=b(n(1891)),s=b(n(3393)),l=b(n(614)),c=b(n(6060)),u=b(n(8088)),p=b(n(2699)),d=b(n(5353)),f=b(n(1013)),h=b(n(4595)),m=b(n(5352)),v=b(n(6935)),g=n(6380),y=b(n(6781));function b(e){return e&&e.__esModule?e:{default:e}}var w=(0,o.default)(new Date(-432e13)).startOf("day"),k=(0,o.default)(new Date(432e13)).startOf("day");function _(){}(0,i.default)({mixins:[c.default,y.default],displayName:"DateRangePicker",propTypes:{bemBlock:a.default.string,bemNamespace:a.default.string,className:a.default.string,dateStates:a.default.array,defaultState:a.default.string,disableNavigation:a.default.bool,firstOfWeek:a.default.oneOf([0,1,2,3,4,5,6]),helpMessage:a.default.string,initialDate:a.default.instanceOf(Date),initialFromValue:a.default.bool,initialMonth:a.default.number,initialRange:a.default.object,initialYear:a.default.number,locale:a.default.string,maximumDate:a.default.instanceOf(Date),minimumDate:a.default.instanceOf(Date),numberOfCalendars:a.default.number,onHighlightDate:a.default.func,onHighlightRange:a.default.func,onSelect:a.default.func,onSelectStart:a.default.func,paginationArrowComponent:a.default.func,selectedLabel:a.default.string,selectionType:a.default.oneOf(["single","range"]),singleDateRange:a.default.bool,showLegend:a.default.bool,stateDefinitions:a.default.object,value:u.default.momentOrMomentRange},getDefaultProps:function(){var e=new Date;return{bemNamespace:null,bemBlock:"DateRangePicker",className:"",numberOfCalendars:1,firstOfWeek:0,disableNavigation:!1,nextLabel:"",previousLabel:"",initialDate:new Date(e.getFullYear(),e.getMonth(),e.getDate()),initialFromValue:!0,locale:(0,o.default)().locale(),selectionType:"range",singleDateRange:!1,stateDefinitions:{__default:{color:null,selectable:!0,label:null}},selectedLabel:"Your selected dates",defaultState:"__default",dateStates:[],showLegend:!1,onSelect:_,paginationArrowComponent:h.default}},componentWillReceiveProps:function(e){var t=this.getDateStates(e),n=this.getEnabledRange(e),r={selectedStartDate:null,hideSelection:!1,dateStates:this.state.dateStates&&s.default.is(this.state.dateStates,t)?this.state.dateStates:t,enabledRange:this.state.enabledRange&&this.state.enabledRange.isSame(n)?this.state.enabledRange:n};if((0,v.default)(this.props,e)&&(!e.value||!this.isStartOrEndVisible(e))){var a=(0,g.getYearMonthProps)(e);r.year=a.year,r.month=a.month}this.setState(r)},getInitialState:function(){var e=new Date,t=this.props,n=t.initialYear,r=t.initialMonth,a=t.initialFromValue,i=t.value,s=e.getFullYear(),l=e.getMonth();if(Number.isInteger(n)&&Number.isInteger(r)&&(s=n,l=r),a&&(o.default.isMoment(i)||(0,m.default)(i))){var c=(0,g.getYearMonthProps)(this.props);l=c.month,s=c.year}return{year:s,month:l,selectedStartDate:null,highlightedDate:null,highlightRange:null,hideSelection:!1,enabledRange:this.getEnabledRange(this.props),dateStates:this.getDateStates(this.props)}},getEnabledRange:function(e){var t=e.minimumDate?(0,o.default)(e.minimumDate).startOf("day"):w,n=e.maximumDate?(0,o.default)(e.maximumDate).startOf("day"):k;return o.default.range(t,n)},getDateStates:function(e){var t=e.dateStates,n=e.defaultState,r=e.stateDefinitions,a=[],i=w,l=k,c=(0,o.default)(i).startOf("day"),u=s.default.fromJS(r);return t.forEach((function(e){var t=e.range,r=t.start.startOf("day"),i=t.end.startOf("day");c.isSame(r,"day")||a.push({state:n,range:o.default.range(c,r)}),a.push(e),c=i})),a.push({state:n,range:o.default.range(c,l)}),s.default.List(a).map((function(e){var t=u.get(e.state);return s.default.Map({range:e.range,state:e.state,selectable:t.get("selectable",!0),color:t.get("color")})}))},isDateDisabled:function(e){return!this.state.enabledRange.contains(e)},isDateSelectable:function(e){return this.dateRangesForDate(e).some((function(e){return e.get("selectable")}))},nonSelectableStateRanges:function(){return this.state.dateStates.filter((function(e){return!e.get("selectable")}))},dateRangesForDate:function(e){return this.state.dateStates.filter((function(t){return t.get("range").contains(e)}))},sanitizeRange:function(e,t){var n=this.nonSelectableStateRanges().map((function(e){return e.get("range")})),r=void 0;if(t){if(r=n.find((function(t){return e.intersect(t)})))return o.default.range(e.start,r.start)}else if(r=n.findLast((function(t){return e.intersect(t)})))return o.default.range(r.end,e.end);return e.start.isBefore(this.state.enabledRange.start)?o.default.range(this.state.enabledRange.start,e.end):e.end.isAfter(this.state.enabledRange.end)?o.default.range(e.start,this.state.enabledRange.end):e},highlightRange:function(e){this.setState({highlightedRange:e,highlightedDate:null}),"function"==typeof this.props.onHighlightRange&&this.props.onHighlightRange(e,this.statesForRange(e))},onUnHighlightDate:function(){this.setState({highlightedDate:null})},onSelectDate:function(e){var t=this.props.selectionType,n=this.state.selectedStartDate;"range"===t?n?this.completeRangeSelection():e&&!this.isDateDisabled(e)&&this.isDateSelectable(e)&&(this.startRangeSelection(e),this.props.singleDateRange&&this.highlightRange(o.default.range(e,e))):!this.isDateDisabled(e)&&this.isDateSelectable(e)&&this.completeSelection()},onHighlightDate:function(e){var t=this.props.selectionType,n=this.state.selectedStartDate,r=void 0,a=void 0,i=void 0;"range"===t&&n?(r=s.default.List.of(n,e).sortBy((function(e){return e.unix()})),i=(a=o.default.range(r.get(0),r.get(1))).start.unix()===n.unix(),a=this.sanitizeRange(a,i),this.highlightRange(a)):!this.isDateDisabled(e)&&this.isDateSelectable(e)&&this.highlightDate(e)},startRangeSelection:function(e){this.setState({hideSelection:!0,selectedStartDate:e}),"function"==typeof this.props.onSelectStart&&this.props.onSelectStart((0,o.default)(e))},statesForDate:function(e){return this.state.dateStates.filter((function(t){return e.within(t.get("range"))})).map((function(e){return e.get("state")}))},statesForRange:function(e){return e.start.isSame(e.end,"day")?this.statesForDate(e.start):this.state.dateStates.filter((function(t){return t.get("range").intersect(e)})).map((function(e){return e.get("state")}))},completeSelection:function(){var e=this.state.highlightedDate;e&&(this.setState({hideSelection:!1,highlightedDate:null}),this.props.onSelect(e,this.statesForDate(e)))},completeRangeSelection:function(){var e=this.state.highlightedRange;!e||e.start.isSame(e.end,"day")&&!this.props.singleDateRange||(this.setState({selectedStartDate:null,highlightedRange:null,highlightedDate:null,hideSelection:!1}),this.props.onSelect(e,this.statesForRange(e)))},highlightDate:function(e){this.setState({highlightedDate:e}),"function"==typeof this.props.onHighlightDate&&this.props.onHighlightDate(e,this.statesForDate(e))},getMonthDate:function(){return(0,o.default)(new Date(this.state.year,this.state.month,1))},isStartOrEndVisible:function(e){var t=this,n=e.value,r=e.selectionType,a=e.numberOfCalendars,i=function(e){var n=(0,g.getYearMonth)(e),r=n.year===t.state.year,i=n.month===t.state.month||2===a&&n.month-1===t.state.month;return r&&i};return"single"===r?i(n):i(n.start)||i(n.end)},canMoveBack:function(){return!this.getMonthDate().subtract(1,"days").isBefore(this.state.enabledRange.start)},moveBack:function(){var e=void 0;this.canMoveBack()&&((e=this.getMonthDate()).subtract(1,"months"),this.setState((0,g.getYearMonth)(e)))},canMoveForward:function(){return!this.getMonthDate().add(this.props.numberOfCalendars,"months").isAfter(this.state.enabledRange.end)},moveForward:function(){var e=void 0;this.canMoveForward()&&((e=this.getMonthDate()).add(1,"months"),this.setState((0,g.getYearMonth)(e)))},changeYear:function(e){var t=this.state,n=t.enabledRange,r=t.month;(0,o.default)({years:e,months:r,date:1}).unix()<n.start.unix()&&(r=n.start.month()),(0,o.default)({years:e,months:r+1,date:1}).unix()>n.end.unix()&&(r=n.end.month()),this.setState({year:e,month:r})},changeMonth:function(e){this.setState({month:e})},rangesOverlap:function(e,t){return!!(e.overlaps(t)||e.contains(t.start)||e.contains(t.end))},renderCalendar:function(e){var t,n=this.props,a=n.bemBlock,i=n.bemNamespace,c=n.firstOfWeek,u=n.numberOfCalendars,p=n.selectionType,h=n.value,v=this.state,g=v.dateStates,y=v.enabledRange,b=v.hideSelection,w=v.highlightedDate,k=v.highlightedRange,_=this.getMonthDate(),E=e+"-"+_.year()+"-"+_.month();_.add(e,"months");var S=new l.default.Calendar(c),x=s.default.fromJS(S.monthDates(_.year(),_.month())),C=x.first().first(),M=x.last().last(),T=o.default.range(C,M);return(o.default.isMoment(h)&&!T.contains(h)||(0,m.default)(h)&&!this.rangesOverlap(T,h))&&(h=null),o.default.isMoment(w)&&T.contains(w)||(w=null),(0,m.default)(k)&&this.rangesOverlap(T,k)||(k=null),t={bemBlock:a,bemNamespace:i,dateStates:g,enabledRange:y,firstOfWeek:c,hideSelection:b,highlightedDate:w,highlightedRange:k,index:e,key:E,selectionType:p,value:h,maxIndex:u-1,firstOfMonth:_,onMonthChange:this.changeMonth,onYearChange:this.changeYear,onSelectDate:this.onSelectDate,onHighlightDate:this.onHighlightDate,onUnHighlightDate:this.onUnHighlightDate,dateRangesForDate:this.dateRangesForDate,dateComponent:f.default,locale:this.props.locale},r.default.createElement(d.default,t)},render:function(){var e=this.props,t=e.paginationArrowComponent,n=e.className,a=e.numberOfCalendars,i=e.stateDefinitions,o=e.selectedLabel,l=e.showLegend,c=e.helpMessage,u=s.default.Range(0,a).map(this.renderCalendar);return n=this.cx({element:null})+" "+n,r.default.createElement("div",{className:n.trim()},r.default.createElement(t,{direction:"previous",onTrigger:this.moveBack,disabled:!this.canMoveBack()}),u.toJS(),r.default.createElement(t,{direction:"next",onTrigger:this.moveForward,disabled:!this.canMoveForward()}),c?r.default.createElement("span",{className:this.cx({element:"HelpMessage"})},c):null,l?r.default.createElement(p.default,{stateDefinitions:i,selectedLabel:o}):null)}})},2699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),i=l(n(2555)),o=l(n(6060)),s=l(n(6781));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,i.default)({mixins:[o.default,s.default],displayName:"Legend",propTypes:{selectedLabel:a.default.string.isRequired,stateDefinitions:a.default.object.isRequired},render:function(){var e=this.props,t=e.selectedLabel,n=e.stateDefinitions,a=[],i=void 0,o=void 0,s=void 0;for(i in n)(o=n[i]).label&&o.color&&(s={backgroundColor:o.color},a.push(r.default.createElement("li",{className:this.cx({element:"LegendItem"}),key:i},r.default.createElement("span",{className:this.cx({element:"LegendItemColor"}),style:s}),r.default.createElement("span",{className:this.cx({element:"LegendItemLabel"})},o.label))));return r.default.createElement("ul",{className:this.cx()},r.default.createElement("li",{className:this.cx({element:"LegendItem"})},r.default.createElement("span",{className:this.cx({element:"LegendItemColor",modifiers:{selection:!0}})}),r.default.createElement("span",{className:this.cx({element:"LegendItemLabel"})},t)),a)}});t.default=c},4595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(9196)),i=c(n(5697)),o=c(n(2555)),s=c(n(6060)),l=c(n(6781));function c(e){return e&&e.__esModule?e:{default:e}}var u=(0,o.default)({mixins:[s.default,l.default],displayName:"PaginationArrow",propTypes:{disabled:i.default.bool,onTrigger:i.default.func,direction:i.default.oneOf(["next","previous"])},getDefaultProps:function(){return{disabled:!1}},render:function(){var e,t,n,i=this.props,o=i.disabled,s=i.direction,l=i.onTrigger,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(i,["disabled","direction","onTrigger"]),u=(n=!0,(t=s)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),p={disabled:o},d={modifiers:u,states:p},f={element:"PaginationArrowIcon",modifiers:u,states:p};return a.default.createElement("div",r({className:this.cx(d)},c,{onClick:l}),a.default.createElement("div",{className:this.cx(f)}))}});t.default=u},1013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(9196)),a=h(n(5697)),i=h(n(2555)),o=h(n(3393)),s=h(n(6060)),l=h(n(8088)),c=h(n(4758)),u=h(n(8876)),p=h(n(2729)),d=h(n(680)),f=h(n(5719));function h(e){return e&&e.__esModule?e:{default:e}}var m=(0,i.default)({mixins:[s.default,c.default],displayName:"CalendarDate",propTypes:{date:l.default.moment,firstOfMonth:a.default.object.isRequired,isSelectedDate:a.default.bool,isSelectedRangeStart:a.default.bool,isSelectedRangeEnd:a.default.bool,isInSelectedRange:a.default.bool,isHighlightedDate:a.default.bool,isHighlightedRangeStart:a.default.bool,isHighlightedRangeEnd:a.default.bool,isInHighlightedRange:a.default.bool,highlightedDate:a.default.object,dateStates:a.default.instanceOf(o.default.List),isDisabled:a.default.bool,isToday:a.default.bool,dateRangesForDate:a.default.func,onHighlightDate:a.default.func,onUnHighlightDate:a.default.func,onSelectDate:a.default.func},getInitialState:function(){return{mouseDown:!1}},componentWillUnmount:function(){this.isUnmounted=!0,document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("touchend",this.touchEnd)},mouseUp:function(){this.props.onSelectDate(this.props.date),this.isUnmounted||(this.state.mouseDown&&this.setState({mouseDown:!1}),document.removeEventListener("mouseup",this.mouseUp))},mouseDown:function(){this.setState({mouseDown:!0}),document.addEventListener("mouseup",this.mouseUp)},touchEnd:function(){event.preventDefault(),this.props.onHighlightDate(this.props.date),this.props.onSelectDate(this.props.date),this.isUnmounted||(this.state.mouseDown&&this.setState({mouseDown:!1}),document.removeEventListener("touchend",this.touchEnd))},touchStart:function(e){e.preventDefault(),this.setState({mouseDown:!0}),document.addEventListener("touchend",this.touchEnd)},mouseEnter:function(){this.props.onHighlightDate(this.props.date)},mouseLeave:function(){this.state.mouseDown&&(this.props.onSelectDate(this.props.date),this.setState({mouseDown:!1})),this.props.onUnHighlightDate(this.props.date)},getBemModifiers:function(){var e=this.props,t=e.date,n=e.firstOfMonth,r=e.isToday,a=!1,i=!1;return t.month()!==n.month()&&(a=!0),0!==t.day()&&6!==t.day()||(i=!0),{today:r,weekend:i,otherMonth:a}},getBemStates:function(){var e=this.props,t=e.isSelectedDate,n=e.isInSelectedRange,r=e.isInHighlightedRange,a=e.isHighlightedDate;return{disabled:e.isDisabled,highlighted:a,selected:t||n||r}},render:function(){var e=this.props,t=e.date,n=e.dateRangesForDate,a=e.isSelectedDate,i=e.isSelectedRangeStart,o=e.isSelectedRangeEnd,s=e.isInSelectedRange,l=e.isHighlightedDate,c=e.isHighlightedRangeStart,h=e.isHighlightedRangeEnd,m=e.isInHighlightedRange,v=this.getBemModifiers(),g=this.getBemStates(),y=m,b=void 0,w=void 0,k=void 0,_=n(t),E=_.count(),S={},x={},C=void 0,M=void 0;return a||i&&o||c&&h?M="single":i||c?M="start":o||h?M="end":(s||m)&&(M="segment"),l&&(C="single"),1===E?(b=_.getIn([0,"color"]))&&(x={backgroundColor:b},S={borderLeftColor:(0,u.default)(b,-10),borderRightColor:(0,u.default)(b,-10)}):(w=_.getIn([0,"color"]),k=_.getIn([1,"color"]),w&&(S.borderLeftColor=(0,u.default)(w,-10)),k&&(S.borderRightColor=(0,u.default)(k,-10))),r.default.createElement("td",{className:this.cx({element:"Date",modifiers:v,states:g}),style:S,onTouchStart:this.touchStart,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,onMouseDown:this.mouseDown},E>1&&r.default.createElement("div",{className:this.cx({element:"HalfDateStates"})},r.default.createElement(p.default,{period:"am",color:w}),r.default.createElement(p.default,{period:"pm",color:k})),1===E&&r.default.createElement("div",{className:this.cx({element:"FullDateStates"}),style:x}),r.default.createElement("span",{className:this.cx({element:"DateLabel"})},t.format("D")),M?r.default.createElement(f.default,{modifier:M,pending:y}):null,C?r.default.createElement(d.default,{modifier:C}):null)}});t.default=m},2729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),i=l(n(2555)),o=l(n(6060)),s=l(n(4758));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,i.default)({mixins:[o.default,s.default],displayName:"CalendarDatePeriod",propTypes:{color:a.default.string,period:a.default.string},render:function(){var e,t,n,a=this.props,i=a.color,o=a.period,s=(n=!0,(t=o)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),l=void 0;return i&&(l={backgroundColor:i}),r.default.createElement("div",{style:l,className:this.cx({modifiers:s})})}});t.default=c},680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),i=l(n(2555)),o=l(n(6060)),s=l(n(4758));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,i.default)({mixins:[o.default,s.default],displayName:"CalendarHighlight",propTypes:{modifier:a.default.string},render:function(){var e,t,n,a=this.props.modifier,i=(n=!0,(t=a)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e);return r.default.createElement("div",{className:this.cx({states:{},modifiers:i})})}});t.default=c},5353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=h(n(9196)),i=h(n(5697)),o=h(n(2555)),s=h(n(1891)),l=h(n(614)),c=h(n(3393)),u=h(n(6060)),p=h(n(8088)),d=h(n(5352)),f=h(n(4758));function h(e){return e&&e.__esModule?e:{default:e}}var m=(0,o.default)({mixins:[u.default,f.default],displayName:"CalendarMonth",propTypes:{dateComponent:i.default.func,disableNavigation:i.default.bool,enabledRange:p.default.momentRange,firstOfMonth:p.default.moment,firstOfWeek:i.default.oneOf([0,1,2,3,4,5,6]),hideSelection:i.default.bool,highlightedDate:i.default.object,highlightedRange:i.default.object,onMonthChange:i.default.func,onYearChange:i.default.func,value:p.default.momentOrMomentRange,locale:i.default.string},setLocale:function(e){s.default.locale(e),this.WEEKDAYS=c.default.List(s.default.weekdays()).zip(c.default.List(s.default.weekdaysShort())),this.MONTHS=c.default.List(s.default.months())},componentWillMount:function(){var e=this.props.locale;this.setLocale(e)},componentWillReceiveProps:function(e){var t=e.locale;t!==this.props.locale&&this.setLocale(t)},renderDay:function(e,t){var n=this.props,i=n.dateComponent,o=n.value,l=n.highlightedDate,c=n.highlightedRange,u=n.hideSelection,p=n.enabledRange,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["dateComponent","value","highlightedDate","highlightedRange","hideSelection","enabledRange"]),h=(0,s.default)(e).locale(this.props.locale),m=void 0,v=void 0,g=void 0,y=void 0;return!u&&o&&s.default.isMoment(o)&&o.isSame(h,"day")?v=!0:!u&&o&&(0,d.default)(o)&&o.contains(h)&&(m=!0,g=o.start.isSame(h,"day"),y=o.end.isSame(h,"day")),a.default.createElement(i,r({key:t,isToday:h.isSame((0,s.default)(),"day"),isDisabled:!p.contains(h),isHighlightedDate:!(!l||!l.isSame(h,"day")),isHighlightedRangeStart:!(!c||!c.start.isSame(h,"day")),isHighlightedRangeEnd:!(!c||!c.end.isSame(h,"day")),isInHighlightedRange:!(!c||!c.contains(h)),isSelectedDate:v,isSelectedRangeStart:g,isSelectedRangeEnd:y,isInSelectedRange:m,date:h},f))},renderWeek:function(e,t){var n=e.map(this.renderDay);return a.default.createElement("tr",{className:this.cx({element:"Week"}),key:t},n.toJS())},renderDayHeaders:function(){var e=this.props.firstOfWeek,t=c.default.Range(e,7).concat(c.default.Range(0,e)).map(function(e){var t=this.WEEKDAYS.get(e);return a.default.createElement("th",{className:this.cx({element:"WeekdayHeading"}),key:t,scope:"col"},a.default.createElement("abbr",{title:t[0]},t[1]))}.bind(this));return a.default.createElement("tr",{className:this.cx({element:"Weekdays"})},t.toJS())},handleYearChange:function(e){this.props.onYearChange(parseInt(e.target.value,10))},renderYearChoice:function(e){var t=this.props.enabledRange;return e<t.start.year()||e>t.end.year()?null:a.default.createElement("option",{key:e,value:e},(0,s.default)(e,"YYYY").locale(this.props.locale).format("YYYY"))},renderHeaderYear:function(){var e=this.props.firstOfMonth,t=e.year(),n=c.default.Range(t-5,t).concat(c.default.Range(t,t+10)).map(this.renderYearChoice);return a.default.createElement("span",{className:this.cx({element:"MonthHeaderLabel",modifiers:{year:!0}})},e.locale(this.props.locale).format("YYYY"),this.props.disableNavigation?null:a.default.createElement("select",{className:this.cx({element:"MonthHeaderSelect"}),value:t,onChange:this.handleYearChange},n.toJS()))},handleMonthChange:function(e){this.props.onMonthChange(parseInt(e.target.value,10))},renderMonthChoice:function(e,t){var n=this.props,r=n.firstOfMonth,i=n.enabledRange,o=!1,l=r.year();return(0,s.default)({years:l,months:t+1,date:1}).unix()<i.start.unix()&&(o=!0),(0,s.default)({years:l,months:t,date:1}).unix()>i.end.unix()&&(o=!0),a.default.createElement("option",{key:e,value:t,disabled:o?"disabled":null},e)},renderHeaderMonth:function(){var e=this.props.firstOfMonth,t=this.MONTHS.map(this.renderMonthChoice);return a.default.createElement("span",{className:this.cx({element:"MonthHeaderLabel",modifiers:{month:!0}})},e.locale(this.props.locale).format("MMMM"),this.props.disableNavigation?null:a.default.createElement("select",{className:this.cx({element:"MonthHeaderSelect"}),value:e.month(),onChange:this.handleMonthChange},t.toJS()))},renderHeader:function(){return a.default.createElement("div",{className:this.cx({element:"MonthHeader"})},this.renderHeaderMonth()," ",this.renderHeaderYear())},render:function(){var e=this.props,t=e.firstOfWeek,n=e.firstOfMonth,r=new l.default.Calendar(t),i=c.default.fromJS(r.monthDates(n.year(),n.month())).map(this.renderWeek);return a.default.createElement("div",{className:this.cx({element:"Month"})},this.renderHeader(),a.default.createElement("table",{className:this.cx({element:"MonthDates"})},a.default.createElement("thead",null,this.renderDayHeaders()),a.default.createElement("tbody",null,i.toJS())))}});t.default=m},5719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),i=l(n(2555)),o=l(n(6060)),s=l(n(4758));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,i.default)({mixins:[o.default,s.default],displayName:"CalendarSelection",propTypes:{modifier:a.default.string,pending:a.default.bool.isRequired},render:function(){var e,t,n,a=this.props,i=a.modifier,o=a.pending,s=(n=!0,(t=i)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),l={pending:o};return r.default.createElement("div",{className:this.cx({states:l,modifiers:s})})}});t.default=c},1891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(6292),i=(r=a)&&r.__esModule?r:{default:r};var o=(0,n(3542).extendMoment)(i.default);t.default=o},6060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(5737)),a=i(n(5697));function i(e){return e&&e.__esModule?e:{default:e}}var o={propTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},contextTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},childContextTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},getChildContext:function(){return{bemNamespace:this.getBemNamespace(),bemBlock:this.getBemBlock()}},getBemNamespace:function(){return this.props.bemNamespace?this.props.bemNamespace:this.context.bemNamespace?this.context.bemNamespace:null},getBemBlock:function(){return this.props.bemBlock?this.props.bemBlock:this.context.bemBlock?this.context.bemBlock:null},cx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={namespace:this.getBemNamespace(),element:this.constructor.displayName,block:this.getBemBlock()};return Object.assign(t,e),(0,r.default)(t)}};t.default=o},8088:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1891)),a=i(n(5352));function i(e){return e&&e.__esModule?e:{default:e}}t.default={momentOrMomentRange:function(e,t){var n=e[t];return n?r.default.isMoment(n)||(0,a.default)(n)?null:new Error("'"+t+"' must be a moment or a moment range"):null},moment:function(e,t){var n=e[t];return n?r.default.isMoment(n)?null:new Error("'"+t+"' must be a moment"):null},momentRange:function(e,t){var n=e[t];return n?(0,a.default)(n)?null:new Error("'"+t+"' must be a moment range"):null}}},4758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(1939),i=(r=a)&&r.__esModule?r:{default:r};var o={shouldComponentUpdate:function(e,t){return!(0,i.default)(this.props,e)||!(0,i.default)(this.state,t)}};t.default=o},8329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!(0,i.default)(e)||!(0,i.default)(t))return!1;return e.start.isSame(t.start,"day")&&e.end.isSame(t.end,"day")};var r,a=n(5352),i=(r=a)&&r.__esModule?r:{default:r}},8859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!i.default.isMoment(e)||!i.default.isMoment(t))&&e.isSame(t)};var r,a=n(1891),i=(r=a)&&r.__esModule?r:{default:r}},5737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.block,r=e.element,a=e.namespace,i=e.modifiers,o=e.states,s=[],l=void 0;l=r?a?a+"-"+t+"__"+r:t+"__"+r:a?a+"-"+t:t;s.push(l),o&&("object"===(void 0===o?"undefined":n(o))&&(o=Object.keys(o).filter((function(e){return o[e]}))),o.forEach((function(e){s.push(l+"--is-"+e)})));i&&("object"===(void 0===i?"undefined":n(i))&&(i=Object.keys(i).filter((function(e){return i[e]}))),i.forEach((function(e){s.push(l+"--"+e),o&&o.forEach((function(t){s.push(l+"--"+e+"--is-"+t)}))})));return s.join(" ")}},6380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getYearMonthProps=void 0,t.getYearMonth=o;var r=i(n(1891)),a=i(n(5352));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(r.default.isMoment(e))return{year:e.year(),month:e.month()}}t.getYearMonthProps=function(e){var t=e.selectionType,n=e.value,i=e.initialYear,s=e.initialMonth;return r.default.isMoment(n)||(0,a.default)(n)?o("single"===t?n:n.start):{year:i,month:s}}},6935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.value,i=t.value;return!(n===i||(0,a.default)(n,i)||(0,r.default)(n,i))};var r=i(n(8329)),a=i(n(8859));function i(e){return e&&e.__esModule?e:{default:e}}},5352:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&e.start&&e.end&&i.default.isMoment(e.start)&&i.default.isMoment(e.end)};var r,a=n(1891),i=(r=a)&&r.__esModule?r:{default:r}},8876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r=!1,a=void 0,i=void 0,o=void 0;"#"===e[0]&&(e=e.slice(1),r=!0);n=parseInt(e,16),(a=(n>>16)+t)>255?a=255:a<0&&(a=0);(i=(n>>8&255)+t)>255?i=255:i<0&&(i=0);(o=(255&n)+t)>255?o=255:o<0&&(o=0);return(r?"#":"")+(o|i<<8|a<<16).toString(16)}},1939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1891)),a=o(n(8329)),i=o(n(5352));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n))return!1;if(r.default.isMoment(e[n])&&r.default.isMoment(t[n])){if(!e[n].isSame(t[n],"day"))return!1}else if((0,i.default)(e[n])&&(0,i.default)(t[n])){if(!(0,a.default)(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}},7418:e=>{"use strict";
|
|
15
|
+
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case o:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case v:case m:case l:return e;default:return t}}case a:return t}}}function _(e){return k(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||k(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===s||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=k},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},3393:function(e){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:G(e)}function r(e){return s(e)?e:W(e)}function a(e){return l(e)?e:Y(e)}function o(e){return i(e)&&!c(e)?e:X(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return!(!e||!e[f])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[h])}t(r,n),t(a,n),t(o,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=a,n.Set=o;var p="@@__IMMUTABLE_ITERABLE__@@",d="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},w={value:!1},k={value:!1};function _(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function S(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),a=0;a<n;a++)r[a]=e[a+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(M)),e.size}function T(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function M(){return!0}function P(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function A(e,t){return I(e,t,0)}function O(e,t){return I(e,t,t)}function I(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,z=1,D=2,L="function"==typeof Symbol&&Symbol.iterator,R="@@iterator",j=L||R;function B(e){this.next=e}function F(e,t,n,r){var a=0===e?t:1===e?n:[t,n];return r?r.value=a:r={value:a,done:!1},r}function $(){return{value:void 0,done:!0}}function H(e){return!!Z(e)}function q(e){return e&&"function"==typeof e.next}function V(e){var t=Z(e);return t&&t.call(e)}function Z(e){var t=e&&(L&&e[L]||e[R]);if("function"==typeof t)return t}function U(e){return e&&"number"==typeof e.length}function G(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function W(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function X(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=N,B.VALUES=z,B.ENTRIES=D,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[j]=function(){return this},t(G,n),G.of=function(){return G(arguments)},G.prototype.toSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq {","}")},G.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},G.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},G.prototype.__iterator=function(e,t){return de(this,e,t,!0)},t(W,G),W.prototype.toKeyedSeq=function(){return this},t(Y,G),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return de(this,e,t,!1)},t(X,G),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},G.isSeq=oe,G.Keyed=W,G.Set=X,G.Indexed=Y;var K,Q,J,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ae(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ie(){return K||(K=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():q(e)?new ae(e).fromEntrySeq():H(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return U(e)?new te(e):q(e)?new ae(e):H(e)?new re(e):void 0}function pe(e,t,n,r){var a=e._cache;if(a){for(var o=a.length-1,i=0;i<=o;i++){var s=a[n?o-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function de(e,t,n,r){var a=e._cache;if(a){var o=a.length-1,i=0;return new B((function(){var e=a[n?o-i:i];return i++>o?$():F(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?he(t,e,"",{"":e}):me(e)}function he(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return he(e,n,r,t)}))):ve(t)?e.call(r,n,W(t).map((function(n,r){return he(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?W(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var a=r.next().value;return a&&ge(a[1],e)&&(n||ge(a[0],t))}))&&r.next().done}var a=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{a=!0;var o=e;e=t,t=o}var p=!0,d=t.__iterate((function(t,r){if(n?!e.has(t):a?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===d}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Q)return Q;Q=this}}function we(e,t){if(!e)throw new Error(t)}function ke(e,t,n){if(!(this instanceof ke))return new ke(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(J)return J;J=this}}function _e(){throw TypeError("Abstract")}function Ee(){}function Se(){}function xe(){}G.prototype[ee]=!0,t(te,Y),te.prototype.get=function(e,t){return this.has(e)?this._array[T(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,a=0;a<=r;a++)if(!1===e(n[t?r-a:a],a,this))return a+1;return a},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,a=0;return new B((function(){return a>r?$():F(e,a,n[t?r-a++:a++])}))},t(ne,W),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,a=r.length-1,o=0;o<=a;o++){var i=r[t?a-o:o];if(!1===e(n[i],i,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,a=r.length-1,o=0;return new B((function(){var i=r[t?a-o:o];return o++>a?$():F(e,i,n[i])}))},ne.prototype[h]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=V(this._iterable),r=0;if(q(n))for(var a;!(a=n.next()).done&&!1!==e(a.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=V(this._iterable);if(!q(n))return new B($);var r=0;return new B((function(){var t=n.next();return t.done?t:F(e,r++,t.value)}))},t(ae,Y),ae.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,a=this._iteratorCache,o=0;o<a.length;)if(!1===e(a[o],o++,this))return o;for(;!(n=r.next()).done;){var i=n.value;if(a[o]=i,!1===e(i,o++,this))break}return o},ae.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,a=0;return new B((function(){if(a>=r.length){var t=n.next();if(t.done)return t;r[a]=t.value}return F(e,a,r[a++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return P(e,t,n)?this:new be(this._value,O(t,n)-A(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},be.prototype.__iterator=function(e,t){var n=this,r=0;return new B((function(){return r<n.size?F(e,r++,n._value):$()}))},be.prototype.equals=function(e){return e instanceof be?ge(this._value,e._value):ye(e)},t(ke,Y),ke.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ke.prototype.get=function(e,t){return this.has(e)?this._start+T(this,e)*this._step:t},ke.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ke.prototype.slice=function(e,t){return P(e,t,this.size)?this:(e=A(e,this.size),(t=O(t,this.size))<=e?new ke(0,0):new ke(this.get(e,this._end),this.get(t,this._end),this._step))},ke.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ke.prototype.lastIndexOf=function(e){return this.indexOf(e)},ke.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,a=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(a,o,this))return o+1;a+=t?-r:r}return o},ke.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,a=t?this._start+n*r:this._start,o=0;return new B((function(){var i=a;return a+=t?-r:r,o>n?$():F(e,o++,i)}))},ke.prototype.equals=function(e){return e instanceof ke?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(_e,n),t(Ee,_e),t(Se,_e),t(xe,_e),_e.Keyed=Ee,_e.Indexed=Se,_e.Set=xe;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Te(e){return e>>>1&1073741824|3221225471&e}function Me(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Te(n)}if("string"===t)return e.length>Be?Pe(e):Ae(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Oe(e);if("function"==typeof e.toString)return Ae(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Pe(e){var t=He[e];return void 0===t&&(t=Ae(e),$e===Fe&&($e=0,He={}),$e++,He[e]=t),t}function Ae(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Te(t)}function Oe(e){var t;if(Le&&void 0!==(t=De.get(e)))return t;if(void 0!==(t=e[je]))return t;if(!Ne){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[je]))return t;if(void 0!==(t=ze(e)))return t}if(t=++Re,1073741824&Re&&(Re=0),Le)De.set(e,t);else{if(void 0!==Ie&&!1===Ie(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Ne)Object.defineProperty(e,je,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[je]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[je]=t}}return t}var Ie=Object.isExtensible,Ne=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function ze(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var De,Le="function"==typeof WeakMap;Le&&(De=new WeakMap);var Re=0,je="__immutablehash__";"function"==typeof Symbol&&(je=Symbol(je));var Be=16,Fe=255,$e=0,He={};function qe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ve(e){return null==e?at():Ze(e)&&!u(e)?e:at().withMutations((function(t){var n=r(e);qe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ze(e){return!(!e||!e[Ge])}t(Ve,Ee),Ve.of=function(){var t=e.call(arguments,0);return at().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Ve.prototype.toString=function(){return this.__toString("Map {","}")},Ve.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ve.prototype.set=function(e,t){return ot(this,e,t)},Ve.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},Ve.prototype.remove=function(e){return ot(this,e,b)},Ve.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},Ve.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ve.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,En(e),t,n);return r===b?void 0:r},Ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):at()},Ve.prototype.merge=function(){return dt(this,void 0,arguments)},Ve.prototype.mergeWith=function(t){return dt(this,t,e.call(arguments,1))},Ve.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,at(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ve.prototype.mergeDeep=function(){return dt(this,ft,arguments)},Ve.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return dt(this,ht(t),n)},Ve.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,at(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ve.prototype.sort=function(e){return Ht(pn(this,e))},Ve.prototype.sortBy=function(e,t){return Ht(pn(this,t,e))},Ve.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ve.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},Ve.prototype.asImmutable=function(){return this.__ensureOwner()},Ve.prototype.wasAltered=function(){return this.__altered},Ve.prototype.__iterator=function(e,t){return new et(this,e,t)},Ve.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ve.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ve.isMap=Ze;var Ue,Ge="@@__IMMUTABLE_MAP__@@",We=Ve.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Xe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ke(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return F(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var a=Object.create(We);return a.size=e,a._root=t,a.__ownerID=n,a.__hash=r,a.__altered=!1,a}function at(){return Ue||(Ue=rt(0))}function ot(e,t,n){var r,a;if(e._root){var o=_(w),i=_(k);if(r=it(e._root,e.__ownerID,0,void 0,t,n,o,i),!i.value)return e;a=e.size+(o.value?n===b?-1:1:0)}else{if(n===b)return e;a=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=a,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(a,r):at()}function it(e,t,n,r,a,o,i,s){return e?e.update(t,n,r,a,o,i,s):o===b?e:(E(s),E(i),new Je(t,r,[a,o]))}function st(e){return e.constructor===Je||e.constructor===Qe}function lt(e,t,n,r,a){if(e.keyHash===r)return new Qe(t,r,[e.entry,a]);var o,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Xe(t,1<<i|1<<s,i===s?[lt(e,t,n+v,r,a)]:(o=new Je(t,r,a),i<s?[e,o]:[o,e]))}function ct(e,t,n,r){e||(e=new S);for(var a=new Je(e,Me(n),[n,r]),o=0;o<t.length;o++){var i=t[o];a=a.update(e,0,void 0,i[0],i[1])}return a}function ut(e,t,n,r){for(var a=0,o=0,i=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(a|=l,i[o++]=u)}return new Xe(e,a,i)}function pt(e,t,n,r,a){for(var o=0,i=new Array(g),s=0;0!==n;s++,n>>>=1)i[s]=1&n?t[o++]:void 0;return i[r]=a,new Ke(e,o+1,i)}function dt(e,t,n){for(var a=[],o=0;o<n.length;o++){var s=n[o],l=r(s);i(s)||(l=l.map((function(e){return fe(e)}))),a.push(l)}return mt(e,t,a)}function ft(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):ge(e,t)?e:t}function ht(e){return function(t,n,r){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var a=e(t,n,r);return ge(t,a)?t:a}}function mt(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,b,(function(e){return e===b?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},a=0;a<n.length;a++)n[a].forEach(r)})):e.constructor(n[0])}function vt(e,t,n,r){var a=e===b,o=t.next();if(o.done){var i=a?n:e,s=r(i);return s===i?e:s}we(a||e&&e.set,"invalid keyPath");var l=o.value,c=a?b:e.get(l,b),u=vt(c,t,n,r);return u===c?e:u===b?e.remove(l):(a?at():e).set(l,u)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var a=r?e:x(e);return a[t]=n,a}function bt(e,t,n,r){var a=e.length+1;if(r&&t+1===a)return e[t]=n,e;for(var o=new Array(a),i=0,s=0;s<a;s++)s===t?(o[s]=n,i=-1):o[s]=e[s+i];return o}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var a=new Array(r),o=0,i=0;i<r;i++)i===t&&(o=1),a[i]=e[i+o];return a}We[Ge]=!0,We[m]=We.remove,We.removeIn=We.deleteIn,Ye.prototype.get=function(e,t,n,r){for(var a=this.entries,o=0,i=a.length;o<i;o++)if(ge(n,a[o][0]))return a[o][1];return r},Ye.prototype.update=function(e,t,n,r,a,o,i){for(var s=a===b,l=this.entries,c=0,u=l.length;c<u&&!ge(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===a:s)return this;if(E(i),(s||!p)&&E(o),!s||1!==l.length){if(!p&&!s&&l.length>=kt)return ct(e,l,r,a);var d=e&&e===this.ownerID,f=d?l:x(l);return p?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,a]:f.push([r,a]),d?(this.entries=f,this):new Ye(e,f)}},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Me(n));var a=1<<((0===e?t:t>>>e)&y),o=this.bitmap;return 0==(o&a)?r:this.nodes[gt(o&a-1)].get(e+v,t,n,r)},Xe.prototype.update=function(e,t,n,r,a,o,i){void 0===n&&(n=Me(r));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&a===b)return this;var p=gt(c&l-1),d=this.nodes,f=u?d[p]:void 0,h=it(f,e,t+v,n,r,a,o,i);if(h===f)return this;if(!u&&h&&d.length>=_t)return pt(e,d,c,s,h);if(u&&!h&&2===d.length&&st(d[1^p]))return d[1^p];if(u&&h&&1===d.length&&st(h))return h;var m=e&&e===this.ownerID,g=u?h?c:c^l:c|l,w=u?h?yt(d,p,h,m):wt(d,p,m):bt(d,p,h,m);return m?(this.bitmap=g,this.nodes=w,this):new Xe(e,g,w)},Ke.prototype.get=function(e,t,n,r){void 0===t&&(t=Me(n));var a=(0===e?t:t>>>e)&y,o=this.nodes[a];return o?o.get(e+v,t,n,r):r},Ke.prototype.update=function(e,t,n,r,a,o,i){void 0===n&&(n=Me(r));var s=(0===t?n:n>>>t)&y,l=a===b,c=this.nodes,u=c[s];if(l&&!u)return this;var p=it(u,e,t+v,n,r,a,o,i);if(p===u)return this;var d=this.count;if(u){if(!p&&--d<Et)return ut(e,c,d,s)}else d++;var f=e&&e===this.ownerID,h=yt(c,s,p,f);return f?(this.count=d,this.nodes=h,this):new Ke(e,d,h)},Qe.prototype.get=function(e,t,n,r){for(var a=this.entries,o=0,i=a.length;o<i;o++)if(ge(n,a[o][0]))return a[o][1];return r},Qe.prototype.update=function(e,t,n,r,a,o,i){void 0===n&&(n=Me(r));var s=a===b;if(n!==this.keyHash)return s?this:(E(i),E(o),lt(this,e,t,n,[r,a]));for(var l=this.entries,c=0,u=l.length;c<u&&!ge(r,l[c][0]);c++);var p=c<u;if(p?l[c][1]===a:s)return this;if(E(i),(s||!p)&&E(o),s&&2===u)return new Je(e,this.keyHash,l[1^c]);var d=e&&e===this.ownerID,f=d?l:x(l);return p?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,a]:f.push([r,a]),d?(this.entries=f,this):new Qe(e,this.keyHash,f)},Je.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},Je.prototype.update=function(e,t,n,r,a,o,i){var s=a===b,l=ge(r,this.entry[0]);return(l?a===this.entry[1]:s)?this:(E(i),s?void E(o):l?e&&e===this.ownerID?(this.entry[1]=a,this):new Je(e,this.keyHash,[r,a]):(E(o),lt(this,e,t,Me(r),[r,a])))},Ye.prototype.iterate=Qe.prototype.iterate=function(e,t){for(var n=this.entries,r=0,a=n.length-1;r<=a;r++)if(!1===e(n[t?a-r:r]))return!1},Xe.prototype.iterate=Ke.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,a=n.length-1;r<=a;r++){var o=n[t?a-r:r];if(o&&!1===o.iterate(e,t))return!1}},Je.prototype.iterate=function(e,t){return e(this.entry)},t(et,B),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,a=t.index++;if(r.entry){if(0===a)return tt(e,r.entry)}else if(r.entries){if(a<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-a:a])}else if(a<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-a:a];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return $()};var kt=g/4,_t=g/2,Et=g/4;function St(e){var t=zt();if(null==e)return t;if(xt(e))return e;var n=a(e),r=n.size;return 0===r?t:(qe(r),r>0&&r<g?Nt(0,r,v,null,new Mt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function xt(e){return!(!e||!e[Ct])}t(St,Se),St.of=function(){return this(arguments)},St.prototype.toString=function(){return this.__toString("List [","]")},St.prototype.get=function(e,t){if((e=T(this,e))>=0&&e<this.size){var n=jt(this,e+=this._origin);return n&&n.array[e&y]}return t},St.prototype.set=function(e,t){return Dt(this,e,t)},St.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},St.prototype.insert=function(e,t){return this.splice(e,0,t)},St.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=v,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):zt()},St.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Bt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},St.prototype.pop=function(){return Bt(this,0,-1)},St.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Bt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},St.prototype.shift=function(){return Bt(this,1)},St.prototype.merge=function(){return Ft(this,void 0,arguments)},St.prototype.mergeWith=function(t){return Ft(this,t,e.call(arguments,1))},St.prototype.mergeDeep=function(){return Ft(this,ft,arguments)},St.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ft(this,ht(t),n)},St.prototype.setSize=function(e){return Bt(this,0,e)},St.prototype.slice=function(e,t){var n=this.size;return P(e,t,n)?this:Bt(this,A(e,n),O(t,n))},St.prototype.__iterator=function(e,t){var n=0,r=It(this,t);return new B((function(){var t=r();return t===Ot?$():F(e,n++,t)}))},St.prototype.__iterate=function(e,t){for(var n,r=0,a=It(this,t);(n=a())!==Ot&&!1!==e(n,r++,this););return r},St.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},St.isList=xt;var Ct="@@__IMMUTABLE_LIST__@@",Tt=St.prototype;function Mt(e,t){this.array=e,this.ownerID=t}Tt[Ct]=!0,Tt[m]=Tt.remove,Tt.setIn=We.setIn,Tt.deleteIn=Tt.removeIn=We.removeIn,Tt.update=We.update,Tt.updateIn=We.updateIn,Tt.mergeIn=We.mergeIn,Tt.mergeDeepIn=We.mergeDeepIn,Tt.withMutations=We.withMutations,Tt.asMutable=We.asMutable,Tt.asImmutable=We.asImmutable,Tt.wasAltered=We.wasAltered,Mt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&y;if(r>=this.array.length)return new Mt([],e);var a,o=0===r;if(t>0){var i=this.array[r];if((a=i&&i.removeBefore(e,t-v,n))===i&&o)return this}if(o&&!a)return this;var s=Rt(this,e);if(!o)for(var l=0;l<r;l++)s.array[l]=void 0;return a&&(s.array[r]=a),s},Mt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,a=n-1>>>t&y;if(a>=this.array.length)return this;if(t>0){var o=this.array[a];if((r=o&&o.removeAfter(e,t-v,n))===o&&a===this.array.length-1)return this}var i=Rt(this,e);return i.array.splice(a+1),r&&(i.array[a]=r),i};var Pt,At,Ot={};function It(e,t){var n=e._origin,r=e._capacity,a=$t(r),o=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,i){var s=i===a?o&&o.array:e&&e.array,l=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(l===c)return Ot;var e=t?--c:l++;return s&&s[e]}}function l(e,a,o){var s,l=e&&e.array,c=o>n?0:n-o>>a,u=1+(r-o>>a);return u>g&&(u=g),function(){for(;;){if(s){var e=s();if(e!==Ot)return e;s=null}if(c===u)return Ot;var n=t?--u:c++;s=i(l&&l[n],a-v,o+(n<<a))}}}}function Nt(e,t,n,r,a,o,i){var s=Object.create(Tt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=a,s.__ownerID=o,s.__hash=i,s.__altered=!1,s}function zt(){return Pt||(Pt=Nt(0,0,v))}function Dt(e,t,n){if((t=T(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Bt(e,t).set(0,n):Bt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,a=e._root,o=_(k);return t>=$t(e._capacity)?r=Lt(r,e.__ownerID,0,t,n,o):a=Lt(a,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=a,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,a,r):e}function Lt(e,t,n,r,a,o){var i,s=r>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===a)return e;if(n>0){var c=e&&e.array[s],u=Lt(c,t,n-v,r,a,o);return u===c?e:((i=Rt(e,t)).array[s]=u,i)}return l&&e.array[s]===a?e:(E(o),i=Rt(e,t),void 0===a&&s===i.array.length-1?i.array.pop():i.array[s]=a,i)}function Rt(e,t){return t&&e&&t===e.ownerID?e:new Mt(e?e.array.slice():[],t)}function jt(e,t){if(t>=$t(e._capacity))return e._tail;if(t<1<<e._level+v){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&y],r-=v;return n}}function Bt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,a=e._origin,o=e._capacity,i=a+t,s=void 0===n?o:n<0?o+n:a+n;if(i===a&&s===o)return e;if(i>=s)return e.clear();for(var l=e._level,c=e._root,u=0;i+u<0;)c=new Mt(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=v);u&&(i+=u,a+=u,s+=u,o+=u);for(var p=$t(o),d=$t(s);d>=1<<l+v;)c=new Mt(c&&c.array.length?[c]:[],r),l+=v;var f=e._tail,h=d<p?jt(e,s-1):d>p?new Mt([],r):f;if(f&&d>p&&i<o&&f.array.length){for(var m=c=Rt(c,r),g=l;g>v;g-=v){var b=p>>>g&y;m=m.array[b]=Rt(m.array[b],r)}m.array[p>>>v&y]=f}if(s<o&&(h=h&&h.removeAfter(r,0,s)),i>=d)i-=d,s-=d,l=v,c=null,h=h&&h.removeBefore(r,0,i);else if(i>a||d<p){for(u=0;c;){var w=i>>>l&y;if(w!==d>>>l&y)break;w&&(u+=(1<<l)*w),l-=v,c=c.array[w]}c&&i>a&&(c=c.removeBefore(r,l,i-u)),c&&d<p&&(c=c.removeAfter(r,l,d-u)),u&&(i-=u,s-=u)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=c,e._tail=h,e.__hash=void 0,e.__altered=!0,e):Nt(i,s,l,c,h)}function Ft(e,t,n){for(var r=[],o=0,s=0;s<n.length;s++){var l=n[s],c=a(l);c.size>o&&(o=c.size),i(l)||(c=c.map((function(e){return fe(e)}))),r.push(c)}return o>e.size&&(e=e.setSize(o)),mt(e,t,r)}function $t(e){return e<g?0:e-1>>>v<<v}function Ht(e){return null==e?Zt():qt(e)?e:Zt().withMutations((function(t){var n=r(e);qe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function qt(e){return Ze(e)&&u(e)}function Vt(e,t,n,r){var a=Object.create(Ht.prototype);return a.size=e?e.size:0,a._map=e,a._list=t,a.__ownerID=n,a.__hash=r,a}function Zt(){return At||(At=Vt(at(),zt()))}function Ut(e,t,n){var r,a,o=e._map,i=e._list,s=o.get(t),l=void 0!==s;if(n===b){if(!l)return e;i.size>=g&&i.size>=2*o.size?(r=(a=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=a.__ownerID=e.__ownerID)):(r=o.remove(t),a=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(n===i.get(s)[1])return e;r=o,a=i.set(s,[t,n])}else r=o.set(t,i.size),a=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=a,e.__hash=void 0,e):Vt(r,a)}function Gt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Wt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){this._iter=e,this.size=e.size}function Kt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===D){var r=e.__iterator(t,n);return new B((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===z?N:z,n)},t}function Qt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,a){var o=e.get(r,b);return o===b?a:t.call(n,o,r,e)},r.__iterateUncached=function(r,a){var o=this;return e.__iterate((function(e,a,i){return!1!==r(t.call(n,e,a,i),a,o)}),a)},r.__iteratorUncached=function(r,a){var o=e.__iterator(D,a);return new B((function(){var a=o.next();if(a.done)return a;var i=a.value,s=i[0];return F(r,s,t.call(n,i[1],s,e),a)}))},r}function Jt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Kt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var a=bn(e);return r&&(a.has=function(r){var a=e.get(r,b);return a!==b&&!!t.call(n,a,r,e)},a.get=function(r,a){var o=e.get(r,b);return o!==b&&t.call(n,o,r,e)?o:a}),a.__iterateUncached=function(a,o){var i=this,s=0;return e.__iterate((function(e,o,l){if(t.call(n,e,o,l))return s++,a(e,r?o:s-1,i)}),o),s},a.__iteratorUncached=function(a,o){var i=e.__iterator(D,o),s=0;return new B((function(){for(;;){var o=i.next();if(o.done)return o;var l=o.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return F(a,r?c:s++,u,o)}}))},a}function tn(e,t,n){var r=Ve().asMutable();return e.__iterate((function(a,o){r.update(t.call(n,a,o,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),a=(u(e)?Ht():Ve()).asMutable();e.__iterate((function(o,i){a.update(t.call(n,o,i,e),(function(e){return(e=e||[]).push(r?[i,o]:o),e}))}));var o=yn(e);return a.map((function(t){return mn(e,o(t))}))}function rn(e,t,n,r){var a=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=a:n|=0),P(t,n,a))return e;var o=A(t,a),i=O(n,a);if(o!=o||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=i-o;l==l&&(s=l<0?0:l);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=T(this,t))>=0&&t<s?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var a=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=i++<o))return c++,!1!==t(e,r?n:c-1,a)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var a=0!==s&&e.__iterator(t,n),i=0,l=0;return new B((function(){for(;i++<o;)a.next();if(++l>s)return $();var e=a.next();return r||t===z?e:F(t,l-1,t===N?void 0:e.value[1],e)}))},c}function an(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,a){var o=this;if(a)return this.cacheResult().__iterate(r,a);var i=0;return e.__iterate((function(e,a,s){return t.call(n,e,a,s)&&++i&&r(e,a,o)})),i},r.__iteratorUncached=function(r,a){var o=this;if(a)return this.cacheResult().__iterator(r,a);var i=e.__iterator(D,a),s=!0;return new B((function(){if(!s)return $();var e=i.next();if(e.done)return e;var a=e.value,l=a[0],c=a[1];return t.call(n,c,l,o)?r===D?e:F(r,l,c,e):(s=!1,$())}))},r}function on(e,t,n,r){var a=bn(e);return a.__iterateUncached=function(a,o){var i=this;if(o)return this.cacheResult().__iterate(a,o);var s=!0,l=0;return e.__iterate((function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return l++,a(e,r?o:l-1,i)})),l},a.__iteratorUncached=function(a,o){var i=this;if(o)return this.cacheResult().__iterator(a,o);var s=e.__iterator(D,o),l=!0,c=0;return new B((function(){var e,o,u;do{if((e=s.next()).done)return r||a===z?e:F(a,c++,a===N?void 0:e.value[1],e);var p=e.value;o=p[0],u=p[1],l&&(l=t.call(n,u,o,i))}while(l);return a===D?e:F(a,o,u,e)}))},a}function sn(e,t){var n=s(e),a=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===a.length)return e;if(1===a.length){var o=a[0];if(o===e||n&&s(o)||l(e)&&l(o))return o}var c=new te(a);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=a.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,a){var o=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,a){return(!t||c<t)&&i(e)?l(e,c+1):!1===r(e,n?a:o++,u)&&(s=!0),!s}),a)}return l(e,0),o},r.__iteratorUncached=function(r,a){var o=e.__iterator(r,a),s=[],l=0;return new B((function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(r===D&&(c=c[1]),t&&!(s.length<t)||!i(c))return n?e:F(r,l++,c,e);s.push(o),o=c.__iterator(r,a)}else o=s.pop()}return $()}))},r}function cn(e,t,n){var r=yn(e);return e.toSeq().map((function(a,o){return r(t.call(n,a,o,e))})).flatten(!0)}function un(e,t){var n=bn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var a=this,o=0;return e.__iterate((function(e,r){return(!o||!1!==n(t,o++,a))&&!1!==n(e,o++,a)}),r),o},n.__iteratorUncached=function(n,r){var a,o=e.__iterator(z,r),i=0;return new B((function(){return(!a||i%2)&&(a=o.next()).done?a:i%2?F(n,i++,t):F(n,i++,a.value,a)}))},n}function pn(e,t,n){t||(t=kn);var r=s(e),a=0,o=e.toSeq().map((function(t,r){return[r,t,a++,n?n(t,r,e):t]})).toArray();return o.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?W(o):l(e)?Y(o):X(o)}function dn(e,t,n){if(t||(t=kn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return fn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return fn(t,e,n)?n:e}))}function fn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hn(e,t,r){var a=bn(e);return a.size=new te(r).map((function(e){return e.size})).min(),a.__iterate=function(e,t){for(var n,r=this.__iterator(z,t),a=0;!(n=r.next()).done&&!1!==e(n.value,a++,this););return a},a.__iteratorUncached=function(e,a){var o=r.map((function(e){return e=n(e),V(a?e.reverse():e)})),i=0,s=!1;return new B((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?$():F(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},a}function mn(e,t){return oe(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return qe(e.size),C(e)}function yn(e){return s(e)?r:l(e)?a:o}function bn(e){return Object.create((s(e)?W:l(e)?Y:X).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function kn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=V(e);if(!t){if(!U(e))throw new TypeError("Expected iterable or array-like: "+e);t=V(n(e))}return t}function Sn(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var i=Object.keys(e);Mn(a,i),a.size=i.length,a._name=t,a._keys=i,a._defaultValues=e}this._map=Ve(o)},a=r.prototype=Object.create(xn);return a.constructor=r,r}t(Ht,Ve),Ht.of=function(){return this(arguments)},Ht.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ht.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Zt()},Ht.prototype.set=function(e,t){return Ut(this,e,t)},Ht.prototype.remove=function(e){return Ut(this,e,b)},Ht.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ht.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Ht.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ht.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Vt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ht.isOrderedMap=qt,Ht.prototype[h]=!0,Ht.prototype[m]=Ht.prototype.remove,t(Gt,W),Gt.prototype.get=function(e,t){return this._iter.get(e,t)},Gt.prototype.has=function(e){return this._iter.has(e)},Gt.prototype.valueSeq=function(){return this._iter.valueSeq()},Gt.prototype.reverse=function(){var e=this,t=Jt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Gt.prototype.map=function(e,t){var n=this,r=Qt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Gt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(a){return e(a,t?--n:n++,r)}),t)},Gt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(z,t),r=t?gn(this):0;return new B((function(){var a=n.next();return a.done?a:F(e,t?--r:r++,a.value,a)}))},Gt.prototype[h]=!0,t(Wt,Y),Wt.prototype.includes=function(e){return this._iter.includes(e)},Wt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Wt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(z,t),r=0;return new B((function(){var t=n.next();return t.done?t:F(e,r++,t.value,t)}))},t(Yt,X),Yt.prototype.has=function(e){return this._iter.includes(e)},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(z,t);return new B((function(){var t=n.next();return t.done?t:F(e,t.value,t.value,t)}))},t(Xt,W),Xt.prototype.entrySeq=function(){return this._iter.toSeq()},Xt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){vn(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Xt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(z,t);return new B((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){vn(r);var a=i(r);return F(e,a?r.get(0):r[0],a?r.get(1):r[1],t)}}}))},Wt.prototype.cacheResult=Gt.prototype.cacheResult=Yt.prototype.cacheResult=Xt.prototype.cacheResult=wn,t(Sn,Ee),Sn.prototype.toString=function(){return this.__toString(Tn(this)+" {","}")},Sn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Sn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Sn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Cn(this,at()))},Sn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Tn(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Cn(this,n)},Sn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Cn(this,t)},Sn.prototype.wasAltered=function(){return this._map.wasAltered()},Sn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Sn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Cn(this,t,e):(this.__ownerID=e,this._map=t,this)};var xn=Sn.prototype;function Cn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Tn(e){return e._name||e.constructor.name||"Record"}function Mn(e,t){try{t.forEach(Pn.bind(void 0,e))}catch(n){}}function Pn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function An(e){return null==e?Rn():On(e)&&!u(e)?e:Rn().withMutations((function(t){var n=o(e);qe(n.size),n.forEach((function(e){return t.add(e)}))}))}function On(e){return!(!e||!e[Nn])}xn[m]=xn.remove,xn.deleteIn=xn.removeIn=We.removeIn,xn.merge=We.merge,xn.mergeWith=We.mergeWith,xn.mergeIn=We.mergeIn,xn.mergeDeep=We.mergeDeep,xn.mergeDeepWith=We.mergeDeepWith,xn.mergeDeepIn=We.mergeDeepIn,xn.setIn=We.setIn,xn.update=We.update,xn.updateIn=We.updateIn,xn.withMutations=We.withMutations,xn.asMutable=We.asMutable,xn.asImmutable=We.asImmutable,t(An,xe),An.of=function(){return this(arguments)},An.fromKeys=function(e){return this(r(e).keySeq())},An.prototype.toString=function(){return this.__toString("Set {","}")},An.prototype.has=function(e){return this._map.has(e)},An.prototype.add=function(e){return Dn(this,this._map.set(e,!0))},An.prototype.remove=function(e){return Dn(this,this._map.remove(e))},An.prototype.clear=function(){return Dn(this,this._map.clear())},An.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},An.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},An.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return o(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},An.prototype.merge=function(){return this.union.apply(this,arguments)},An.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},An.prototype.sort=function(e){return jn(pn(this,e))},An.prototype.sortBy=function(e,t){return jn(pn(this,t,e))},An.prototype.wasAltered=function(){return this._map.wasAltered()},An.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},An.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},An.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},An.isSet=On;var In,Nn="@@__IMMUTABLE_SET__@@",zn=An.prototype;function Dn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Rn(){return In||(In=Ln(at()))}function jn(e){return null==e?qn():Bn(e)?e:qn().withMutations((function(t){var n=o(e);qe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Bn(e){return On(e)&&u(e)}zn[Nn]=!0,zn[m]=zn.remove,zn.mergeDeep=zn.merge,zn.mergeDeepWith=zn.mergeWith,zn.withMutations=We.withMutations,zn.asMutable=We.asMutable,zn.asImmutable=We.asImmutable,zn.__empty=Rn,zn.__make=Ln,t(jn,An),jn.of=function(){return this(arguments)},jn.fromKeys=function(e){return this(r(e).keySeq())},jn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},jn.isOrderedSet=Bn;var Fn,$n=jn.prototype;function Hn(e,t){var n=Object.create($n);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function qn(){return Fn||(Fn=Hn(Zt()))}function Vn(e){return null==e?Xn():Zn(e)?e:Xn().unshiftAll(e)}function Zn(e){return!(!e||!e[Gn])}$n[h]=!0,$n.__empty=qn,$n.__make=Hn,t(Vn,Se),Vn.of=function(){return this(arguments)},Vn.prototype.toString=function(){return this.__toString("Stack [","]")},Vn.prototype.get=function(e,t){var n=this._head;for(e=T(this,e);n&&e--;)n=n.next;return n?n.value:t},Vn.prototype.peek=function(){return this._head&&this._head.value},Vn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Yn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=a(e)).size)return this;qe(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Yn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xn()},Vn.prototype.slice=function(e,t){if(P(e,t,this.size))return this;var n=A(e,this.size);if(O(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=r,this._head=a,this.__hash=void 0,this.__altered=!0,this):Yn(r,a)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new B((function(){if(r){var t=r.value;return r=r.next,F(e,n++,t)}return $()}))},Vn.isStack=Zn;var Un,Gn="@@__IMMUTABLE_STACK__@@",Wn=Vn.prototype;function Yn(e,t,n,r){var a=Object.create(Wn);return a.size=e,a._head=t,a.__ownerID=n,a.__hash=r,a.__altered=!1,a}function Xn(){return Un||(Un=Yn(0))}function Kn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Wn[Gn]=!0,Wn.withMutations=We.withMutations,Wn.asMutable=We.asMutable,Wn.asImmutable=We.asImmutable,Wn.wasAltered=We.wasAltered,n.Iterator=B,Kn(n,{toArray:function(){qe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Wt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Gt(this,!0)},toMap:function(){return Ve(this.toKeyedSeq())},toObject:function(){qe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Ht(this.toKeyedSeq())},toOrderedSet:function(){return jn(s(this)?this.valueSeq():this)},toSet:function(){return An(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(D)},every:function(e,t){qe(this.size);var n=!0;return this.__iterate((function(r,a,o){if(!e.call(t,r,a,o))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return qe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){qe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Qt(this,e,t))},reduce:function(e,t,n){var r,a;return qe(this.size),arguments.length<2?a=!0:r=t,this.__iterate((function(t,o,i){a?(a=!1,r=t):r=e.call(n,r,t,o,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Jt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(z)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(nr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,a,o){if(e.call(t,n,a,o))return r=[a,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(M)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Xt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,a=En(e);!(n=a.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return dn(this,e)},maxBy:function(e,t){return dn(this,t,e)},min:function(e){return dn(this,e?rr(e):ir)},minBy:function(e,t){return dn(this,t?rr(t):ir,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,on(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,an(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var Qn=n.prototype;Qn[p]=!0,Qn[j]=Qn.values,Qn.__toJS=Qn.toArray,Qn.__toStringMapper=ar,Qn.inspect=Qn.toSource=function(){return this.toString()},Qn.chain=Qn.flatMap,Qn.contains=Qn.includes,Kn(r,{flip:function(){return mn(this,Kt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(a,o){return e.call(t,[o,a],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,a){return e.call(t,r,a,n)})).flip())}});var Jn=r.prototype;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function ar(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return x(arguments)}function ir(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0;return lr(e.__iterate(n?t?function(e,t){r=31*r+cr(Me(e),Me(t))|0}:function(e,t){r=r+cr(Me(e),Me(t))|0}:t?function(e){r=31*r+Me(e)|0}:function(e){r=r+Me(e)|0}),r)}function lr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Te((t=Ce(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Jn[d]=!0,Jn[j]=Qn.entries,Jn.__toJS=Qn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+ar(e)},Kn(a,{toKeyedSeq:function(){return new Gt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Jt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=A(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,ln(this,e,!1))},get:function(e,t){return(e=T(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=T(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,un(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=hn(this.toSeq(),Y.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},keySeq:function(){return ke(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,on(this,e,t,!1))},zip:function(){return mn(this,hn(this,or,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,mn(this,hn(this,e,t))}}),a.prototype[f]=!0,a.prototype[h]=!0,Kn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Qn.includes,o.prototype.contains=o.prototype.includes,Kn(W,r.prototype),Kn(Y,a.prototype),Kn(X,o.prototype),Kn(Ee,r.prototype),Kn(Se,a.prototype),Kn(xe,o.prototype),{Iterable:n,Seq:G,Collection:_e,Map:Ve,OrderedMap:Ht,List:St,Stack:Vn,Set:An,OrderedSet:jn,Record:Sn,Range:ke,Repeat:be,is:ge,fromJS:fe}}()},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),a=n(401),o=n(7667),i=n(1327),s=n(1866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},8407:(e,t,n)=>{var r=n(7040),a=n(4125),o=n(2117),i=n(7518),s=n(4705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},7071:(e,t,n)=>{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),a=n(1285),o=n(6e3),i=n(9916),s=n(5265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},3818:(e,t,n)=>{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),a=n(619),o=n(2385);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=a,i.prototype.has=o,e.exports=i},6384:(e,t,n)=>{var r=n(8407),a=n(7465),o=n(3779),i=n(7599),s=n(4758),l=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=a,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}},4636:(e,t,n)=>{var r=n(2545),a=n(5694),o=n(1469),i=n(4144),s=n(5776),l=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&a(e),p=!n&&!u&&i(e),d=!n&&!u&&!p&&l(e),f=n||u||p||d,h=f?r(e.length,String):[],m=h.length;for(var v in e)!t&&!c.call(e,v)||f&&("length"==v||p&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,m))||h.push(v);return h}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}},2908:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6556:(e,t,n)=>{var r=n(9465),a=n(7813);e.exports=function(e,t,n){(void 0!==n&&!a(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),a=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];o.call(e,t)&&a(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(3218),a=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9881:(e,t,n)=>{var r=n(7816),a=n(9291)(r);e.exports=a},760:(e,t,n)=>{var r=n(9881);e.exports=function(e,t){var n=[];return r(e,(function(e,r,a){t(e,r,a)&&n.push(e)})),n}},1848:e=>{e.exports=function(e,t,n,r){for(var a=e.length,o=n+(r?1:-1);r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),a=n(3674);e.exports=function(e,t){return e&&r(e,t,a)}},7786:(e,t,n)=>{var r=n(1811),a=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[a(t[n++])];return n&&n==o?e:void 0}},8866:(e,t,n)=>{var r=n(2488),a=n(1469);e.exports=function(e,t,n){var o=t(e);return a(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),a=n(9607),o=n(2333),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,n)=>{var r=n(4239),a=n(7005);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(2492),a=n(7005);e.exports=function e(t,n,o,i,s){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!=t&&n!=n:r(t,n,o,i,e,s))}},2492:(e,t,n)=>{var r=n(6384),a=n(7114),o=n(8351),i=n(6096),s=n(4160),l=n(1469),c=n(4144),u=n(6719),p="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,v,g){var y=l(e),b=l(t),w=y?d:s(e),k=b?d:s(t),_=(w=w==p?f:w)==f,E=(k=k==p?f:k)==f,S=w==k;if(S&&c(e)){if(!c(t))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new r),y||u(e)?a(e,t,n,m,v,g):o(e,t,w,n,m,v,g);if(!(1&n)){var x=_&&h.call(e,"__wrapped__"),C=E&&h.call(t,"__wrapped__");if(x||C){var T=x?e.value():e,M=C?t.value():t;return g||(g=new r),v(T,M,n,m,g)}}return!!S&&(g||(g=new r),i(e,t,n,m,v,g))}},2958:(e,t,n)=>{var r=n(6384),a=n(939);e.exports=function(e,t,n,o){var i=n.length,s=i,l=!o;if(null==e)return!s;for(e=Object(e);i--;){var c=n[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){var u=(c=n[i])[0],p=e[u],d=c[1];if(l&&c[2]){if(void 0===p&&!(u in e))return!1}else{var f=new r;if(o)var h=o(p,d,u,e,t,f);if(!(void 0===h?a(d,p,3,o,f):h))return!1}}return!0}},8458:(e,t,n)=>{var r=n(3560),a=n(5346),o=n(3218),i=n(346),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?d:s).test(i(e))}},8749:(e,t,n)=>{var r=n(4239),a=n(1780),o=n(7005),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[r(e)]}},7206:(e,t,n)=>{var r=n(1573),a=n(6432),o=n(6557),i=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?a(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),a=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),a=n(5726),o=n(3498),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}},1573:(e,t,n)=>{var r=n(2958),a=n(1499),o=n(2634);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),a=n(7361),o=n(9095),i=n(5403),s=n(9162),l=n(2634),c=n(327);e.exports=function(e,t){return i(e)&&s(t)?l(c(e),t):function(n){var i=a(n,e);return void 0===i&&i===t?o(n,e):r(t,i,3)}}},2980:(e,t,n)=>{var r=n(6384),a=n(6556),o=n(8483),i=n(9783),s=n(3218),l=n(1704),c=n(6390);e.exports=function e(t,n,u,p,d){t!==n&&o(n,(function(o,l){if(d||(d=new r),s(o))i(t,n,l,u,e,p,d);else{var f=p?p(c(t,l),o,l+"",t,n,d):void 0;void 0===f&&(f=o),a(t,l,f)}}),l)}},9783:(e,t,n)=>{var r=n(6556),a=n(4626),o=n(7133),i=n(278),s=n(8517),l=n(5694),c=n(1469),u=n(9246),p=n(4144),d=n(3560),f=n(3218),h=n(8630),m=n(6719),v=n(6390),g=n(3678);e.exports=function(e,t,n,y,b,w,k){var _=v(e,n),E=v(t,n),S=k.get(E);if(S)r(e,n,S);else{var x=w?w(_,E,n+"",e,t,k):void 0,C=void 0===x;if(C){var T=c(E),M=!T&&p(E),P=!T&&!M&&m(E);x=E,T||M||P?c(_)?x=_:u(_)?x=i(_):M?(C=!1,x=a(E,!0)):P?(C=!1,x=o(E,!0)):x=[]:h(E)||l(E)?(x=_,l(_)?x=g(_):f(_)&&!d(_)||(x=s(E))):C=!1}C&&(k.set(E,x),b(x,E,y,w,k),k.delete(E)),r(e,n,x)}}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},5976:(e,t,n)=>{var r=n(6557),a=n(5357),o=n(61);e.exports=function(e,t){return o(a(e,t,r),e+"")}},611:(e,t,n)=>{var r=n(4865),a=n(1811),o=n(5776),i=n(3218),s=n(327);e.exports=function(e,t,n,l){if(!i(e))return e;for(var c=-1,u=(t=a(t,e)).length,p=u-1,d=e;null!=d&&++c<u;){var f=s(t[c]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(c!=p){var m=d[f];void 0===(h=l?l(m,f,d):void 0)&&(h=i(m)?m:o(t[c+1])?[]:{})}r(d,f,h),d=d[f]}return e}},6560:(e,t,n)=>{var r=n(5703),a=n(8777),o=n(6557),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=i},5076:(e,t,n)=>{var r=n(9881);e.exports=function(e,t){var n;return r(e,(function(e,r,a){return!(n=t(e,r,a))})),!!n}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:(e,t,n)=>{var r=n(2705),a=n(9932),o=n(1469),i=n(3448),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},7561:(e,t,n)=>{var r=n(7990),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},1717:e=>{e.exports=function(e){return function(t){return e(t)}}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var r=n(1469),a=n(5403),o=n(5514),i=n(9833);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:o(i(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:(e,t,n)=>{var r=n(4865),a=n(9465);e.exports=function(e,t,n,o){var i=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),i?a(n,c,u):r(n,c,u)}return n}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),a=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t}))}},9291:(e,t,n)=>{var r=n(8612);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==a(s[i],i,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++a];if(!1===n(o[l],l,o))break}return t}}},7740:(e,t,n)=>{var r=n(7206),a=n(8612),o=n(3674);e.exports=function(e){return function(t,n,i){var s=Object(t);if(!a(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,i);return c>-1?s[l?t[c]:c]:void 0}}},8777:(e,t,n)=>{var r=n(852),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},7114:(e,t,n)=>{var r=n(8668),a=n(2908),o=n(4757);e.exports=function(e,t,n,i,s,l){var c=1&n,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h<u;){var g=e[h],y=t[h];if(i)var b=c?i(y,g,h,t,e,l):i(g,y,h,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(v){if(!a(t,(function(e,t){if(!o(v,t)&&(g===e||s(g,e,n,i,l)))return v.push(t)}))){m=!1;break}}else if(g!==y&&!s(g,y,n,i,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},8351:(e,t,n)=>{var r=n(2705),a=n(1149),o=n(7813),i=n(7114),s=n(8776),l=n(1814),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,p,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var h=1&r;if(f||(f=l),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;r|=2,d.set(e,t);var v=i(f(e),f(t),r,c,p,d);return d.delete(e),v;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,i,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var p=u;p--;){var d=c[p];if(!(l?d in t:a.call(t,d)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var v=l;++p<u;){var g=e[d=c[p]],y=t[d];if(o)var b=l?o(y,g,d,t,e,s):o(g,y,d,e,t,s);if(!(void 0===b?g===y||i(g,y,n,o,s):b)){m=!1;break}v||(v="constructor"==d)}if(m&&!v){var w=e.constructor,k=t.constructor;w==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(m=!1)}return s.delete(e),s.delete(t),m}},1957:e=>{var t="object"==typeof window&&window&&window.Object===Object&&window;e.exports=t},8234:(e,t,n)=>{var r=n(8866),a=n(9551),o=n(3674);e.exports=function(e){return r(e,o,a)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),a=n(3674);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,r(i)]}return t}},852:(e,t,n)=>{var r=n(8458),a=n(7801);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},9551:(e,t,n)=>{var r=n(4963),a=n(479),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return o.call(e,t)})))}:a;e.exports=s},4160:(e,t,n)=>{var r=n(8552),a=n(7071),o=n(3818),i=n(8525),s=n(577),l=n(4239),c=n(346),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",m=c(r),v=c(a),g=c(o),y=c(i),b=c(s),w=l;(r&&w(new r(new ArrayBuffer(1)))!=h||a&&w(new a)!=u||o&&w(o.resolve())!=p||i&&w(new i)!=d||s&&w(new s)!=f)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return h;case v:return u;case g:return p;case y:return d;case b:return f}return t}),e.exports=w},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),a=n(5694),o=n(1469),i=n(5776),s=n(1780),l=n(327);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,p=!1;++c<u;){var d=l(t[c]);if(!(p=null!=e&&n(e,d)))break;e=e[d]}return p||++c!=u?p:!!(u=null==e?0:e.length)&&s(u)&&i(d,u)&&(o(e)||a(e))}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,n)=>{var r=n(3118),a=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(a(e))}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6612:(e,t,n)=>{var r=n(7813),a=n(8612),o=n(5776),i=n(3218);e.exports=function(e,t,n){if(!i(n))return!1;var s=typeof t;return!!("number"==s?a(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),a=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(i.test(e)||!o.test(e)||null!=t&&e in Object(t))}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,a=n(4429),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),a=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),a=Math.max;e.exports=function(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=a(o.length-t,0),l=Array(s);++i<s;)l[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(l),r(e,this,c)}}},5639:(e,t,n)=>{var r=n(1957),a="object"==typeof self&&self&&self.Object===Object&&self,o=r||a||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),a=n(1275)(r);e.exports=a},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var a=t(),o=16-(a-r);if(r=a,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),a=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(i)}return n.set(e,t),this.size=n.size,this}},5514:(e,t,n)=>{var r=n(4523),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(o,"$1"):n||e)})),t}));e.exports=i},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},8583:(e,t,n)=>{var r=n(4865),a=n(8363),o=n(1463),i=n(8612),s=n(5726),l=n(3674),c=Object.prototype.hasOwnProperty,u=o((function(e,t){if(s(t)||i(t))a(t,l(t),e);else for(var n in t)c.call(t,n)&&r(e,n,t[n])}));e.exports=u},5703:e=>{e.exports=function(e){return function(){return e}}},3279:(e,t,n)=>{var r=n(3218),a=n(7771),o=n(4841),i=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,p,d,f,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=c;return l=c=void 0,h=t,p=e.apply(r,n)}function b(e){return h=e,d=setTimeout(k,t),m?y(e):p}function w(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-h>=u}function k(){var e=a();if(w(e))return _(e);d=setTimeout(k,function(e){var n=t-(e-f);return v?s(n,u-(e-h)):n}(e))}function _(e){return d=void 0,g&&l?y(e):(l=c=void 0,p)}function E(){var e=a(),n=w(e);if(l=arguments,c=this,f=e,n){if(void 0===d)return b(f);if(v)return clearTimeout(d),d=setTimeout(k,t),y(f)}return void 0===d&&(d=setTimeout(k,t)),p}return t=o(t)||0,r(n)&&(m=!!n.leading,u=(v="maxWait"in n)?i(o(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==d&&clearTimeout(d),h=0,l=f=c=d=void 0},E.flush=function(){return void 0===d?p:_(a())},E}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3105:(e,t,n)=>{var r=n(4963),a=n(760),o=n(7206),i=n(1469);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},3311:(e,t,n)=>{var r=n(7740)(n(998));e.exports=r},998:(e,t,n)=>{var r=n(1848),a=n(7206),o=n(554),i=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=i(s+l,0)),r(e,a(t,3),l)}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},9095:(e,t,n)=>{var r=n(13),a=n(222);e.exports=function(e,t){return null!=e&&a(e,t,r)}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,n)=>{var r=n(9454),a=n(7005),o=Object.prototype,i=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),a=n(1780);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),a=n(7005);e.exports=function(e){return a(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),a=n(5062),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||a;e.exports=l},1609:(e,t,n)=>{var r=n(280),a=n(4160),o=n(5694),i=n(1469),s=n(8612),l=n(4144),c=n(5726),u=n(6719),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||o(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),a=n(3218);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),a=n(5924),o=n(7005),i=Function.prototype,s=Object.prototype,l=i.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},7037:(e,t,n)=>{var r=n(4239),a=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!a(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),a=n(7005);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),a=n(1717),o=n(1167),i=o&&o.isTypedArray,s=i?a(i):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),a=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):a(e)}},1704:(e,t,n)=>{var r=n(4636),a=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):a(e)}},8306:(e,t,n)=>{var r=n(3369);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},236:(e,t,n)=>{var r=n(2980),a=n(1463)((function(e,t,n,a){r(e,t,n,a)}));e.exports=a},7771:(e,t,n)=>{var r=n(5639);e.exports=function(){return r.Date.now()}},9601:(e,t,n)=>{var r=n(371),a=n(9152),o=n(5403),i=n(327);e.exports=function(e){return o(e)?r(i(e)):a(e)}},6968:(e,t,n)=>{var r=n(611);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},9704:(e,t,n)=>{var r=n(2908),a=n(7206),o=n(5076),i=n(1469),s=n(6612);e.exports=function(e,t,n){var l=i(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,a(t,3))}},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841),a=1/0;e.exports=function(e){return e?(e=r(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),a=n(3218),o=n(3448),i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}},3678:(e,t,n)=>{var r=n(8363),a=n(1704);e.exports=function(e){return r(e,a(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3542:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";var r=n(5)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=n(18)()?Symbol:n(20)},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateRange=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(_n=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(s){r=!0,a=s}finally{try{!_n&&i.return&&i.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.extendMoment=function(e){return e.range=function(t,n){return p.hasOwnProperty(t)?new d(e(this).startOf(t),e(this).endOf(t)):new d(t,n)},e.rangeFromInterval=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e();if(e.isMoment(r)||(r=e(r)),!r.isValid())throw new Error("Invalid date.");var a=r.clone().add(n,t),o=[];return o.push(e.min(r,a)),o.push(e.max(r,a)),new d(o)},e.parseZoneRange=function(t){var n=f(t),r=e.parseZone(n[0]),a=e.parseZone(n[1]);return new d(r,a)},e.fn.range=e.range,e.range.constructor=d,e.isRange=function(e){return e instanceof d},e.fn.within=function(e){return e.contains(this.toDate())},e};var i=l(n(2)),s=l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p={year:!0,quarter:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0},d=t.DateRange=function(){function e(t,n){u(this,e);var o=t,s=n;if(1===arguments.length||void 0===n)if("object"===(void 0===t?"undefined":a(t))&&2===t.length){var l=r(t,2);o=l[0],s=l[1]}else if("string"==typeof t){var c=f(t),p=r(c,2);o=p[0],s=p[1]}this.start=o||0===o?(0,i.default)(o):(0,i.default)(-864e13),this.end=s||0===s?(0,i.default)(s):(0,i.default)(864e13)}return o(e,[{key:"adjacent",value:function(e){var t=this.start.isSame(e.end),n=this.end.isSame(e.start);return t&&e.start.valueOf()<=this.start.valueOf()||n&&e.end.valueOf()>=this.end.valueOf()}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1};return this.overlaps(e,t)?new this.constructor(i.default.min(this.start,e.start),i.default.max(this.end,e.end)):null}},{key:"by",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this;return c({},s.default.iterator,(function(){var r=t.exclusive||!1,a=t.step||1,o=Math.abs(n.start.diff(n.end,e))/a,i=0;return{next:function(){var t=n.start.clone().add(i*a,e),s=r?!(i<o):!(i<=o);return i++,{done:s,value:s?void 0:t}}}}))}},{key:"byRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this,r=t.step||1,a=this.valueOf()/e.valueOf()/r,o=t.exclusive||!1,l=Math.floor(a),u=0;return c({},s.default.iterator,(function(){return l===1/0?{done:!0}:{next:function(){var t=(0,i.default)(n.start.valueOf()+e.valueOf()*u*r),s=l===a&&o?!(u<l):!(u<=l);return u++,{done:s,value:s?void 0:t}}}}))}},{key:"center",value:function(){var e=this.start.valueOf()+this.diff()/2;return(0,i.default)(e)}},{key:"clone",value:function(){return new this.constructor(this.start,this.end)}},{key:"contains",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1},r=this.start.valueOf(),a=this.end.valueOf(),o=t.valueOf(),i=t.valueOf();t instanceof e&&(o=t.start.valueOf(),i=t.end.valueOf());var s=r<o||r<=o&&!n.exclusive,l=a>i||a>=i&&!n.exclusive;return s&&l}},{key:"diff",value:function(e,t){return this.end.diff(this.start,e,t)}},{key:"duration",value:function(e,t){return this.diff(e,t)}},{key:"intersect",value:function(e){var t=this.start.valueOf(),n=this.end.valueOf(),r=e.start.valueOf(),a=e.end.valueOf();if(t==n){if(t==r||t==a)return null;if(t>r&&t<a)return this}else if(r==a){if(r==t||r==n)return null;if(r>t&&r<n)return e}return t<=r&&r<n&&n<a?new this.constructor(r,n):r<t&&t<a&&a<=n?new this.constructor(t,a):r<t&&t<=n&&n<a?this:t<=r&&r<=a&&a<=n?e:null}},{key:"isEqual",value:function(e){return this.start.isSame(e.start)&&this.end.isSame(e.end)}},{key:"isSame",value:function(e){return this.isEqual(e)}},{key:"overlaps",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1},n=null!==this.intersect(e);return t.adjacent&&!n?this.adjacent(e):n}},{key:"reverseBy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this;return c({},s.default.iterator,(function(){var r=t.exclusive||!1,a=t.step||1,o=Math.abs(n.start.diff(n.end,e))/a,i=0;return{next:function(){var t=n.end.clone().subtract(i*a,e),s=r?!(i<o):!(i<=o);return i++,{done:s,value:s?void 0:t}}}}))}},{key:"reverseByRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exclusive:!1,step:1},n=this,r=t.step||1,a=this.valueOf()/e.valueOf()/r,o=t.exclusive||!1,l=Math.floor(a),u=0;return c({},s.default.iterator,(function(){return l===1/0?{done:!0}:{next:function(){var t=(0,i.default)(n.end.valueOf()-e.valueOf()*u*r),s=l===a&&o?!(u<l):!(u<=l);return u++,{done:s,value:s?void 0:t}}}}))}},{key:"subtract",value:function(e){var t=this.start.valueOf(),n=this.end.valueOf(),r=e.start.valueOf(),a=e.end.valueOf();return null===this.intersect(e)?[this]:r<=t&&t<n&&n<=a?[]:r<=t&&t<a&&a<n?[new this.constructor(a,n)]:t<r&&r<n&&n<=a?[new this.constructor(t,r)]:t<r&&r<a&&a<n?[new this.constructor(t,r),new this.constructor(a,n)]:t<r&&r<n&&a<n?[new this.constructor(t,r),new this.constructor(r,n)]:[]}},{key:"toDate",value:function(){return[this.start.toDate(),this.end.toDate()]}},{key:"toString",value:function(){return this.start.format()+"/"+this.end.format()}},{key:"valueOf",value:function(){return this.end.valueOf()-this.start.valueOf()}}]),e}();function f(e){return e.split("/")}},function(e,t,n){"use strict";var r,a=n(6),o=n(13),i=n(9),s=n(15);r=e.exports=function(e,t){var n,r,i,l,c;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],null==e?(n=i=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),i=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:i},l?a(o(l),c):c},r.gs=function(e,t,n){var r,l,c,u;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:i(t)?null==n?n=void 0:i(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,l=!1):(r=s.call(e,"c"),l=s.call(e,"e")),u={get:t,set:n,configurable:r,enumerable:l},c?a(o(c),u):u}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";e.exports=n(7)()?Object.assign:n(8)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(10),a=n(14),o=Math.max;e.exports=function(e,t){var n,i,s,l=o(arguments.length,2);for(e=Object(a(e)),s=function(r){try{e[r]=t[r]}catch(a){n||(n=a)}},i=1;i<l;++i)r(t=arguments[i]).forEach(s);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(11)()?Object.keys:n(12)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(0),a=Object.keys;e.exports=function(e){return a(r(e)?Object(e):e)}},function(e,t,n){"use strict";var r=n(0),a=Array.prototype.forEach,o=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return a.call(arguments,(function(e){r(e)&&i(Object(e),t)})),t}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(16)()?String.prototype.contains:n(17)},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r={object:!0,symbol:!0};e.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(t){return!1}return!!r[typeof Symbol.iterator]&&!!r[typeof Symbol.toPrimitive]&&!!r[typeof Symbol.toStringTag]}},function(e,t,n){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},function(e,t,n){"use strict";var r,a,o,i,s=n(4),l=n(21),c=Object.create,u=Object.defineProperties,p=Object.defineProperty,d=Object.prototype,f=c(null);if("function"==typeof Symbol){r=Symbol;try{String(r()),i=!0}catch(v){}}var h,m=(h=c(null),function(e){for(var t,n,r=0;h[e+(r||"")];)++r;return h[e+=r||""]=!0,p(d,t="@@"+e,s.gs(null,(function(e){n||(n=!0,p(this,t,s(e)),n=!1)}))),t});o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(e)},e.exports=a=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return i?r(t):(n=c(o.prototype),t=void 0===t?"":String(t),u(n,{__description__:s("",t),__name__:s("",m(t))}))},u(a,{for:s((function(e){return f[e]?f[e]:f[e]=a(String(e))})),keyFor:s((function(e){var t;for(t in l(e),f)if(f[t]===e)return t})),hasInstance:s("",r&&r.hasInstance||a("hasInstance")),isConcatSpreadable:s("",r&&r.isConcatSpreadable||a("isConcatSpreadable")),iterator:s("",r&&r.iterator||a("iterator")),match:s("",r&&r.match||a("match")),replace:s("",r&&r.replace||a("replace")),search:s("",r&&r.search||a("search")),species:s("",r&&r.species||a("species")),split:s("",r&&r.split||a("split")),toPrimitive:s("",r&&r.toPrimitive||a("toPrimitive")),toStringTag:s("",r&&r.toStringTag||a("toStringTag")),unscopables:s("",r&&r.unscopables||a("unscopables"))}),u(o.prototype,{constructor:s(a),toString:s("",(function(){return this.__name__}))}),u(a.prototype,{toString:s((function(){return"Symbol ("+l(this).__description__+")"})),valueOf:s((function(){return l(this)}))}),p(a.prototype,a.toPrimitive,s("",(function(){var e=l(this);return"symbol"==typeof e?e:e.toString()}))),p(a.prototype,a.toStringTag,s("c","Symbol")),p(o.prototype,a.toStringTag,s("c",a.prototype[a.toStringTag])),p(o.prototype,a.toPrimitive,s("c",a.prototype[a.toPrimitive]))},function(e,t,n){"use strict";var r=n(19);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}}])},e.exports=r(n(6292))},272:(e,t,n)=>{"use strict";n.d(t,{fM:()=>We,Vk:()=>Qe,ah:()=>at,zx:()=>Dn,Zb:()=>Rn,$_:()=>Ir,RG:()=>Ar,rj:()=>Vr,OQ:()=>Rr,TR:()=>Br,RZ:()=>Hr,u_:()=>Ur,VQ:()=>Wr,qX:()=>ea,pe:()=>ra,xf:()=>ia,M$:()=>ma,Yw:()=>_a,_g:()=>Aa,w4:()=>Na,Pi:()=>Da,PT:()=>xr});var r={};n.r(r),n.d(r,{BrowserRouter:()=>kn,HashRouter:()=>En,Link:()=>Pn,MemoryRouter:()=>Xt,NavLink:()=>In,Prompt:()=>Qt,Redirect:()=>nn,Route:()=>sn,Router:()=>Yt,StaticRouter:()=>fn,Switch:()=>hn,generatePath:()=>tn,matchPath:()=>on,useHistory:()=>gn,useLocation:()=>yn,useParams:()=>bn,useRouteMatch:()=>wn,withRouter:()=>mn});var a=n(9307),o=n(3967),i=n.n(o);var s=n(4942),l=n(5609);const c=(0,a.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:r})}));var u=n(9196),p=n.n(u),d=n(444);const f=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),h=(0,u.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(d.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),m=(0,u.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(d.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var v=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(Un){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),g=Math.abs,y=String.fromCharCode,b=Object.assign;function w(e){return e.trim()}function k(e,t,n){return e.replace(t,n)}function _(e,t){return e.indexOf(t)}function E(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function x(e){return e.length}function C(e){return e.length}function T(e,t){return t.push(e),e}var M=1,P=1,A=0,O=0,I=0,N="";function z(e,t,n,r,a,o,i){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:M,column:P,length:i,return:""}}function D(e,t){return b(z("",null,null,"",null,null,0),e,{length:-e.length},t)}function L(){return I=O>0?E(N,--O):0,P--,10===I&&(P=1,M--),I}function R(){return I=O<A?E(N,O++):0,P++,10===I&&(P=1,M++),I}function j(){return E(N,O)}function B(){return O}function F(e,t){return S(N,e,t)}function $(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function H(e){return M=P=1,A=x(N=e),O=0,[]}function q(e){return N="",e}function V(e){return w(F(O-1,G(91===e?e+2:40===e?e+1:e)))}function Z(e){for(;(I=j())&&I<33;)R();return $(e)>2||$(I)>3?"":" "}function U(e,t){for(;--t&&R()&&!(I<48||I>102||I>57&&I<65||I>70&&I<97););return F(e,B()+(t<6&&32==j()&&32==R()))}function G(e){for(;R();)switch(I){case e:return O;case 34:case 39:34!==e&&39!==e&&G(I);break;case 40:41===e&&G(e);break;case 92:R()}return O}function W(e,t){for(;R()&&e+I!==57&&(e+I!==84||47!==j()););return"/*"+F(t,O-1)+"*"+y(47===e?e:R())}function Y(e){for(;!$(j());)R();return F(e,O)}var X="-ms-",K="-moz-",Q="-webkit-",J="comm",ee="rule",te="decl",ne="@keyframes";function re(e,t){for(var n="",r=C(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function ae(e,t,n,r){switch(e.type){case"@import":case te:return e.return=e.return||e.value;case J:return"";case ne:return e.return=e.value+"{"+re(e.children,r)+"}";case ee:e.value=e.props.join(",")}return x(n=re(e.children,r))?e.return=e.value+"{"+n+"}":""}function oe(e){return q(ie("",null,null,null,[""],e=H(e),0,[0],e))}function ie(e,t,n,r,a,o,i,s,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,v=1,g=1,b=0,w="",S=a,C=o,M=r,P=w;v;)switch(h=b,b=R()){case 40:if(108!=h&&58==E(P,p-1)){-1!=_(P+=k(V(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:P+=V(b);break;case 9:case 10:case 13:case 32:P+=Z(h);break;case 92:P+=U(B()-1,7);continue;case 47:switch(j()){case 42:case 47:T(le(W(R(),B()),t,n),l);break;default:P+="/"}break;case 123*m:s[c++]=x(P)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:f>0&&x(P)-p&&T(f>32?ce(P+";",r,n,p-1):ce(k(P," ","")+";",r,n,p-2),l);break;case 59:P+=";";default:if(T(M=se(P,t,n,c,u,a,s,w,S=[],C=[],p),o),123===b)if(0===u)ie(P,t,M,M,S,o,p,s,C);else switch(99===d&&110===E(P,3)?100:d){case 100:case 109:case 115:ie(e,M,M,r&&T(se(e,M,M,0,0,a,s,w,a,S=[],p),C),a,C,p,s,r?S:C);break;default:ie(P,M,M,M,[""],C,0,s,C)}}c=u=f=0,m=g=1,w=P="",p=i;break;case 58:p=1+x(P),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==L())continue;switch(P+=y(b),b*m){case 38:g=u>0?1:(P+="\f",-1);break;case 44:s[c++]=(x(P)-1)*g,g=1;break;case 64:45===j()&&(P+=V(R())),d=j(),u=p=x(w=P+=Y(B())),b++;break;case 45:45===h&&2==x(P)&&(m=0)}}return o}function se(e,t,n,r,a,o,i,s,l,c,u){for(var p=a-1,d=0===a?o:[""],f=C(d),h=0,m=0,v=0;h<r;++h)for(var y=0,b=S(e,p+1,p=g(m=i[h])),_=e;y<f;++y)(_=w(m>0?d[y]+" "+b:k(b,/&\f/g,d[y])))&&(l[v++]=_);return z(e,t,n,0===a?ee:s,l,c,u)}function le(e,t,n){return z(e,t,n,J,y(I),S(e,2,-2),0)}function ce(e,t,n,r){return z(e,t,n,te,S(e,0,r),S(e,r+1,-1),r)}var ue=function(e,t,n){for(var r=0,a=0;r=a,a=j(),38===r&&12===a&&(t[n]=1),!$(a);)R();return F(e,O)},pe=function(e,t){return q(function(e,t){var n=-1,r=44;do{switch($(r)){case 0:38===r&&12===j()&&(t[n]=1),e[n]+=ue(O-1,t,n);break;case 2:e[n]+=V(r);break;case 4:if(44===r){e[++n]=58===j()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=y(r)}}while(r=R());return e}(H(e),t))},de=new WeakMap,fe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||de.get(n))&&!r){de.set(e,!0);for(var a=[],o=pe(t,a),i=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<i.length;c++,l++)e.props[l]=a[s]?o[s].replace(/&\f/g,i[c]):i[c]+" "+o[s]}}},he=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function me(e,t){switch(function(e,t){return 45^E(e,0)?(((t<<2^E(e,0))<<2^E(e,1))<<2^E(e,2))<<2^E(e,3):0}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Q+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Q+e+K+e+X+e+e;case 6828:case 4268:return Q+e+X+e+e;case 6165:return Q+e+X+"flex-"+e+e;case 5187:return Q+e+k(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Q+e+X+"flex-item-"+k(e,/flex-|-self/,"")+e;case 4675:return Q+e+X+"flex-line-pack"+k(e,/align-content|flex-|-self/,"")+e;case 5548:return Q+e+X+k(e,"shrink","negative")+e;case 5292:return Q+e+X+k(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+k(e,"-grow","")+Q+e+X+k(e,"grow","positive")+e;case 4554:return Q+k(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return k(k(k(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return k(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return k(k(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Q+e+e;case 4095:case 3583:case 4068:case 2532:return k(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(x(e)-1-t>6)switch(E(e,t+1)){case 109:if(45!==E(e,t+4))break;case 102:return k(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==E(e,t+3)?"$3":"$2-$3"))+e;case 115:return~_(e,"stretch")?me(k(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==E(e,t+1))break;case 6444:switch(E(e,x(e)-3-(~_(e,"!important")&&10))){case 107:return k(e,":",":-webkit-")+e;case 101:return k(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===E(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(E(e,t+11)){case 114:return Q+e+X+k(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Q+e+X+k(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Q+e+X+k(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Q+e+X+e+e}return e}var ve=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case te:e.return=me(e.value,e.length);break;case ne:return re([D(e,{value:k(e.value,"@","@-webkit-")})],r);case ee:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return re([D(e,{props:[k(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return re([D(e,{props:[k(t,/:(plac\w+)/,":-webkit-input-$1")]}),D(e,{props:[k(t,/:(plac\w+)/,":-moz-$1")]}),D(e,{props:[k(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}];const ge=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ve;var a,o,i={},s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)}));var l,c,u,p,d=[ae,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(c=[fe,he].concat(r,d),u=C(c),function(e,t,n,r){for(var a="",o=0;o<u;o++)a+=c[o](e,t,n,r)||"";return a});o=function(e,t,n,r){l=n,re(oe(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new v({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return h.sheet.hydrate(s),h};var ye=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};const be=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const we={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};const ke=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}};var _e=/[A-Z]|^ms/g,Ee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Se=function(e){return 45===e.charCodeAt(1)},xe=function(e){return null!=e&&"boolean"!=typeof e},Ce=ke((function(e){return Se(e)?e:e.replace(_e,"-$&").toLowerCase()})),Te=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ee,(function(e,t,n){return Pe={name:t,styles:n,next:Pe},t}))}return 1===we[e]||Se(e)||"number"!=typeof t||0===t?t:t+"px"};function Me(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Pe={name:n.name,styles:n.styles,next:Pe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Pe={name:r.name,styles:r.styles,next:Pe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=Me(e,t,n[a])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":xe(i)&&(r+=Ce(o)+":"+Te(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Me(e,t,i);switch(o){case"animation":case"animationName":r+=Ce(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<i.length;l++)xe(i[l])&&(r+=Ce(o)+":"+Te(o,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=Pe,o=n(e);return Pe=a,Me(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var Pe,Ae=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Oe=!!u.useInsertionEffect&&u.useInsertionEffect,Ie=Oe||function(e){return e()},Ne=(Oe||u.useLayoutEffect,{}.hasOwnProperty),ze=(0,u.createContext)("undefined"!=typeof HTMLElement?ge({key:"css"}):null);ze.Provider;var De=function(e){return(0,u.forwardRef)((function(t,n){var r=(0,u.useContext)(ze);return e(t,r,n)}))},Le=(0,u.createContext)({});var Re="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",je=function(e,t){var n={};for(var r in t)Ne.call(t,r)&&(n[r]=t[r]);return n[Re]=e,n},Be=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;ye(t,n,r);Ie((function(){return function(e,t,n){ye(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}(t,n,r)}));return null},Fe=De((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var a=e[Re],o=[r],i="";"string"==typeof e.className?i=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,o,e.className):null!=e.className&&(i=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";Pe=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=Me(n,t,o)):a+=o[0];for(var i=1;i<e.length;i++)a+=Me(n,t,e[i]),r&&(a+=o[i]);Ae.lastIndex=0;for(var s,l="";null!==(s=Ae.exec(a));)l+="-"+s[1];return{name:be(a)+l,styles:a,next:Pe}}(o,void 0,(0,u.useContext)(Le));i+=t.key+"-"+s.name;var l={};for(var c in e)Ne.call(e,c)&&"css"!==c&&c!==Re&&(l[c]=e[c]);return l.ref=n,l.className=i,(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Be,{cache:t,serialized:s,isStringTag:"string"==typeof a}),(0,u.createElement)(a,l))}));var $e=n(8679),He=n.n($e),qe=n(5893),Ve=qe.Fragment;function Ze(e,t,n){return Ne.call(t,"css")?(0,qe.jsx)(Fe,je(e,t),n):(0,qe.jsx)(e,t,n)}function Ue(e,t,n){return Ne.call(t,"css")?(0,qe.jsxs)(Fe,je(e,t),n):(0,qe.jsxs)(e,t,n)}class Ge extends a.Component{constructor(){super(...arguments),(0,s.Z)(this,"state",{expanded:!1})}componentDidUpdate(e){!e.collapse&&this.props.collapse&&this.state.expanded&&this.setState({expanded:!1})}render(){const{badge:e,className:t,checkbox:n,children:r,disabled:a,title:o,description:s,handoff:u,editLink:p,href:d,notification:v,notificationLevel:g,notificationHTML:y,actionContent:b,actionText:w,secondaryActionText:k,secondaryDestructive:_,image:E,imageLink:S,indent:x,isSmall:C,isMedium:T,simple:M,onClick:P,onSecondaryActionClick:A,isWaiting:O,titleLink:I,toggleChecked:N,toggleOnChange:z,hasGreyHeader:D,hasWhiteHeader:L,isPending:R,expandable:j=!1}=this.props,{expanded:B}=this.state,F=v||r,$=i()("newspack-action-card",M&&"newspack-card--is-clickable",D&&"newspack-card--has-grey-header",L&&"newspack-card--has-white-header",F&&"newspack-card--has-children",x&&"newspack-card--indent",C&&"is-small",T&&"is-medium",n&&"has-checkbox",j&&"is-expandable",b&&"has-action-content",t),H=!z||I||a?{}:{onClick:()=>z(!N),tabIndex:"0"},q=d&&0!==d.indexOf("http"),V=k&&A,Z=!Array.isArray(e)&&e?[e]:e;return Ue(Rn,{className:$,onClick:M&&P,children:[Ue("div",{className:"newspack-action-card__region newspack-action-card__region-top",children:[z&&Ze(l.ToggleControl,{checked:N,onChange:z,disabled:a}),E&&!z&&Ze("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:Ze("a",{href:S,children:Ze("div",{className:"newspack-action-card__image",style:(U=E,U?{backgroundImage:`url(${U})`}:{})})})}),n&&!z&&Ze("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:Ze("span",{className:i()("newspack-checkbox-icon","is-primary","checked"===n&&"newspack-checkbox-icon--checked",R&&"newspack-checkbox-icon--pending"),children:"checked"===n&&Ze(c,{icon:f})})}),Ze("div",{className:"newspack-action-card__region newspack-action-card__region-center",children:Ue(Vr,{columns:1,gutter:8,noMargin:!0,children:[Ue("h2",{children:[Ue("span",{className:"newspack-action-card__title",...H,children:[I&&Ze("a",{href:I,children:o}),!I&&j&&Ze(Dn,{isLink:!0,onClick:()=>this.setState({expanded:!B}),children:o}),!I&&!j&&o]}),Z?.length&&Z.map(((e,t)=>Ze("span",{className:"newspack-action-card__badge",children:e},`badge-${t}`)))]}),s&&Ue("p",{children:["string"==typeof s&&s,"function"==typeof s&&s()]})]})}),!j&&(w||V||b)&&Ue("div",{className:"newspack-action-card__region newspack-action-card__region-right",children:[b&&b,w&&(u?Ze(Rr,{plugin:u,editLink:p,compact:!0,isLink:!0,children:w}):P||q?Ze(Dn,{disabled:a,isLink:!0,href:d,onClick:P,className:"newspack-action-card__primary_button",children:w}):d?Ze(l.ExternalLink,{href:d,className:"newspack-action-card__primary_button",children:w}):Ue("div",{className:"newspack-action-card__container",children:[w,O&&Ze(Da,{isRight:!0})]})),V&&Ze(Dn,{isLink:!0,onClick:A,className:"newspack-action-card__secondary_button",isDestructive:_,children:k})]}),j&&Ze(Dn,{onClick:()=>this.setState({expanded:!B}),children:Ze(c,{icon:B?h:m,height:24,width:24})})]}),v&&Ue("div",{className:"newspack-action-card__notification newspack-action-card__region-children",children:["error"===g&&Ze(ea,{noticeText:v,isError:!0,rawHTML:y}),"info"===g&&Ze(ea,{noticeText:v,rawHTML:y}),"success"===g&&Ze(ea,{noticeText:v,isSuccess:!0,rawHTML:y}),"warning"===g&&Ze(ea,{noticeText:v,isWarning:!0,rawHTML:y})]}),r&&(j&&B||!j)&&Ze("div",{className:"newspack-action-card__region-children",children:r})]});var U}}Ge.defaultProps={toggleChecked:!1};const We=Ge;var Ye=n(3279),Xe=n.n(Ye);class Ke extends a.Component{constructor(e){super(e),(0,s.Z)(this,"isFetchingInfoOnLoad",(()=>{const{tokens:e,fetchSavedInfo:t}=this.props;return Boolean(e.length&&t)})),this.state={suggestions:[],validValues:{},loading:this.isFetchingInfoOnLoad()},this.debouncedUpdateSuggestions=Xe()(this.updateSuggestions,500)}componentDidMount(){if(this.isFetchingInfoOnLoad()){const{tokens:e,fetchSavedInfo:t}=this.props;t(e).then((e=>{const{validValues:t}=this.state;e.forEach((e=>{t[e.value]=e.label})),this.setState({validValues:t,loading:!1})}))}}componentWillUnmount(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}getLabelsForValues(e){const{validValues:t}=this.state;return e.reduce(((e,n)=>n?n.label?[...e,n.label]:t[n]?[...e,t[n]]:e:e),[])}getValuesForLabels(e){const{returnFullObjects:t}=this.props,{validValues:n}=this.state;return t?e.reduce(((e,t)=>(Object.keys(n).forEach((r=>{n[r]===t&&e.push({value:r,label:t})})),e)),[]):e.map((e=>Object.keys(n).find((t=>n[t]===e))))}updateSuggestions(e){const{fetchSuggestions:t}=this.props;t&&this.setState({loading:!0},(()=>{const n=t(e);n.then((e=>{if(this.suggestionsRequest!==n)return;const t=[...e],r={};e.forEach((e=>{r[e.value]=e.label})),this.setState({suggestions:t,validValues:r,loading:!1})})).catch((()=>{this.suggestionsRequest===n&&this.setState({loading:!1})})),this.suggestionsRequest=n}))}handleOnChange(e){const{onChange:t}=this.props;t(this.getValuesForLabels(e))}getTokens(){const{tokens:e}=this.props;return this.getLabelsForValues(e)}render(){const{help:e,label:t="",maxLength:n}=this.props,{suggestions:r,loading:a}=this.state;return Ue("div",{className:"newspack-autocomplete-tokenfield",children:[Ze(l.FormTokenField,{value:this.getTokens(),suggestions:r.map((e=>e.label)),onChange:e=>this.handleOnChange(e),onInputChange:e=>this.debouncedUpdateSuggestions(e),label:t,maxLength:n}),a&&Ze(l.Spinner,{}),e&&Ze("p",{className:"newspack-autocomplete-tokenfield__help",children:e})]})}}const Qe=Ke;var Je=n(6989),et=n.n(Je),tt=n(2629),nt=n(5736),rt=n(6483);const __=nt.__,_x=nt._x,at=e=>{let{fetchSavedPosts:t=!1,fetchSuggestions:n=!1,help:r=__("Begin typing search term, click autocomplete result to select.","newspack"),hideHelp:o=!1,label:i=__("Search","newspack"),maxItemsToSuggest:s=0,multiSelect:c=!1,onChange:u=!1,onPostTypeChange:p=!1,postTypes:d=[{slug:"post",label:"Post"}],postTypeLabel:f=__("item","newspack"),postTypeLabelPlural:h=__("items","newspack"),selectedItems:m=[],selectedPost:v=0,suggestionsToFetch:g=10}=e;const[y,b]=(0,a.useState)(!0),[w,k]=(0,a.useState)(!1),[_,E]=(0,a.useState)([]),[S,x]=(0,a.useState)(0),[C,T]=(0,a.useState)(d[0].slug),M=["newspack-autocomplete-with-suggestions"];o&&M.push("hide-help"),(0,a.useEffect)((()=>{p&&p(C),b(!0),A(null,0,C).then((e=>{0<e.length&&E(e)})).finally((()=>b(!1)))}),[C]),(0,a.useEffect)((()=>{w&&A(null,_.length,C).then((e=>{0<e.length&&E(_.concat(e))})).finally((()=>k(!1)))}),[w]);const P=t||async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t||C,r="post"===n||"page"===n?n+"s":n,a=await et()({path:(0,rt.addQueryArgs)("/wp/v2/"+r,{per_page:100,include:e.join(","),_fields:"id,title"})});return a.map((e=>({value:parseInt(e.id),label:(0,tt.decodeEntities)(e.title)||__("(no title)","newspack")})))},A=n||async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=n||C,a="post"===r||"page"===r?r+"s":r,o=await et()({parse:!1,path:(0,rt.addQueryArgs)("/wp/v2/"+a,{search:e,offset:t,per_page:g,_fields:"id,title"})}),i=parseInt(o.headers.get("x-wp-total")||0),s=await o.json();return x(i),s.reduce(((e,t)=>(e.push({value:parseInt(t.id),label:(0,tt.decodeEntities)(t?.title.rendered)||__("(no title)","newspack")}),e)),[])},O=e=>{if(!c)return u(e);const t=v?[...m,v]:[...m];e.forEach((e=>{const n=t.findIndex((t=>parseInt(t.value)===parseInt(e.value)));-1<n?t.splice(n,1):t.push(e)})),u(t.map((e=>({...e,postType:C}))))},I=e=>{if(c){const t=!!(v?[...m,v]:[...m]).find((t=>parseInt(t.value)===parseInt(e.value)&&t.label===e.label));return Ze(l.CheckboxControl,{checked:t,onChange:()=>O([e]),label:e.label},e.value)}return Ze(l.Button,{isLink:!0,onClick:()=>O([e]),children:e.label},e.value)};return Ue("div",{className:M.join(" "),children:[0<m.length&&(()=>{const e=v?[...m,v]:m;return Ue("div",{className:"newspack-autocomplete-with-suggestions__selected-items",children:[Ue("p",{className:"newspack-autocomplete-with-suggestions__label",children:[c?(0,nt.sprintf)(__("%1$s %2$s selected","newspack"),e.length,e.length>1?h:f):(0,nt.sprintf)(__("Selected %s","newspack"),f),1<e.length&&_x(" – ","separator character","newspack"),1<e.length&&Ze(l.Button,{onClick:()=>u([]),isLink:!0,isDestructive:!0,children:__("Clear all","newspack")})]}),e.map((t=>Ze(l.Button,{className:"newspack-autocomplete-with-suggestions__selected-item-button",isTertiary:!0,onClick:()=>u(e.filter((e=>e.value!==t.value))),children:t.label},t.value)))]})})(),1<d.length&&Ze(l.SelectControl,{label:(0,nt.sprintf)(__("%s type","newspack"),f.charAt(0).toUpperCase()+f.slice(1)),value:C,options:d.map((e=>({label:e.label,value:e.slug}))),onChange:e=>T(e)}),Ze(Qe,{tokens:[],onChange:O,fetchSuggestions:async e=>A(e,0,C),fetchSavedInfo:e=>P(e),label:i,help:!o&&r,returnFullObjects:!0}),(()=>{if(y)return Ze("div",{className:"newspack-autocomplete-with-suggestions__suggestions-spinner",children:Ze(l.Spinner,{})});if(0===_.length)return null;const e=c?"newspack-autocomplete-with-suggestions__search-suggestions-multiselect":"newspack-autocomplete-with-suggestions__search-suggestions";return Ue(Ve,{children:[!o&&Ze("p",{className:"newspack-autocomplete-with-suggestions__label",children:(0,nt.sprintf)(__("Or, select a recent %s:","newspack"),f)}),Ue("div",{className:e,children:[_.map(I),_.length<(s||S)&&Ze(l.Button,{disabled:w,isSecondary:!0,onClick:()=>k(!0),children:__(w?"Loading…":"Load more","newspack")})]})]})})()]})};var ot=n(9611);function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,ot.Z)(e,t)}var st=n(5697),lt=n.n(st),ct=n(7462);function ut(e){return"/"===e.charAt(0)}function pt(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const dt=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],o=e&&ut(e),i=t&&ut(t),s=o||i;if(e&&ut(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=a.length;u>=0;u--){var p=a[u];"."===p?pt(a,u):".."===p?(pt(a,u),c++):c&&(pt(a,u),c--)}if(!s)for(;c--;c)a.unshift("..");!s||""===a[0]||a[0]&&ut(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function ft(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const ht=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=ft(t),a=ft(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var mt="Invariant failed";function vt(e,t){if(!e)throw new Error(mt)}function gt(e){return"/"===e.charAt(0)?e:"/"+e}function yt(e){return"/"===e.charAt(0)?e.substr(1):e}function bt(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function wt(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function kt(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function _t(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,ct.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(Un){throw Un instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):Un}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=dt(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function Et(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var St=!("undefined"==typeof window||!window.document||!window.document.createElement);function xt(e,t){t(window.confirm(e))}var Ct="popstate",Tt="hashchange";function Mt(){try{return window.history.state||{}}catch(Un){return{}}}function Pt(e){void 0===e&&(e={}),St||vt(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,i=o.forceRefresh,s=void 0!==i&&i,l=o.getUserConfirmation,c=void 0===l?xt:l,u=o.keyLength,p=void 0===u?6:u,d=e.basename?wt(gt(e.basename)):"";function f(e){var t=e||{},n=t.key,r=t.state,a=window.location,o=a.pathname+a.search+a.hash;return d&&(o=bt(o,d)),_t(o,r,n)}function h(){return Math.random().toString(36).substr(2,p)}var m=Et();function v(e){(0,ct.Z)(M,e),M.length=n.length,m.notifyListeners(M.location,M.action)}function g(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||w(f(e.state))}function y(){w(f(Mt()))}var b=!1;function w(e){if(b)b=!1,v();else{m.confirmTransitionTo(e,"POP",c,(function(t){t?v({action:"POP",location:e}):function(e){var t=M.location,n=_.indexOf(t.key);-1===n&&(n=0);var r=_.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(b=!0,S(a))}(e)}))}}var k=f(Mt()),_=[k.key];function E(e){return d+kt(e)}function S(e){n.go(e)}var x=0;function C(e){1===(x+=e)&&1===e?(window.addEventListener(Ct,g),a&&window.addEventListener(Tt,y)):0===x&&(window.removeEventListener(Ct,g),a&&window.removeEventListener(Tt,y))}var T=!1;var M={length:n.length,action:"POP",location:k,createHref:E,push:function(e,t){var a="PUSH",o=_t(e,t,h(),M.location);m.confirmTransitionTo(o,a,c,(function(e){if(e){var t=E(o),i=o.key,l=o.state;if(r)if(n.pushState({key:i,state:l},null,t),s)window.location.href=t;else{var c=_.indexOf(M.location.key),u=_.slice(0,c+1);u.push(o.key),_=u,v({action:a,location:o})}else window.location.href=t}}))},replace:function(e,t){var a="REPLACE",o=_t(e,t,h(),M.location);m.confirmTransitionTo(o,a,c,(function(e){if(e){var t=E(o),i=o.key,l=o.state;if(r)if(n.replaceState({key:i,state:l},null,t),s)window.location.replace(t);else{var c=_.indexOf(M.location.key);-1!==c&&(_[c]=o.key),v({action:a,location:o})}else window.location.replace(t)}}))},go:S,goBack:function(){S(-1)},goForward:function(){S(1)},block:function(e){void 0===e&&(e=!1);var t=m.setPrompt(e);return T||(C(1),T=!0),function(){return T&&(T=!1,C(-1)),t()}},listen:function(e){var t=m.appendListener(e);return C(1),function(){C(-1),t()}}};return M}var At="hashchange",Ot={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+yt(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:yt,decodePath:gt},slash:{encodePath:gt,decodePath:gt}};function It(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function Nt(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function zt(e){window.location.replace(It(window.location.href)+"#"+e)}function Dt(e){void 0===e&&(e={}),St||vt(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?xt:r,o=n.hashType,i=void 0===o?"slash":o,s=e.basename?wt(gt(e.basename)):"",l=Ot[i],c=l.encodePath,u=l.decodePath;function p(){var e=u(Nt());return s&&(e=bt(e,s)),_t(e)}var d=Et();function f(e){(0,ct.Z)(x,e),x.length=t.length,d.notifyListeners(x.location,x.action)}var h=!1,m=null;function v(){var e=Nt(),t=c(e);if(e!==t)zt(t);else{var n=p(),r=x.location;if(!h&&function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash}(r,n))return;if(m===kt(n))return;m=null,function(e){if(h)h=!1,f();else{var t="POP";d.confirmTransitionTo(e,t,a,(function(n){n?f({action:t,location:e}):function(e){var t=x.location,n=w.lastIndexOf(kt(t));-1===n&&(n=0);var r=w.lastIndexOf(kt(e));-1===r&&(r=0);var a=n-r;a&&(h=!0,k(a))}(e)}))}}(n)}}var g=Nt(),y=c(g);g!==y&&zt(y);var b=p(),w=[kt(b)];function k(e){t.go(e)}var _=0;function E(e){1===(_+=e)&&1===e?window.addEventListener(At,v):0===_&&window.removeEventListener(At,v)}var S=!1;var x={length:t.length,action:"POP",location:b,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=It(window.location.href)),n+"#"+c(s+kt(e))},push:function(e,t){var n="PUSH",r=_t(e,void 0,void 0,x.location);d.confirmTransitionTo(r,n,a,(function(e){if(e){var t=kt(r),a=c(s+t);if(Nt()!==a){m=t,function(e){window.location.hash=e}(a);var o=w.lastIndexOf(kt(x.location)),i=w.slice(0,o+1);i.push(t),w=i,f({action:n,location:r})}else f()}}))},replace:function(e,t){var n="REPLACE",r=_t(e,void 0,void 0,x.location);d.confirmTransitionTo(r,n,a,(function(e){if(e){var t=kt(r),a=c(s+t);Nt()!==a&&(m=t,zt(a));var o=w.indexOf(kt(x.location));-1!==o&&(w[o]=t),f({action:n,location:r})}}))},go:k,goBack:function(){k(-1)},goForward:function(){k(1)},block:function(e){void 0===e&&(e=!1);var t=d.setPrompt(e);return S||(E(1),S=!0),function(){return S&&(S=!1,E(-1)),t()}},listen:function(e){var t=d.appendListener(e);return E(1),function(){E(-1),t()}}};return x}function Lt(e,t,n){return Math.min(Math.max(e,t),n)}function Rt(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,a=void 0===r?["/"]:r,o=t.initialIndex,i=void 0===o?0:o,s=t.keyLength,l=void 0===s?6:s,c=Et();function u(e){(0,ct.Z)(v,e),v.length=v.entries.length,c.notifyListeners(v.location,v.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=Lt(i,0,a.length-1),f=a.map((function(e){return _t(e,void 0,"string"==typeof e?p():e.key||p())})),h=kt;function m(e){var t=Lt(v.index+e,0,v.entries.length-1),r=v.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?u({action:"POP",location:r,index:t}):u()}))}var v={length:f.length,action:"POP",location:f[d],index:d,entries:f,createHref:h,push:function(e,t){var r="PUSH",a=_t(e,t,p(),v.location);c.confirmTransitionTo(a,r,n,(function(e){if(e){var t=v.index+1,n=v.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),u({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=_t(e,t,p(),v.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(v.entries[v.index]=a,u({action:r,location:a}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(e){var t=v.index+e;return t>=0&&t<v.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return v}var jt=1073741823,Bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window||"undefined"!=typeof window?window:{};function Ft(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var $t=p().createContext||function(e,t){var n,r,a="__create-react-context-"+function(){var e="__global_unique_id__";return Bt[e]=(Bt[e]||0)+1}()+"__",o=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=Ft(t.props.value),t}it(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,a)?(n="function"==typeof t?t(r,a):jt,0!==(n|=0)&&this.emitter.set(e.value,n)):n=0}},r.render=function(){return this.props.children},n}(u.Component);o.childContextTypes=((n={})[a]=lt().object.isRequired,n);var i=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}it(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?jt:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?jt:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(u.Component);return i.contextTypes=((r={})[a]=lt().object,r),{Provider:o,Consumer:i}};const Ht=$t;var qt=n(4779),Vt=n.n(qt),Zt=(n(663),n(3366)),Ut=function(e){var t=Ht();return t.displayName=e,t},Gt=Ut("Router-History"),Wt=Ut("Router"),Yt=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}it(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return p().createElement(Wt.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},p().createElement(Gt.Provider,{children:this.props.children||null,value:this.props.history}))},t}(p().Component);var Xt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Rt(t.props),t}return it(t,e),t.prototype.render=function(){return p().createElement(Yt,{history:this.history,children:this.props.children})},t}(p().Component);var Kt=function(e){function t(){return e.apply(this,arguments)||this}it(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(p().Component);function Qt(e){var t=e.message,n=e.when,r=void 0===n||n;return p().createElement(Wt.Consumer,null,(function(e){if(e||vt(!1),!r||e.staticContext)return null;var n=e.history.block;return p().createElement(Kt,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var Jt={},en=0;function tn(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(Jt[e])return Jt[e];var t=Vt().compile(e);return en<1e4&&(Jt[e]=t,en++),t}(e)(t,{pretty:!0})}function nn(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return p().createElement(Wt.Consumer,null,(function(e){e||vt(!1);var r=e.history,o=e.staticContext,i=a?r.push:r.replace,s=_t(t?"string"==typeof n?tn(n,t.params):(0,ct.Z)({},n,{pathname:tn(n.pathname,t.params)}):n);return o?(i(s),null):p().createElement(Kt,{onMount:function(){i(s)},onUpdate:function(e,t){var n=_t(t.to);(function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&ht(e.state,t.state)})(n,(0,ct.Z)({},s,{key:n.key}))||i(s)},to:n})}))}var rn={},an=0;function on(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,s=void 0!==i&&i,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=rn[n]||(rn[n]={});if(r[e])return r[e];var a=[],o={regexp:Vt()(e,a,t),keys:a};return an<1e4&&(r[e]=o,an++),o}(n,{end:o,strict:s,sensitive:c}),a=r.regexp,i=r.keys,l=a.exec(e);if(!l)return null;var u=l[0],p=l.slice(1),d=e===u;return o&&!d?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:d,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var sn=function(e){function t(){return e.apply(this,arguments)||this}return it(t,e),t.prototype.render=function(){var e=this;return p().createElement(Wt.Consumer,null,(function(t){t||vt(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?on(n.pathname,e.props):t.match,a=(0,ct.Z)({},t,{location:n,match:r}),o=e.props,i=o.children,s=o.component,l=o.render;return Array.isArray(i)&&function(e){return 0===p().Children.count(e)}(i)&&(i=null),p().createElement(Wt.Provider,{value:a},a.match?i?"function"==typeof i?i(a):i:s?p().createElement(s,a):l?l(a):null:"function"==typeof i?i(a):null)}))},t}(p().Component);function ln(e){return"/"===e.charAt(0)?e:"/"+e}function cn(e,t){if(!e)return t;var n=ln(e);return 0!==t.pathname.indexOf(n)?t:(0,ct.Z)({},t,{pathname:t.pathname.substr(n.length)})}function un(e){return"string"==typeof e?e:kt(e)}function pn(e){return function(){vt(!1)}}function dn(){}var fn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return dn},t.handleBlock=function(){return dn},t}it(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,o=n.context,i=void 0===o?{}:o;i.action=t,i.location=function(e,t){return e?(0,ct.Z)({},t,{pathname:ln(e)+t.pathname}):t}(a,_t(e)),i.url=un(i.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,a=void 0===r?{}:r,o=e.location,i=void 0===o?"/":o,s=(0,Zt.Z)(e,["basename","context","location"]),l={createHref:function(e){return ln(n+un(e))},action:"POP",location:cn(n,_t(i)),push:this.handlePush,replace:this.handleReplace,go:pn(),goBack:pn(),goForward:pn(),listen:this.handleListen,block:this.handleBlock};return p().createElement(Yt,(0,ct.Z)({},s,{history:l,staticContext:a}))},t}(p().Component);var hn=function(e){function t(){return e.apply(this,arguments)||this}return it(t,e),t.prototype.render=function(){var e=this;return p().createElement(Wt.Consumer,null,(function(t){t||vt(!1);var n,r,a=e.props.location||t.location;return p().Children.forEach(e.props.children,(function(e){if(null==r&&p().isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?on(a.pathname,(0,ct.Z)({},e.props,{path:o})):t.match}})),r?p().cloneElement(n,{location:a,computedMatch:r}):null}))},t}(p().Component);function mn(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,Zt.Z)(t,["wrappedComponentRef"]);return p().createElement(Wt.Consumer,null,(function(t){return t||vt(!1),p().createElement(e,(0,ct.Z)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,He()(n,e)}var vn=p().useContext;function gn(){return vn(Gt)}function yn(){return vn(Wt).location}function bn(){var e=vn(Wt).match;return e?e.params:{}}function wn(e){var t=yn(),n=vn(Wt).match;return e?on(t.pathname,e):n}var kn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Pt(t.props),t}return it(t,e),t.prototype.render=function(){return p().createElement(Yt,{history:this.history,children:this.props.children})},t}(p().Component);var En=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Dt(t.props),t}return it(t,e),t.prototype.render=function(){return p().createElement(Yt,{history:this.history,children:this.props.children})},t}(p().Component);var Sn=function(e,t){return"function"==typeof e?e(t):e},xn=function(e,t){return"string"==typeof e?_t(e,null,null,t):e},Cn=function(e){return e},Tn=p().forwardRef;void 0===Tn&&(Tn=Cn);var Mn=Tn((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,o=(0,Zt.Z)(e,["innerRef","navigate","onClick"]),i=o.target,s=(0,ct.Z)({},o,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||i&&"_self"!==i||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return s.ref=Cn!==Tn&&t||n,p().createElement("a",s)}));var Pn=Tn((function(e,t){var n=e.component,r=void 0===n?Mn:n,a=e.replace,o=e.to,i=e.innerRef,s=(0,Zt.Z)(e,["component","replace","to","innerRef"]);return p().createElement(Wt.Consumer,null,(function(e){e||vt(!1);var n=e.history,l=xn(Sn(o,e.location),e.location),c=l?n.createHref(l):"",u=(0,ct.Z)({},s,{href:c,navigate:function(){var t=Sn(o,e.location),r=kt(e.location)===kt(xn(t));(a||r?n.replace:n.push)(t)}});return Cn!==Tn?u.ref=t||i:u.innerRef=i,p().createElement(r,u)}))})),An=function(e){return e},On=p().forwardRef;void 0===On&&(On=An);var In=On((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,a=e.activeClassName,o=void 0===a?"active":a,i=e.activeStyle,s=e.className,l=e.exact,c=e.isActive,u=e.location,d=e.sensitive,f=e.strict,h=e.style,m=e.to,v=e.innerRef,g=(0,Zt.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return p().createElement(Wt.Consumer,null,(function(e){e||vt(!1);var n=u||e.location,a=xn(Sn(m,n),n),y=a.pathname,b=y&&y.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?on(n.pathname,{path:b,exact:l,sensitive:d,strict:f}):null,k=!!(c?c(w,n):w),_="function"==typeof s?s(k):s,E="function"==typeof h?h(k):h;k&&(_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(_,o),E=(0,ct.Z)({},E,i));var S=(0,ct.Z)({"aria-current":k&&r||null,className:_,style:E,to:a},g);return An!==On?S.ref=t||v:S.innerRef=v,p().createElement(Pn,S)}))}));const Nn=r,{useHistory:zn}=Nn,Dn=e=>{let{href:t,onClick:n,...r}=e;const o=zn(),[i,s]=(0,a.useState)(!1);return t&&n?r.onClick=async()=>{s(!0),await n(),s(!1),o.push(t.replace("#",""))}:(r.href=t,r.onClick=n),i&&(r.disabled=!0),Ze(l.Button,{...r})};class Ln extends a.Component{render(){const{buttonsCard:e,className:t,headerActions:n,isNarrow:r,isMedium:a,isSmall:o,isWhite:s,noBorder:l,...c}=this.props;return Ze("div",{className:i()("newspack-card",t,e&&"newspack-card__buttons-card",n&&"newspack-card__header-actions",a&&"newspack-card__is-medium",r&&"newspack-card__is-narrow",o&&"newspack-card__is-small",s&&"newspack-card__is-white",l&&"newspack-card__no-border"),...c})}}const Rn=Ln;var jn=n(3311),Bn=n.n(jn),Fn=n(3105),$n=n.n(Fn);class Hn extends a.Component{constructor(e){super(e),(0,s.Z)(this,"state",{suggestions:{},allCategories:{},isLoading:!1}),(0,s.Z)(this,"handleOnChange",(e=>{const{onChange:t}=this.props,{suggestions:n}=this.state,r=e.filter((e=>void 0!==e)).map((e=>"string"==typeof e?n[e]:e)).filter(Boolean);t(r)})),(0,s.Z)(this,"getAvailableSuggestions",(()=>{const{value:e}=this.props,{suggestions:t}=this.state,n=e.reduce(((e,t)=>(t?.id&&e.push(t.id),e)),[]);return $n()(t,(e=>{let{id:t}=e;return-1===n.indexOf(t)})).map((e=>e.name))})),this.debouncedUpdateSuggestions=Xe()(this.updateSuggestions,100)}componentDidMount(){this.setState({isLoading:!0}),et()({path:(0,rt.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{per_page:-1,_fields:"id,name"})}).then((e=>this.setState({allCategories:e}))).finally((()=>this.setState({isLoading:!1})))}componentWillUnmount(){this.debouncedUpdateSuggestions.cancel()}updateSuggestions(e){this.setState({isLoading:!0}),et()({path:(0,rt.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((e=>{this.setState({suggestions:e.reduce(((e,t)=>({...e,[t.name]:t})),{})})})).finally((()=>this.setState({isLoading:!1})))}render(){const{className:e,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:a,label:o,value:s}=this.props,{allCategories:c,isLoading:u}=this.state;return Ue("div",{className:i()("newspack-category-autocomplete",e),children:[Ze(Ar,{onInputChange:e=>this.debouncedUpdateSuggestions(e),value:s.reduce(((e,t)=>{const n="number"==typeof t?Bn()(c,["id",t]):t;return n&&e.push({id:n.term_id||n.id,value:n.value||n.name}),e}),[]),suggestions:this.getAvailableSuggestions(),onChange:this.handleOnChange,label:o,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:a}),u?Ze("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:Ze(l.Spinner,{})}):null]})}}Hn.defaultProps={taxonomy:"categories"};var qn={grad:.9,turn:360,rad:360/(2*Math.PI)},Vn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Zn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Un=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Gn=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Wn=function(e){return{r:Un(e.r,0,255),g:Un(e.g,0,255),b:Un(e.b,0,255),a:Un(e.a)}},Yn=function(e){return{r:Zn(e.r),g:Zn(e.g),b:Zn(e.b),a:Zn(e.a,3)}},Xn=/^#([0-9a-f]{3,8})$/i,Kn=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Qn=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=Math.max(t,n,r),i=o-Math.min(t,n,r),s=i?o===t?(n-r)/i:o===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:o?i/o*100:0,v:o/255*100,a:a}},Jn=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),i=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,s,i,i,l,r][c],g:255*[l,r,r,s,i,i][c],b:255*[i,i,l,r,r,s][c],a:a}},er=function(e){return{h:Gn(e.h),s:Un(e.s,0,100),l:Un(e.l,0,100),a:Un(e.a)}},tr=function(e){return{h:Zn(e.h),s:Zn(e.s),l:Zn(e.l),a:Zn(e.a,3)}},nr=function(e){return Jn((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},rr=function(e){return{h:(t=Qn(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},ar=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,or=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ir=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lr={string:[[function(e){var t=Xn.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Zn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Zn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ir.exec(e)||sr.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Wn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=ar.exec(e)||or.exec(e);if(!t)return null;var n,r,a=er({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(qn[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return nr(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=void 0===a?1:a;return Vn(t)&&Vn(n)&&Vn(r)?Wn({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,o=void 0===a?1:a;if(!Vn(t)||!Vn(n)||!Vn(r))return null;var i=er({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return nr(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,o=void 0===a?1:a;if(!Vn(t)||!Vn(n)||!Vn(r))return null;var i=function(e){return{h:Gn(e.h),s:Un(e.s,0,100),v:Un(e.v,0,100),a:Un(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Jn(i)},"hsv"]]},cr=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},ur=function(e){return"string"==typeof e?cr(e.trim(),lr.string):"object"==typeof e&&null!==e?cr(e,lr.object):[null,void 0]},pr=function(e,t){var n=rr(e);return{h:n.h,s:Un(n.s+100*t,0,100),l:n.l,a:n.a}},dr=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},fr=function(e,t){var n=rr(e);return{h:n.h,s:n.s,l:Un(n.l+100*t,0,100),a:n.a}},hr=function(){function e(e){this.parsed=ur(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Zn(dr(this.rgba),2)},e.prototype.isDark=function(){return dr(this.rgba)<.5},e.prototype.isLight=function(){return dr(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Yn(this.rgba)).r,n=e.g,r=e.b,o=(a=e.a)<1?Kn(Zn(255*a)):"","#"+Kn(t)+Kn(n)+Kn(r)+o;var e,t,n,r,a,o},e.prototype.toRgb=function(){return Yn(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Yn(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return tr(rr(this.rgba))},e.prototype.toHslString=function(){return t=(e=tr(rr(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Qn(this.rgba),{h:Zn(e.h),s:Zn(e.s),v:Zn(e.v),a:Zn(e.a,3)};var e},e.prototype.invert=function(){return mr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),mr(pr(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),mr(pr(this.rgba,-e))},e.prototype.grayscale=function(){return mr(pr(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),mr(fr(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),mr(fr(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?mr({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Zn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rr(this.rgba);return"number"==typeof e?mr({h:e,s:t.s,l:t.l,a:t.a}):Zn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===mr(e).toHex()},e}(),mr=function(e){return e instanceof hr?e:new hr(e)},vr=[],gr=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},yr=function(e){return.2126*gr(e.r)+.7152*gr(e.g)+.0722*gr(e.b)};const{useHistory:br}=Nn;var wr=n(1469),kr=n.n(wr),_r=n(236),Er=n.n(_r);const Sr=(e,t)=>{if(kr()(e))return t},xr={usePrompt:(e,t)=>{const n=br(),r=(0,a.useRef)(null),o=n=>{if(e)return void 0===n&&(n=window.event),n&&(n.returnValue=t),t};return(0,a.useEffect)((()=>(e&&(r.current=n.block(t),window.addEventListener("beforeunload",o)),()=>{r.current&&r.current(),window.removeEventListener("beforeunload",o)})),[t,e]),r.current},useObjectState:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(e),r=e=>n((t=>Er()({},t,e,Sr))),o=e=>{if("string"==typeof e)return t=>r({[e]:t});r(e)};return[t,o]},useOnClickOutside:(e,t)=>{(0,a.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e,t])},useUniqueId:e=>(0,a.useRef)(`${e}-${Math.round(99999*Math.random())}`).current},Cr=window.wp.keycodes,Tr={InteractiveDiv:e=>{let{style:t={},...n}=e;return Ze("div",{tabIndex:"0",role:"button",onKeyDown:e=>Cr.ENTER===e.keyCode&&n.onClick(),style:{cursor:"pointer",...t},...n})},confirmAction:e=>!!confirm(e)};!function(e){e.forEach((function(e){vr.indexOf(e)<0&&(e(hr,lr),vr.push(e))}))}([function(e){e.prototype.luminance=function(){return e=yr(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,o,i,s,l,c=t instanceof e?t:new e(t);return o=this.rgba,i=c.toRgb(),n=(s=yr(o))>(l=yr(i))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(o=(n=t).size)?"normal":o,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===i?7:"AA"===a&&"large"===i?3:4.5);var n,r,a,o,i}}]);const{InteractiveDiv:Mr}=Tr;class Pr extends a.Component{render(){const{className:e,description:t,hideHelpFromVision:n,hideLabelFromVision:r,...a}=this.props,o=i()("newspack-form-token-field__input-container",e);return Ue("div",{className:i()({"newspack-form-token-field--label-hidden":r,"newspack-form-token-field--help-hidden":n},"newspack-form-token-field"),children:[Ze(l.FormTokenField,{className:o,...a}),t&&Ze("p",{className:"newspack-form-token-field__help",children:t})]})}}const Ar=Pr,Or=nt.__,Ir=e=>{let{simple:t}=e;const{components_demo:n=!1,support:r=!1,setup_wizard:a=!1,reset_url:o=!1,plugin_version:i={label:"Newspack"},remove_starter_content:s=!1,support_email:c}=window.newspack_urls||{},u=[{label:i.label,url:"https://newspack.com/category/release-notes/",external:!0},{label:Or("About","newspack"),url:"https://newspack.com/",external:!0},{label:Or("Documentation","newspack"),url:r,external:!0}];return n&&u.push({label:Or("Components Demo","newspack"),url:n}),a&&u.push({label:Or("Setup Wizard","newspack"),url:a}),o&&u.push({label:Or("Reset Newspack","newspack"),url:o}),s&&u.push({label:Or("Remove Starter Content","newspack"),url:s}),c&&u.push({label:Or("Contact Support","newspack"),url:`mailto:${c}`}),Ue("div",{className:"newspack-footer",children:[!t&&Ze("div",{className:"newspack-footer__inner",children:Ze("ul",{children:u.map(((e,t)=>{let{url:n,label:r,external:a}=e;return Ze("li",{children:Ze(a?l.ExternalLink:"a",{href:n,children:r})},t)}))})}),Ze("div",{className:"newspack-footer__logo",children:Ze(ra,{})})]})};var Nr=n(8583),zr=n.n(Nr);const Dr=nt.__;class Lr extends a.Component{constructor(){super(...arguments),(0,s.Z)(this,"componentDidMount",(()=>{this._isMounted=!0;const{plugin:e}=this.props;this.retrievePluginInfo(e)})),(0,s.Z)(this,"componentWillUnmount",(()=>{this._isMounted=!1})),(0,s.Z)(this,"retrievePluginInfo",(e=>{const{onReady:t}=this.props;et()({path:"/newspack/v1/plugins/"+e}).then((e=>{this._isMounted&&(t(e),this.setState({pluginInfo:e}))}))})),(0,s.Z)(this,"textForPlugin",(e=>{const t={modalBody:null,modalTitle:e.Name&&`${Dr("Manage","newspack")} ${e.Name}`,primaryButton:e.Name&&`${Dr("Manage","newspack")} ${e.Name}`,primaryModalButton:Dr("Manage","newspack"),dismissModalButton:Dr("Dismiss","newspack")};return zr()(t,this.props)})),(0,s.Z)(this,"goToPlugin",(e=>{const{editLink:t,showOnBlockEditor:n}=this.props;et()({path:"/newspack/v1/plugins/"+e+"/handoff",method:"POST",data:{editLink:t,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!n}}).then((e=>{window.location.href=e.HandoffLink}))})),this.state={pluginInfo:[],showModal:!1}}render(){const{className:e,children:t,compact:n,useModal:r,modalTitle:o,modalBody:s,onReady:l,editLink:c,...u}=this.props,{pluginInfo:p,showModal:d}=this.state,{modalBody:f,modalTitle:h,primaryButton:m,primaryModalButton:v,dismissModalButton:g}=this.textForPlugin(p),{Configured:y,Name:b,Slug:w,Status:k}=p,_=i()(y&&"is-configured",e);return Ue(a.Fragment,{children:[b&&"active"===k&&Ze(Dn,{className:_,isSecondary:!u.isPrimary&&!u.isTertiary&&!u.isLink,...u,onClick:()=>r?this.setState({showModal:!0}):this.goToPlugin(w),children:t||m}),b&&"active"!==k&&Ze(Dn,{className:_,variant:"secondary",disabled:!0,...u,children:b+Dr(" not installed","newspack")}),!b&&Ze(Dn,{className:_,isSecondary:!u.isPrimary&&!u.isTertiary&&!u.isLink,...u,children:Ue(a.Fragment,{children:[!n&&Ze(Da,{isLeft:!0}),Dr("Retrieving Plugin Info","newspack")]})}),d&&Ue(Ur,{title:h,onRequestClose:()=>this.setState({showModal:!1}),children:[Ze("p",{children:f}),Ue(Rn,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[Ze(Dn,{variant:"secondary",onClick:()=>this.setState({showModal:!1}),children:g}),Ze(Dn,{variant:"primary",onClick:()=>this.goToPlugin(w),children:v})]})]})]})}}Lr.defaultProps={onReady:()=>{}};const Rr=Lr,jr="newspack_wizard_handoff_message";function Br(){const[e,t]=(0,a.useState)(!1);return(0,a.useEffect)((()=>(setTimeout((()=>{const e=JSON.parse(localStorage.getItem(jr));t(!!e?.message&&e.message),e?.url&&-1===window.location.href.indexOf(e.url)&&(window.localStorage.removeItem(jr),t(!1))}),100),()=>window.localStorage.removeItem(jr))),[]),e?Ze(ea,{isHandoff:!0,isDismissible:!1,rawHTML:!0,noticeText:e}):null}const Fr=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));class $r extends a.Component{render(){const{className:e,...t}=this.props;return Ze(l.Tooltip,{...t,children:Ze("span",{className:i()("newspack-info-button",e),children:Ze(c,{icon:Fr})})})}}const Hr=$r;n(6644);class qr extends a.Component{render(){const{className:e,columns:t,gutter:n,noMargin:r,rowGap:a,...o}=this.props;return Ze("div",{className:i()("newspack-grid",r&&"newspack-grid--no-margin",t&&"newspack-grid__columns-"+t,n&&"newspack-grid__gutter-"+n,a&&"newspack-grid__row-gap-"+a,e),...o})}}qr.defaultProps={columns:2,gutter:32,rowGap:null};const Vr=qr;class Zr extends a.Component{render(){const{className:e,isWide:t,isNarrow:n,...r}=this.props,a=i()("newspack-modal",t&&"newspack-modal--wide",n&&"newspack-modal--narrow",e);return Ze(l.Modal,{className:a,...r})}}const Ur=Zr;class Gr extends a.Component{render(){const{className:e,simple:t,size:n,white:r}=this.props,a=i()("newspack-icon",t&&"newspack-icon--simple",r&&"newspack-icon--white",e);return Ze(l.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,width:n,viewBox:"0 0 32 32",className:a,children:Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16c0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16S7.164 0 16 0s16 7.164 16 16zm-10.732.622h1.72v-1.124h-2.823l1.103 1.124zm-3.249-3.31h4.97v-1.124h-6.072l1.102 1.124zm-3.248-3.31h8.217V8.877h-9.32l1.103 1.125zM9.01 8.877l13.977 14.246h-4.66l-5.866-5.98v5.98h-3.45V8.877z"})})}}Gr.defaultProps={size:32};const Wr=Gr;class Yr extends a.Component{render(){const{centered:e,className:t,height:n}=this.props,r=i()("newspack-logo__svg",e&&"is-centered",t);return Ze(l.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,viewBox:"0 0 221 64",className:r,children:Ze(l.Path,{d:"M32 0c17.672 0 32 14.328 32 32S49.672 64 32 64C14.326 64 0 49.672 0 32S14.328 0 32 0zm130.57 27.247c3.611 0 6.475 2.521 6.475 7.974 0 5.417-3.134 8.995-8.314 8.995-1.262 0-2.248-.172-3.305-.376v8.551h-4.022V27.67h3.85v1.486c1.534-1.191 3.237-1.908 5.316-1.908zM18.023 17.755v28.49h6.902V34.287l11.733 11.958h9.319l-27.954-28.49zm178.552 9.495c2.009 0 3.219.34 4.581.784v3.407c-1.158-.444-2.878-.921-4.513-.921-2.453 0-4.532 1.294-4.532 5.076 0 4.156 2.077 5.383 4.736 5.387 1.262 0 2.676-.273 4.516-.99v3.34c-1.636.544-3.118.92-5.025.92-6.033 0-8.417-3.442-8.417-8.45 0-5.283 3.305-8.553 8.654-8.553zm-18.195-.003c3.919 0 6.44 1.567 6.435 6.235V43.84h-3.747v-1.771h-.103c-1.327 1.022-2.93 2.079-5.314 2.079-2.112 0-4.36-1.534-4.36-4.6 0-4.133 3.545-4.912 5.997-5.252l3.51-.477v-.47c0-2.181-.886-2.897-2.93-2.897-.989 0-3.338.305-5.28 1.09l-.341-3.237c1.738-.614 4.123-1.058 6.133-1.058zm-73.55-.12c5.145 0 6.951 3.579 6.951 6.987 0 .936-.047 1.518-.102 2.06l-.034.325h-10.358c.101 3.542 2.106 4.36 5.104 4.36 1.637 0 3.158-.372 4.845-.991v3.342c-2.093.644-3.89.921-5.968.921-5.141 0-8.308-2.556-8.308-8.586 0-4.398 2.69-8.417 7.87-8.417zm39.998 0c1.771 0 3.305.172 4.804.614v3.338s-2.188-.714-4.497-.714c-1.43 0-2.76.477-2.76 1.703 0 2.725 8.042 1.262 8.04 6.883 0 4.053-3.611 5.178-7.394 5.178-1.738 0-3.487-.467-4.736-.958v-3.305c1.5.52 3.578 1.026 4.873 1.026 1.84 0 3.1-.374 3.1-1.771 0-2.829-8.04-1.33-8.04-7.156 0-2.998 2.724-4.837 6.61-4.837zm64.01-6.114v13.63c.34-.376.615-.785 5.657-6.952h5.213l-6.543 7.666 7.156 8.485h-5.248l-6.235-7.665v7.665h-4.02v-22.83h4.02zm-127.634 0l8.633 15.263V21.013h4.022v22.83h-4.416L80.81 28.578v15.263h-4.021v-22.83h4.416zm36.758 6.678l2.476 11.469 2.801-11.469h3.572l2.438 11.469 2.75-11.469h4.038l-4.54 16.151h-4.83l-1.714-9.495-2.325 9.495h-4.814l-4.268-16.15h4.416zm62.836 8.616l-3.305.512c-.987.136-2.044.732-2.044 2.231 0 1.322.75 2.067 1.84 2.067 1.157 0 2.452-.716 3.509-1.466v-3.344zm-19.318-5.752c-1.193 0-2.657.545-4.054 1.771v8.415c.885.17 1.77.306 2.997.306 2.829 0 4.464-1.805 4.464-5.517 0-3.476-1.158-4.975-3.407-4.975zm-56.685-.394c-2.009 0-3.235 1.43-3.475 3.678h6.268c0-1.975-.646-3.678-2.793-3.678zm-58.818.836H40.33l2.205 2.248h3.442v-2.248zm0-6.621H33.833l2.205 2.248h9.939v-2.248zm0-6.621h-18.64l2.204 2.248h16.436v-2.248z"})})}}Yr.defaultProps={height:56};const Xr=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.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"})),Kr=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z",fillRule:"evenodd",clipRule:"evenodd"})),Qr=nt.__;class Jr extends a.Component{render(){const{className:e,debugMode:t,isError:n,isHandoff:r,isHelp:o,isSuccess:s,isWarning:l,noticeText:u,rawHTML:p,style:d={},children:h=null}=this.props,m=i()("newspack-notice",e,t&&"newspack-notice__is-debug",n&&"newspack-notice__is-error",r&&"newspack-notice__is-handoff",o&&"newspack-notice__is-help",s&&"newspack-notice__is-success",l&&"newspack-notice__is-warning");let v;return v=o?Xr:s?f:t?Kr:Fr,Ue("div",{className:m,style:d,children:[Ze(c,{icon:v}),Ue("div",{className:"newspack-notice__content",children:[p?Ze(a.RawHTML,{children:u}):u,t&&Qr("Debug Mode","newspack"),h||null]})]})}}const ea=Jr,ta=nt.__;class na extends a.Component{constructor(){super(...arguments),(0,s.Z)(this,"render",(()=>Ue(l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"219",height:"16",viewBox:"0 0 438 32",className:"patrons-logo","aria-label":ta("A project of WordPress.com and the Google News Initiative","newspack"),children:[Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M0 16C0 7.179 7.146 0 15.93 0c8.784 0 15.93 7.178 15.93 16 0 8.823-7.146 16-15.93 16C7.145 32 0 24.823 0 16zm27.506-.271L23.13 28.435a14.349 14.349 0 005.214-5.263 14.424 14.424 0 001.906-7.171 14.36 14.36 0 00-1.754-6.902c.062.458.097.95.097 1.477 0 1.461-.271 3.102-1.088 5.153zM18.96 9.177c-.291.027-.665.057-1.056.077l5.177 15.463 1.427-4.792c.728-1.87 1.09-3.42 1.09-4.653 0-1.775-.635-3.007-1.179-3.964l-.154-.25-.014-.022c-.66-1.071-1.239-2.008-1.239-3.105 0-1.32.997-2.55 2.404-2.55.052 0 .1.004.148.008l.037.003a14.226 14.226 0 00-9.672-3.777 14.26 14.26 0 00-6.797 1.723 14.334 14.334 0 00-5.167 4.76c.337.01.654.019.922.019 1.497 0 3.817-.185 3.817-.185.772-.046.863 1.095.093 1.186 0 0-.234.028-.589.06-.291.026-.663.056-1.053.076l5.214 15.582 3.135-9.44-2.23-6.14a26.784 26.784 0 01-1.502-.138c-.772-.047-.681-1.23.091-1.186 0 0 2.364.185 3.771.185 1.498 0 3.818-.185 3.818-.185.772-.046.863 1.095.09 1.186 0 0-.23.027-.582.06zm-7.076 20.624a14.282 14.282 0 008.803-.23 1.188 1.188 0 01-.103-.199l-4.402-12.115-4.298 12.544zM2.846 10.145a14.434 14.434 0 00.945 13.493 14.345 14.345 0 005.888 5.308l-6.833-18.8z"}),Ze(l.Path,{d:"M56.125 8.758l-3.172 12.258-3.178-12.258h-3.209l.747 2.626-2.797 10.047L41.48 8.758h-3.087l4.334 16.01h3.362l2.596-8.56 2.431 8.56h3.361l4.549-16.01h-2.9zM151.302 24.767h-2.818v-2.915h2.818v2.915z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M64.38 13.13c-3.878 0-5.71 2.509-5.71 5.973 0 3.465 1.832 5.95 5.71 5.95 3.854 0 5.71-2.485 5.71-5.95 0-3.464-1.856-5.973-5.71-5.973zm0 9.654c-1.833 0-2.807-1.194-2.807-3.681 0-2.461.974-3.68 2.807-3.68 1.83 0 2.783 1.196 2.783 3.68 0 2.462-.953 3.68-2.783 3.68zM86.344 13.13c.69 0 1.285.096 2.117.262V8.756h2.807v16.01h-2.663v-1.052c-.906.767-2.404 1.34-3.64 1.34-2.5 0-4.616-1.745-4.616-5.52 0-3.798 2.117-6.404 5.995-6.404zm-.548 9.654c.904 0 1.76-.455 2.665-1.29v-5.758a5.2 5.2 0 00-1.83-.36c-2.144 0-3.38 1.362-3.38 3.968 0 2.411 1 3.44 2.545 3.44zM99.941 8.758h-5.199v16.01h2.998v-5.57h2.201c3.403 0 5.879-1.84 5.879-5.28 0-3.466-2.476-5.16-5.879-5.16zm.024 8.1H97.74v-5.734h2.225c1.809 0 2.713 1.003 2.713 2.795 0 1.768-.834 2.938-2.713 2.938zM115.57 19.032c0-3.083 1.879-5.902 5.496-5.902 3.593 0 4.854 2.509 4.854 4.9 0 .767-.046 1.195-.092 1.636l-.004.035h-7.232c.072 2.487 1.47 3.059 3.564 3.059 1.141 0 2.204-.262 3.383-.697v2.344c-1.463.453-2.718.646-4.169.646-3.588 0-5.8-1.79-5.8-6.02zm5.472-3.775c-1.403 0-2.26 1.002-2.426 2.581h4.377c0-1.387-.453-2.582-1.951-2.582z"}),Ze(l.Path,{d:"M130.798 16.595c0-.861.926-1.196 1.925-1.196 1.613 0 3.14.504 3.14.504v-2.344c-1.047-.31-2.117-.43-3.353-.43-2.712 0-4.615 1.29-4.615 3.394 0 2.408 1.95 3.032 3.551 3.544 1.116.357 2.063.66 2.063 1.474 0 .98-.88 1.241-2.164 1.241-.906 0-2.357-.352-3.402-.717v2.316c.871.345 2.093.672 3.306.672 2.641 0 5.161-.787 5.161-3.63 0-2.325-1.95-2.922-3.552-3.412-1.114-.342-2.06-.631-2.06-1.416z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M164.046 19.103c0-3.464 1.833-5.971 5.711-5.971 3.853 0 5.71 2.507 5.71 5.97 0 3.466-1.857 5.951-5.71 5.951-3.878 0-5.711-2.485-5.711-5.95zm2.904 0c0 2.487.974 3.679 2.807 3.679 1.832 0 2.783-1.217 2.783-3.68 0-2.483-.951-3.678-2.783-3.678-1.833 0-2.807 1.218-2.807 3.679z"}),Ze(l.Path,{d:"M191.528 13.132c-1.213 0-2.592.667-3.855 1.504l-.333.215c-.594-1.268-1.784-1.721-3.092-1.721-1.213 0-2.592.62-3.854 1.458v-1.172h-2.664v11.351h2.831V16.62c1.047-.692 2.165-1.123 2.973-1.123.927 0 1.498.5 1.498 2.102v7.17h2.807v-8.126c1.049-.693 2.167-1.146 2.975-1.146.927 0 1.498.5 1.498 2.102v7.17h2.809V16.93c0-2.2-1.309-3.798-3.593-3.798zM110.191 15.28h.095c.786-1.41 1.832-2.005 3.354-2.005.357 0 .762.046.762.046v2.461h-.285c-1.784 0-2.855.552-3.735 2.223v6.762h-2.807V13.416h2.616v1.865zM75.066 15.28h-.095v-1.864h-2.618v11.351h2.809v-6.762c.88-1.671 1.95-2.223 3.733-2.223h.287v-2.46s-.405-.047-.762-.047c-1.522 0-2.568.596-3.354 2.006zM158.983 15.424c-1.712 0-3.164.908-3.164 3.562 0 2.912 1.452 3.774 3.308 3.774.881 0 1.867-.192 3.151-.693v2.34c-1.14.383-2.176.648-3.507.648-4.213 0-5.877-2.416-5.877-5.928 0-3.703 2.306-5.997 6.043-5.997 1.403 0 2.248.24 3.2.55v2.388c-.81-.31-2.011-.644-3.154-.644zM141.016 16.595c0-.861.926-1.196 1.926-1.196 1.611 0 3.14.504 3.14.504v-2.344c-1.046-.31-2.117-.43-3.356-.43-2.711 0-4.615 1.29-4.615 3.394 0 2.408 1.95 3.032 3.552 3.544 1.116.357 2.063.66 2.063 1.474 0 .98-.88 1.241-2.165 1.241-.904 0-2.354-.352-3.401-.717v2.316c.87.345 2.094.672 3.307.672 2.642 0 5.161-.787 5.161-3.63 0-2.325-1.951-2.922-3.552-3.412-1.115-.342-2.06-.631-2.06-1.416zM300.756 24.617V8.443h2.523l7.837 12.582h.092l-.092-3.117V8.443h2.069v16.174h-2.162l-8.198-13.194h-.088l.088 3.118v10.076h-2.069z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M318.835 24.585c.704.288 1.461.42 2.22.39v-.016a5.175 5.175 0 003.041-.866 5 5 0 001.776-2.158l-1.845-.768c-.527 1.262-1.532 1.899-3.02 1.899a3.36 3.36 0 01-2.396-.98 3.775 3.775 0 01-1.118-2.642h8.73l.024-.381a6.096 6.096 0 00-1.463-4.292 5.095 5.095 0 00-3.953-1.586 4.923 4.923 0 00-3.904 1.742 6.116 6.116 0 00-1.517 4.155 5.926 5.926 0 001.566 4.223 5.302 5.302 0 001.859 1.28zm4.324-8.66c.49.485.797 1.125.868 1.811l-6.397.015a3.654 3.654 0 011.161-1.958 2.925 2.925 0 011.991-.724 3.098 3.098 0 012.377.857z"}),Ze(l.Path,{d:"M339.793 24.617h-2.117l-2.748-8.496-2.722 8.496h-2.099l-3.557-11.07h2.162l2.454 8.359h.025l2.722-8.359h2.143l2.722 8.359h.025l2.43-8.359h2.118l-3.558 11.07zM345.498 24.069c.889.63 1.961.949 3.049.905v-.024a4.768 4.768 0 003.128-.979 3.073 3.073 0 001.22-2.481 2.987 2.987 0 00-.746-1.987 4.102 4.102 0 00-2.299-1.243l-2.181-.519c-.976-.23-1.464-.655-1.464-1.287a1.18 1.18 0 01.63-1.042 2.92 2.92 0 011.551-.382c1.276 0 2.117.49 2.523 1.468l1.806-.749a3.774 3.774 0 00-1.645-1.908 5.16 5.16 0 00-2.615-.666 5.214 5.214 0 00-3.074.916 2.787 2.787 0 00-1.294 2.383 2.49 2.49 0 00.947 2.045 5.298 5.298 0 002.006 1.028l2.225.543c1.008.261 1.512.75 1.512 1.468a1.312 1.312 0 01-.619 1.13 2.717 2.717 0 01-1.591.431 3.039 3.039 0 01-2.991-2.08l-1.85.769a5.333 5.333 0 001.772 2.26zM362.084 8.443h-2.074v16.17h2.074V8.442zM366.895 15.084v-1.537h-1.991v11.07h2.069v-6.122a3.726 3.726 0 01.815-2.383 2.55 2.55 0 012.093-1.028c1.815 0 2.723 1.024 2.723 3.073v6.46h2.084v-6.778a5.026 5.026 0 00-1.084-3.386 3.9 3.9 0 00-3.127-1.268 4.127 4.127 0 00-2.074.553 3.713 3.713 0 00-1.42 1.346h-.088zM379.094 10.768a1.414 1.414 0 01-1.039.43 1.396 1.396 0 01-1.035-.43 1.47 1.47 0 011.598-2.397 1.47 1.47 0 01.476 2.397zM379.094 24.617h-2.074v-11.07h2.074v11.07zM384.709 24.642c.457.157.942.209 1.421.151a4.17 4.17 0 001.664-.293l-.717-1.782c-.299.128-.622.19-.947.181-.992 0-1.488-.602-1.488-1.806v-5.647h2.703v-1.899h-2.703v-3.386h-2.074v3.386h-1.952v1.9h1.952v5.803a3.22 3.22 0 00.927 2.635c.343.34.758.6 1.214.757zM391.278 10.768a1.465 1.465 0 01-2.076.007 1.474 1.474 0 01.468-2.401 1.458 1.458 0 011.596.316 1.475 1.475 0 01.003 2.078h.009zM391.269 24.617h-2.074v-11.07h2.074v11.07z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M394.24 23.961a4.356 4.356 0 002.928 1.018l.025.01a4.055 4.055 0 003.625-1.899h.088v1.522h1.952v-6.68a4.459 4.459 0 00-1.362-3.509 5.1 5.1 0 00-3.513-1.243 4.837 4.837 0 00-2.976.847 4.306 4.306 0 00-1.508 1.84l1.893.817c.18-.5.536-.917 1-1.174a3.152 3.152 0 011.635-.43 2.993 2.993 0 012.05.733c.276.243.494.545.637.884.144.339.21.706.192 1.074v.318a5.84 5.84 0 00-3.006-.68 5.645 5.645 0 00-3.445 1.027 3.323 3.323 0 00-1.4 2.834 3.385 3.385 0 001.185 2.692zm5.583-1.85a3.383 3.383 0 01-2.333.98 2.776 2.776 0 01-1.586-.49 1.467 1.467 0 01-.673-1.282 1.966 1.966 0 01.771-1.537 3.409 3.409 0 012.274-.656 4.045 4.045 0 012.63.724 2.99 2.99 0 01-1.083 2.261z"}),Ze(l.Path,{d:"M409.533 24.793a3.19 3.19 0 01-2.631-.91 3.207 3.207 0 01-.926-2.633v-5.804h-1.952v-1.899h1.952v-3.386h2.069v3.386h2.703v1.9h-2.703v5.646c0 1.204.496 1.806 1.488 1.806.325.008.648-.053.947-.18l.717 1.78a4.17 4.17 0 01-1.664.294zM414.072 11.135a1.47 1.47 0 00-.43-2.873 1.462 1.462 0 00-1.454 1.327 1.468 1.468 0 001.884 1.546zM412.617 24.617h2.064l.01-11.07h-2.074v11.07zM420.459 24.617l-4.455-11.07h2.249l3.245 8.584h.044l3.289-8.584h2.205l-4.503 11.07h-2.074z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M430.621 24.58a5.31 5.31 0 002.213.394v-.015a5.173 5.173 0 003.04-.866 4.972 4.972 0 001.781-2.158l-1.845-.768c-.527 1.262-1.532 1.899-3.02 1.899a3.353 3.353 0 01-2.396-.98 3.742 3.742 0 01-1.118-2.642h8.691l.024-.381a6.076 6.076 0 00-1.464-4.292 5.063 5.063 0 00-3.903-1.586 4.926 4.926 0 00-3.904 1.742 6.097 6.097 0 00-1.513 4.155 5.934 5.934 0 001.562 4.223c.52.553 1.151.987 1.852 1.275zm4.321-8.654c.49.484.797 1.124.868 1.81l-6.397.015a3.676 3.676 0 011.156-1.957 2.968 2.968 0 011.996-.725 3.12 3.12 0 012.377.857zM276.919 23.82V13.21l-2.454-.005v.979h-.088a4.086 4.086 0 00-3.104-1.317c-2.947 0-5.645 2.594-5.645 5.931a5.882 5.882 0 001.64 4.08 5.847 5.847 0 004.005 1.793 4 4 0 003.104-1.346h.088v.847c0 2.26-1.196 3.47-3.148 3.47a3.262 3.262 0 01-2.967-2.104l-2.254.944a5.634 5.634 0 002.079 2.546 5.61 5.61 0 003.142.948c3.035 0 5.602-1.791 5.602-6.157zm-5.421-8.643c1.761 0 3.147 1.522 3.147 3.607 0 2.055-1.361 3.557-3.147 3.557-1.786 0-3.279-1.473-3.279-3.557 0-2.085 1.517-3.607 3.279-3.607z"}),Ze(l.Path,{d:"M226.063 24.034a9.134 9.134 0 003.568.637c2.737 0 4.747-.905 6.397-2.57 1.649-1.663 2.166-3.993 2.166-5.872a7.91 7.91 0 00-.136-1.566h-8.427v2.506h5.982a5.262 5.262 0 01-1.361 3.156 6.128 6.128 0 01-4.621 1.835 6.64 6.64 0 01-4.703-1.953 6.677 6.677 0 01-1.948-4.717c0-1.769.7-3.465 1.948-4.716a6.64 6.64 0 014.703-1.954 6.368 6.368 0 014.523 1.791l1.747-1.766a8.686 8.686 0 00-6.27-2.53 9.132 9.132 0 00-6.61 2.611 9.2 9.2 0 000 13.133 9.158 9.158 0 003.042 1.975z"}),Ze(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M250.189 21.972a5.832 5.832 0 001.019-3.213 5.801 5.801 0 00-1.661-4.182 5.76 5.76 0 00-4.146-1.724c-1.145 0-2.264.34-3.217.976a5.833 5.833 0 00-.917 8.936 5.792 5.792 0 008.922-.793zm-4.788-6.795c1.752 0 3.265 1.458 3.265 3.582 0 2.114-1.508 3.582-3.265 3.582-1.756 0-3.264-1.468-3.264-3.582s1.513-3.582 3.264-3.582zM293.646 22.048l-2.01-1.341a3.374 3.374 0 01-2.899 1.634 2.995 2.995 0 01-2.859-1.79l7.881-3.27-.269-.67c-.493-1.312-2.01-3.759-5.045-3.759s-5.475 2.394-5.475 5.907c0 3.313 2.415 5.912 5.767 5.912a5.843 5.843 0 004.909-2.623zm-2.923-5.662l-5.27 2.197a3.258 3.258 0 01.817-2.374 3.228 3.228 0 012.263-1.076 2.285 2.285 0 012.19 1.253zM264.227 18.76a5.839 5.839 0 01-1.018 3.212 5.813 5.813 0 01-2.623 2.108 5.792 5.792 0 01-6.3-1.315 5.841 5.841 0 01-1.222-6.336 5.82 5.82 0 012.139-2.6 5.796 5.796 0 013.217-.976 5.75 5.75 0 014.148 1.723 5.791 5.791 0 011.659 4.183zm-2.542 0c0-2.125-1.513-3.583-3.265-3.583-1.751 0-3.264 1.468-3.264 3.582s1.508 3.582 3.264 3.582c1.757 0 3.265-1.468 3.265-3.582z"}),Ze(l.Path,{d:"M281.457 6.941h-2.591v17.373h2.591V6.94z"})]})))}}const ra=na,aa=nt.__;class oa extends a.Component{constructor(){var e;super(...arguments),e=this,(0,s.Z)(this,"componentDidMount",(()=>{const{plugins:e}=this.props;this.retrievePluginInfo(e).then((()=>{this.props.autoInstall&&this.installAllPlugins()}))})),(0,s.Z)(this,"componentDidUpdate",(e=>{const{autoInstall:t,plugins:n}=this.props,{installationInitialized:r}=this.state;n!==e.plugins&&this.retrievePluginInfo(n),t&&!r&&this.installAllPlugins()})),(0,s.Z)(this,"retrievePluginInfo",(e=>new Promise((t=>{et()({path:"/newspack/v1/plugins/"}).then((n=>{const r=Object.keys(n).reduce(((t,r)=>(-1===e.indexOf(r)||(t[r]={...n[r],installationStatus:"active"===n[r].Status?1:0}),t)),{});this.updatePluginInfo(r).then((()=>t()))}))})))),(0,s.Z)(this,"installAllPlugins",(()=>{const{pluginInfo:e}=this.state;this.setState({installationInitialized:!0});Object.keys(e).filter((t=>"active"!==e[t].Status)).map((e=>()=>this.installPlugin(e))).reduce(((e,t)=>e.then((e=>t().then(Array.prototype.concat.bind(e))))),Promise.resolve([]))})),(0,s.Z)(this,"installPlugin",(e=>{this.setInstallationStatus(e,2);const t={path:`/newspack/v1/plugins/${e}/configure/`,method:"post"};return et()(t).then((t=>{const{pluginInfo:n}=this.state;this.props.onInstalled(e),this.updatePluginInfo({...n,[e]:{...t,installationStatus:1}})})).catch((t=>{this.setInstallationStatus(e,3,t.message)}))})),(0,s.Z)(this,"setChecked",((e,t)=>{const{pluginInfo:n}=this.state;this.updatePluginInfo({...n,[e]:{...n[e],checked:t}})})),(0,s.Z)(this,"setInstallationStatus",(function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{pluginInfo:a}=e.state;e.updatePluginInfo({...a,[t]:{...a[t],installationStatus:n,notification:r}})})),(0,s.Z)(this,"updatePluginInfo",(e=>new Promise((t=>{const{onStatus:n}=this.props;this.setState({pluginInfo:e},(()=>{const r=Object.values(e).every((e=>"active"===e.Status));n({complete:r,pluginInfo:e}),t()}))})))),(0,s.Z)(this,"classForInstallationStatus",(e=>{switch(e){case 1:return"newspack-plugin-installer__status-active";case 2:return"newspack-plugin-installer__status-installing";case 3:return"newspack-plugin-installer__status-error";default:return"newspack-plugin-installer__status-none"}})),this.state={pluginInfo:{},installationInitialized:!1}}render(){const{autoInstall:e,isSmall:t,withoutFooterButton:n}=this.props,{pluginInfo:r}=this.state,{is_atomic:a}=window,o=Object.keys(r),s=[];o.forEach((e=>{const t=r[e];s.push(t.Status)}));const l=e=>"active"===e||"inactive"===e,u=s.every(l)?aa("Activate","newspack"):aa("Install","newspack"),p=o.some((e=>{const t=r[e];return"active"!==t.Status&&0===t.installationStatus}));return Ue(Ve,{children:[(!r||!Object.keys(r).length)&&Ue("div",{className:"newspack-plugin-installer_is-waiting",children:[Ze(Da,{isLeft:!0}),aa("Retrieving plugin information…")]}),r&&o.length>0&&o.map((e=>{const n=r[e],{Name:o,Description:s,Download:u,Status:p,installationStatus:d,notification:h}=n,m=2===d,v=!m&&"active"!==p,g=u||l(p);let y;2===d?y=aa("inactive"===p?"Activating…":"Installing…"):g?"uninstalled"===p?y=Ue("span",{className:"newspack-plugin-installer__status",children:[aa("Install","newspack"),Ze("span",{className:"newspack-checkbox-icon"})]}):"inactive"===p?y=Ue("span",{className:"newspack-plugin-installer__status",children:[aa("Activate","newspack"),Ze("span",{className:"newspack-checkbox-icon"})]}):"active"===p&&(y=Ue("span",{className:"newspack-plugin-installer__status",children:[aa("Installed","newspack"),Ze("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:Ze(c,{icon:f})})]})):y=Ue("span",{className:"newspack-plugin-installer__status",children:[aa(a?"Contact Newspack support to install":"Plugin must be installed manually","newspack"),Ze("span",{className:"newspack-checkbox-icon"})]});const b=i()("newspack-action-card__plugin-installer",this.classForInstallationStatus(d));return Ze(We,{title:o,description:s,disabled:!g,actionText:y,isSmall:t,isWaiting:m,onClick:v?()=>this.installPlugin(e):null,notification:h,notificationLevel:"error",notificationHTML:!0,className:b},e)})),!n&&!e&&r&&o.length>0&&Ze("div",{className:"newspack-buttons-card",children:Ze(Dn,{disabled:!p,isPrimary:!0,onClick:this.installAllPlugins,children:u})})]})}}oa.defaultProps={onStatus:()=>{},onInstalled:()=>{}};const ia=oa;var sa=n(2694);const la=nt.__,ca=e=>Array.isArray(e.options)&&e.options.length,ua=e=>{switch(e.type){case"int":case"integer":case"float":case"number":return"number";case"string":case"text":return"text";case"password":return"password";case"boolean":case"checkbox":return"checkbox";default:return null}},pa=e=>{const[t,n]=(0,a.useState)(!0),{error:r,sectionKey:o,active:i,title:s,description:c,fields:u,disabled:p,onChange:d,onUpdate:f}=e,h=e=>({disabled:p,name:`${e.section}_${e.key}`,type:ua(e),label:e.description,help:e.help||null,options:e.options?.map((e=>({value:e.value,label:e.name||e.label})))||null,value:e.value,multiple:!(!ca(e)||!e.multiple)||null,checked:"boolean"===e.type?!!e.value:null,onChange:t=>{d(e.key,t),n(!1)}}),m=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,sa.applyFilters)(`newspack.settingSection.${o}.${t}`,n,e)};let v=2;return u.length%3==0?v=3:1===u.length&&(v=1),Ze(We,{isMedium:!0,disabled:p,title:s,description:c,toggleChecked:i,hasGreyHeader:i||null===i,toggleOnChange:null!==i?e=>f({active:e}):null,actionContent:(i||null===i)&&m("buttons",Ze(Dn,{variant:"primary",disabled:p||t,onClick:()=>{f(),n(!0)},children:la("Save Settings","newspack")})),children:(i||null===i)&&Ue(a.Fragment,{children:[r?.message&&Ze(ea,{noticeText:r.message,isError:!0}),m("beforeControls"),Ze(Vr,{columns:v,gutter:32,children:u.map((e=>{const t=(e=>{if(ca(e))return _a;switch(e.type){case"checkbox":case"boolean":return l.CheckboxControl;default:return Na}})(e);return(0,sa.applyFilters)(`newspack.settingsSection.${o}.control`,Ze(t,{...h(e)},e.key),{sectionKey:o,setting:e,onChange:d})}))})]})})},da=nt.__;class fa extends a.Component{constructor(){super(...arguments),(0,s.Z)(this,"fetchSettings",(()=>{const{afterFetch:e,pluginSlug:t,isWizard:n}=this.props;this.setState({inFlight:!0}),et()({path:n?`/newspack/v1/wizard/${t}/settings`:`/${t}/v1/settings`}).then((t=>{this.setState({settings:t,error:null}),"function"==typeof e&&e(t)})).catch((e=>{this.setState({error:e})})).finally((()=>{this.setState({inFlight:!1})}))})),(0,s.Z)(this,"getSettingsValues",(e=>this.state.settings[e]?.reduce(((e,t)=>(e[t.key]=t.value,e)),{})||{})),(0,s.Z)(this,"handleSettingChange",(e=>(t,n)=>{const r=[...this.state.settings[e]];r.forEach((e=>{e.key===t&&(e.value=n)})),this.setState({settings:{...this.state.settings,[e]:r}})})),(0,s.Z)(this,"handleSectionUpdate",(e=>t=>{const{afterUpdate:n,pluginSlug:r,isWizard:a}=this.props;this.setState({inFlight:!0}),et()({path:a?`/newspack/v1/wizard/${r}/settings`:`/${r}/v1/settings`,method:"POST",data:{section:e,settings:t||this.getSettingsValues(e)}}).then((t=>{this.setState({settings:{...this.state.settings,[e]:t[e]},error:null}),"function"==typeof n&&n(t)})).catch((e=>{this.setState({error:e})})).finally((()=>{this.setState({inFlight:!1})}))})),(0,s.Z)(this,"getSectionInfo",(e=>this.state.settings[e]?.find((e=>!e.key||"active"===e.key)))),(0,s.Z)(this,"getSectionTitle",(e=>this.getSectionInfo(e)?.description)),(0,s.Z)(this,"getSectionDescription",(e=>this.getSectionInfo(e)?.help)),(0,s.Z)(this,"isSectionActive",(e=>{const{settings:t}=this.state,n=t[e]?.find((e=>"active"===e.key));return n?n.value:null})),(0,s.Z)(this,"getSectionFields",(e=>this.state.settings[e]?.filter((e=>e.key&&"active"!==e.key)))),this.state={inFlight:!1,settings:{},error:null}}componentDidMount(){this.fetchSettings()}render(){const{title:e,description:t,hasGreyHeader:n,children:r}=this.props,{settings:o,inFlight:s,error:l}=this.state;return Ue(a.Fragment,{children:[e&&Ze(ma,{title:e,description:t}),l&&Ze(ea,{isError:!0,noticeText:l.message}),Ue("div",{className:i()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":s&&!Object.keys(o).length}),children:[Object.keys(o).map((e=>Ze(pa,{disabled:s,sectionKey:e,title:this.getSectionTitle(e),description:this.getSectionDescription(e),active:this.isSectionActive(e),fields:this.getSectionFields(e),onChange:this.handleSettingChange(e),onUpdate:this.handleSectionUpdate(e),hasGreyHeader:n},e))),r]})]})}}fa.defaultProps={title:da("General Settings","newspack")},fa.Section=pa;class ha extends a.Component{render(){const{className:e,padding:t,...n}=this.props,r=i()("newspack-popover",t&&"newspack-popover__padding-"+t,e);return Ze(l.Popover,{className:r,...n})}}ha.defaultProps={padding:!1};const ma=e=>{let{centered:t=!1,className:n=null,description:r,heading:o=2,isWhite:s=!1,noMargin:l=!1,title:c,id:u=null}=e;const p=(0,a.useRef)();(0,a.useEffect)((()=>{const e=new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)}).scrollTo;e&&e===u&&window.setTimeout((()=>p.current.scrollIntoView({behavior:"smooth"})),250)}),[]);const d=i()("newspack-section-header",t&&"newspack-section-header--is-centered",s&&"newspack-section-header--is-white",l&&"newspack-section-header--no-margin",n),f=`h${o}`;return Ze("div",{id:u,ref:p,children:Ue(Vr,{columns:1,gutter:8,className:d,children:["string"==typeof c&&Ze(f,{children:c}),"function"==typeof c&&Ze(f,{children:c()}),"string"==typeof r&&Ze("p",{children:r}),"function"==typeof r&&Ze("p",{children:r()})]})})};var va=n(9704),ga=n.n(va);const ya=nt.__;function ba(e){let{help:t,label:n,onChange:r,optgroups:a=[],className:o,hideLabelFromVision:s,...u}=e;const p=xr.useUniqueId("group-select");return Ze(l.BaseControl,{label:n,hideLabelFromVision:s,id:p,help:t,className:i()(o,"components-select-control"),children:Ue("div",{className:"relative",children:[Ue("select",{id:p,className:"components-select-control__input",onChange:e=>{const{value:t}=e.target,n=Bn()(a,(e=>ga()(e.options,["value",t])));r(t,n)},"aria-describedby":t?`${p}__help`:void 0,...u,children:[Ze("option",{value:"",children:ya("-- Select --","newspack")}),a.map(((e,t)=>{let{label:n,options:r}=e;return Ze("optgroup",{label:n,children:r.map(((e,t)=>Ze("option",{value:e.value,disabled:e.disabled,children:e.label},`${e.label}-${e.value}-${t}`)))},t)}))]}),Ze("div",{className:"components-select-control__arrow-wrapper",children:Ze(c,{icon:m,size:18})})]})})}const wa=e=>{let{buttonOptions:t,buttonSmall:n,className:r,hideLabelFromVision:a,label:o,onChange:s,value:u}=e;const p=xr.useUniqueId("button-group");return Ze(l.BaseControl,{label:o,hideLabelFromVision:a,id:p.current,className:i()(r,"components-select-control"),children:Ze(l.ButtonGroup,{children:t.map((e=>{const t=u===e.value;let r=()=>e.label;return e.icon&&(r=()=>Ze(c,{icon:e.icon})),Ze(l.Button,{variant:t?"primary":null,isPressed:t,onClick:()=>s(e.value),isSmall:n,children:Ze(r,{})},e.value)}))})})};class ka extends a.Component{render(){const{className:e,optgroups:t,buttonOptions:n,buttonSmall:r,...a}=this.props;return Ze("div",{className:i()("newspack-select-control",t&&"newspack-grouped-select-control",n&&"newspack-buttons-select-control",e),children:t?Ze(ba,{optgroups:t,...a}):n?Ze(wa,{buttonOptions:n,buttonSmall:r,...a}):Ze(l.SelectControl,{...a})})}}const _a=ka;n(2073);var Ea=n(6292),Sa=n.n(Ea);(0,n(3542).extendMoment)(Sa());const xa=e=>{let{children:t,className:n,columns:r,gutter:a,noBorder:o,rowGap:s,...l}=e;const c=i()("newspack-settings__card",o&&"newspack-settings__no-border",n);return Ze(We,{...l,className:c,notificationLevel:"info",noBorder:o,children:Ze(Vr,{columns:r,gutter:a,rowGap:s,children:t})})};xa.defaultProps={columns:3,gutter:32};nt.__;var Ca=n(998),Ta=n.n(Ca);const{NavLink:Ma,useHistory:Pa}=Nn,Aa=e=>{let{items:t,className:n,disableUpcoming:r,children:a=null}=e;const o=t.filter((e=>!e.isHiddenInTabbedNavigation)),{location:s}=Pa(),l=Ta()(o,["path",s.pathname]);return Ue("div",{className:i()("newspack-tabbed-navigation",n),children:[Ze("ul",{children:o.map(((e,t)=>Ze("li",{children:Ze(Ma,{to:e.path,isActive:(t,n)=>{let{pathname:r}=n;return e.activeTabPaths?e.activeTabPaths.includes(r):t},exact:!0,activeClassName:"selected",className:i()({disabled:r&&t>l}),children:e.label})},t)))}),a]})},Oa=nt.__;class Ia extends a.Component{constructor(e){super(e),this.wrapperRef=(0,a.createRef)()}componentDidMount(){if(this.wrapperRef.current){const e=this.wrapperRef.current.querySelector("label");e&&e.setAttribute("data-required-text",Oa("(required)","newspack"))}}render(){const{className:e,required:t,isWide:n,withMargin:r=!0,...a}=this.props,o=i()("newspack-text-control",{"newspack-text-control--wide":n},{"newspack-text-control--with-margin":r},e);return t?Ze("div",{ref:this.wrapperRef,className:"newspack-text-control--required",children:Ze(l.TextControl,{className:o,required:t,...a})}):Ze(l.TextControl,{className:o,...a})}}const Na=Ia;class za extends a.Component{render(){const{className:e,isRight:t,isLeft:n,isCenter:r,...a}=this.props,o=i()("newspack-waiting",e,{"is-right":t,"is-left":n,"is-center":r});return Ze(l.Spinner,{className:o,...a})}}const Da=za,La=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),Ra=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})),ja=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),Ba=(0,u.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(d.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Fa=nt.__,$a="newspack-components-web-preview-wrapper";class Ha extends a.Component{constructor(e){super(e),(0,s.Z)(this,"state",{device:"desktop",loaded:!1,isPreviewVisible:!1}),(0,s.Z)(this,"getWebPreviewModal",(()=>{const{beforeLoad:e=(()=>{}),onClose:t=(()=>{}),url:n}=this.props,{device:r,loaded:o,isPreviewVisible:s}=this.state;if(!this.modalDOMElement||!s)return null;const c=i()("newspack-web-preview",r,o&&"is-loaded");return e(),(0,a.createPortal)(Ze("div",{className:c,children:Ue("div",{className:"newspack-web-preview__interior",children:[Ue("div",{className:"newspack-web-preview__toolbar",children:[Ze("div",{className:"newspack-web-preview__toolbar-left",children:Ue(l.ButtonGroup,{children:[Ze(l.Button,{onClick:()=>this.setState({device:"desktop"}),variant:"desktop"===r&&"primary",icon:La,label:Fa("Preview Desktop Size","newspack")}),Ze(l.Button,{onClick:()=>this.setState({device:"tablet"}),variant:"tablet"===r&&"primary",icon:Ra,label:Fa("Preview Tablet Size","newspack")}),Ze(l.Button,{onClick:()=>this.setState({device:"phone"}),variant:"phone"===r&&"primary",icon:ja,label:Fa("Preview Phone Size","newspack")})]})}),Ze("div",{className:"newspack-web-preview__toolbar-right",children:Ze(l.Button,{onClick:()=>{t(),this.setState({isPreviewVisible:!1,loaded:!1})},icon:Ba,label:Fa("Close Preview","newspack")})})]}),Ue("div",{className:"newspack-web-preview__content",children:[!o&&Ue("div",{className:"newspack-web-preview__is-waiting",children:[Ze(Da,{isLeft:!0}),Fa("Loading…","newspack")]}),Ze("iframe",{ref:this.iframeRef,title:"web-preview",src:n,onLoad:()=>{this.setState({loaded:!0}),this.props.onLoad(this.iframeRef.current)}})]})]})}),this.modalDOMElement)})),(0,s.Z)(this,"showPreview",(()=>{this.setState({isPreviewVisible:!0})})),this.iframeRef=(0,a.createRef)()}componentDidMount(){const e=document.getElementById($a);this.modalDOMElement=e||document.createElement("div"),e||(this.modalDOMElement.id=$a,document.body.appendChild(this.modalDOMElement))}componentDidUpdate(){!0===this.state.isPreviewVisible?document.body.classList.add("newspack-web-preview--open"):document.body.classList.remove("newspack-web-preview--open")}render(){const{label:e,variant:t,renderButton:n}=this.props;return Ue(a.Fragment,{children:[n?n({showPreview:this.showPreview}):Ze(l.Button,{variant:t,onClick:this.showPreview,tabIndex:"0",children:e}),this.getWebPreviewModal()]})}}Ha.defaultProps={url:"//newspack.com",label:Fa("Preview","newspack"),onLoad:()=>{}};var qa=n(9818);const Va=(0,u.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(d.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Za=n(6968),Ua=n.n(Za),Ga=n(7361),Wa=n.n(Ga),Ya=n(1609),Xa=n.n(Ya);const Ka=e=>t=>({type:e,payload:t}),Qa="newspack/wizards",Ja={isLoading:!0,isQuietLoading:!1,apiData:{},error:null},eo=e=>JSON.parse(JSON.stringify(e)),to={startLoadingData:Ka("START_LOADING_DATA"),finishLoadingData:Ka("FINISH_LOADING_DATA"),fetchFromAPI:Ka("FETCH_FROM_API"),setAPIDataForWizard:Ka("SET_API_DATA"),updateWizardSettings:Ka("UPDATE_WIZARD_SETTINGS"),setError:Ka("SET_ERROR"),saveWizardSettings(e){let{slug:t,section:n="",payloadPath:r=!1,updatePayload:a=null}=e;return function*(){a&&(yield to.updateWizardSettings({slug:t,...a}));const e=(0,qa.select)(Qa).getWizardAPIData(t),o=yield to.fetchFromAPI({path:`/newspack/v1/wizard/${t}/${n}`,method:"POST",data:r?Wa()(e,r):e,isQuietFetch:!0});if(!Xa()(o)&&!o.error)return to.setAPIDataForWizard({slug:t,data:o})}()},*wizardApiFetch(e){return yield to.fetchFromAPI(e)}},no=(0,qa.createReduxStore)(Qa,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ja,{type:t,payload:n={}}=arguments.length>1?arguments[1]:void 0;switch(t){case"START_LOADING_DATA":return n.isQuietLoading?{...e,isQuietLoading:!0}:{...e,isLoading:!0};case"FINISH_LOADING_DATA":return{...e,isLoading:!1,isQuietLoading:!1};case"SET_API_DATA":return Ua()(eo(e),["apiData",n.slug],n.data);case"UPDATE_WIZARD_SETTINGS":return Ua()(eo(e),["apiData",n.slug,...n.path],n.value);case"SET_ERROR":return{...e,error:n};default:return e}},actions:to,selectors:{isLoading:e=>e.isLoading,isQuietLoading:e=>e.isQuietLoading,getWizardAPIData:(e,t)=>e.apiData[t]||{},getError:e=>e.error},controls:{FETCH_FROM_API:e=>((0,qa.dispatch)(Qa).startLoadingData({isQuietLoading:Boolean(e.payload.isQuietFetch)}),et()(e.payload).then((e=>((0,qa.dispatch)(Qa).setError(null),e))).catch((e=>((0,qa.dispatch)(Qa).setError(e),{error:e}))).finally((e=>((0,qa.dispatch)(Qa).finishLoadingData(),e))))},resolvers:{*getWizardAPIData(e){if(e){const t=yield to.fetchFromAPI({path:`/newspack/v1/wizard/${e}`});return to.setAPIDataForWizard({slug:e,data:t})}return to.finishLoadingData()}}}),ro=nt.__,ao=()=>{const e=(0,qa.useSelect)((e=>e(Qa).getError()));if(!e)return null;const{level:t,message:n}=(e=>{let{data:t,message:n,code:r}=e,a="fatal";return t&&"level"in t?a=t.level:"rest_invalid_param"===r&&(a="notice"),{message:n,level:a}})(e);if("fatal"===t){const e="undefined"!=typeof newspack_urls&&newspack_urls.dashboard;return Ue(Ur,{title:ro("Unrecoverable error"),onRequestClose:e?()=>window.location=e:void 0,children:[Ze(ea,{noticeText:n,isError:!0,rawHTML:!0}),e&&Ze(Rn,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:Ze(Dn,{isPrimary:!0,href:e,children:ro("Return to Dashboard","newspack")})})]})}return Ze(ea,{isError:!0,className:"newspack-wizard__above-header",noticeText:n,rawHTML:!0})},oo=nt.__;(0,qa.register)(no);const{HashRouter:io,Redirect:so,Route:lo,Switch:co}=Nn,uo=e=>{let{sections:t=[],apiSlug:n,headerText:r,subHeaderText:o,hasSimpleFooter:s,className:l,renderAboveSections:c,requiredPlugins:u=[]}=e;const p=(0,qa.useSelect)((e=>e(Qa).isLoading())),d=(0,qa.useSelect)((e=>e(Qa).isQuietLoading()));(0,qa.useSelect)((e=>e(Qa).getWizardAPIData(n)));let f=t.filter((e=>!e.isHidden));const[h,m]=(0,a.useState)(0===u.length);return h||(r=u.length>1?oo("Required plugins","newspack"):oo("Required plugin","newspack"),f=[{path:"/",render:()=>Ze(ia,{plugins:u,onStatus:e=>{let{complete:t}=e;return m(t)}})}]),Ue(Ve,{children:[Ze("div",{className:i()(p?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":d}),children:Ue(io,{hashType:"slash",children:[newspack_aux_data.is_debug_mode&&Ze(ea,{debugMode:!0}),Ze("div",{className:"bg-white",children:Ze("div",{className:"newspack-wizard__header__inner",children:Ue("div",{className:"newspack-wizard__title",children:[Ze(Dn,{isLink:!0,href:newspack_urls.dashboard,label:oo("Return to Dashboard","newspack"),showTooltip:!0,icon:Va,iconSize:36,children:Ze(Wr,{size:36})}),Ue("div",{children:[r&&Ze("h2",{children:r}),o&&Ze("span",{children:o})]})]})})}),f.length>1&&Ze(Aa,{items:f,children:Ze(ao,{})}),Ze(Br,{}),Ue(co,{children:[f.map(((e,t)=>{const n=e.render;return Ze(lo,{path:e.path,children:Ue("div",{className:i()("newspack-wizard newspack-wizard__content",l),children:["function"==typeof c?c():null,Ze(n,{})]})},t)})),Ze(so,{to:f[0].path})]})]})}),!p&&Ze(Ir,{simple:s})]})};uo.useWizardData=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,qa.useSelect)((t=>t(Qa).getWizardAPIData(`newspack-${e}-wizard`)))||t},uo.STORE_NAMESPACE=Qa;const{Redirect:po,Route:fo}=Nn;n(3560),n(3218),n(7037)},6018:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},6644:(e,t,n)=>{"use strict";var r=n(1763),a=n(115),o=n(6018);e.exports={formats:o,parse:a,stringify:r}},115:(e,t,n)=>{"use strict";var r=n(8046),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var p=0;n.depth>0&&null!==(s=i.exec(o))&&p<n.depth;){if(p+=1,!n.plainObjects&&a.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,n,r){for(var a=r?t:l(t,n),o=e.length-1;o>=0;--o){var i,s=e[o];if("[]"===s&&n.parseArrays)i=[].concat(a);else{i=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[])[u]=a:i[c]=a:i={0:a}}a=i}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,p),f=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var m,v,g=d[n],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1;-1===b?(m=t.decoder(g,i.decoder,h,"key"),v=t.strictNullHandling?null:""):(m=t.decoder(g.slice(0,b),i.decoder,h,"key"),v=r.maybeMap(l(g.slice(b+1),t),(function(e){return t.decoder(e,i.decoder,h,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===h&&(v=s(v)),g.indexOf("[]=")>-1&&(v=o(v)?[v]:v),a.call(c,m)?c[m]=r.combine(c[m],v):c[m]=v}return c}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(u),f=0;f<d.length;++f){var h=d[f],m=c(h,u[h],n,"string"==typeof e);p=r.merge(p,m,n)}return!0===n.allowSparse?p:r.compact(p)}},1763:(e,t,n)=>{"use strict";var r=n(7478),a=n(8046),o=n(6018),i=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},p=Date.prototype.toISOString,d=o.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h=function e(t,n,o,i,s,c,p,d,h,m,v,g,y,b,w){var k,_=t;if(w.has(t))throw new RangeError("Cyclic object value");if("function"==typeof p?_=p(n,_):_ instanceof Date?_=m(_):"comma"===o&&l(_)&&(_=a.maybeMap(_,(function(e){return e instanceof Date?m(e):e}))),null===_){if(i)return c&&!y?c(n,f.encoder,b,"key",v):n;_=""}if("string"==typeof(k=_)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||a.isBuffer(_))return c?[g(y?n:c(n,f.encoder,b,"key",v))+"="+g(c(_,f.encoder,b,"value",v))]:[g(n)+"="+g(String(_))];var E,S=[];if(void 0===_)return S;if("comma"===o&&l(_))E=[{value:_.length>0?_.join(",")||null:void 0}];else if(l(p))E=p;else{var x=Object.keys(_);E=d?x.sort(d):x}for(var C=0;C<E.length;++C){var T=E[C],M="object"==typeof T&&void 0!==T.value?T.value:_[T];if(!s||null!==M){var P=l(_)?"function"==typeof o?o(n,T):n:n+(h?"."+T:"["+T+"]");w.set(t,!0);var A=r();u(S,e(M,P,o,i,s,c,p,d,h,m,v,g,y,b,A))}}return S};e.exports=function(e,t){var n,a=e,c=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=f.filter;return("function"==typeof e.filter||l(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof c.filter?a=(0,c.filter)("",a):l(c.filter)&&(n=c.filter);var p,d=[];if("object"!=typeof a||null===a)return"";p=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=s[p];n||(n=Object.keys(a)),c.sort&&n.sort(c.sort);for(var v=r(),g=0;g<n.length;++g){var y=n[g];c.skipNulls&&null===a[y]||u(d,h(a[y],y,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,v))}var b=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),b.length>0?w+b:""}},8046:(e,t,n)=>{"use strict";var r=n(6018),a=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var a=t[r],i=a.obj[a.prop],s=Object.keys(i),l=0;l<s.length;++l){var c=s[l],u=i[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:i,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],a=0;a<n.length;++a)void 0!==n[a]&&r.push(n[a]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(a){return r}},encode:function(e,t,n,a,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<s.length;++c){var u=s.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=i[u]:u<2048?l+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?l+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var i=t;return o(t)&&!o(n)&&(i=s(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(a.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var i=n[o];return a.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t}),i)}}},2073:(e,t,n)=>{"use strict";var r=b(n(9196)),a=b(n(5697)),o=b(n(2555)),i=b(n(1891)),s=b(n(3393)),l=b(n(614)),c=b(n(6060)),u=b(n(8088)),p=b(n(2699)),d=b(n(5353)),f=b(n(1013)),h=b(n(4595)),m=b(n(5352)),v=b(n(6935)),g=n(6380),y=b(n(6781));function b(e){return e&&e.__esModule?e:{default:e}}var w=(0,i.default)(new Date(-432e13)).startOf("day"),k=(0,i.default)(new Date(432e13)).startOf("day");function _(){}(0,o.default)({mixins:[c.default,y.default],displayName:"DateRangePicker",propTypes:{bemBlock:a.default.string,bemNamespace:a.default.string,className:a.default.string,dateStates:a.default.array,defaultState:a.default.string,disableNavigation:a.default.bool,firstOfWeek:a.default.oneOf([0,1,2,3,4,5,6]),helpMessage:a.default.string,initialDate:a.default.instanceOf(Date),initialFromValue:a.default.bool,initialMonth:a.default.number,initialRange:a.default.object,initialYear:a.default.number,locale:a.default.string,maximumDate:a.default.instanceOf(Date),minimumDate:a.default.instanceOf(Date),numberOfCalendars:a.default.number,onHighlightDate:a.default.func,onHighlightRange:a.default.func,onSelect:a.default.func,onSelectStart:a.default.func,paginationArrowComponent:a.default.func,selectedLabel:a.default.string,selectionType:a.default.oneOf(["single","range"]),singleDateRange:a.default.bool,showLegend:a.default.bool,stateDefinitions:a.default.object,value:u.default.momentOrMomentRange},getDefaultProps:function(){var e=new Date;return{bemNamespace:null,bemBlock:"DateRangePicker",className:"",numberOfCalendars:1,firstOfWeek:0,disableNavigation:!1,nextLabel:"",previousLabel:"",initialDate:new Date(e.getFullYear(),e.getMonth(),e.getDate()),initialFromValue:!0,locale:(0,i.default)().locale(),selectionType:"range",singleDateRange:!1,stateDefinitions:{__default:{color:null,selectable:!0,label:null}},selectedLabel:"Your selected dates",defaultState:"__default",dateStates:[],showLegend:!1,onSelect:_,paginationArrowComponent:h.default}},componentWillReceiveProps:function(e){var t=this.getDateStates(e),n=this.getEnabledRange(e),r={selectedStartDate:null,hideSelection:!1,dateStates:this.state.dateStates&&s.default.is(this.state.dateStates,t)?this.state.dateStates:t,enabledRange:this.state.enabledRange&&this.state.enabledRange.isSame(n)?this.state.enabledRange:n};if((0,v.default)(this.props,e)&&(!e.value||!this.isStartOrEndVisible(e))){var a=(0,g.getYearMonthProps)(e);r.year=a.year,r.month=a.month}this.setState(r)},getInitialState:function(){var e=new Date,t=this.props,n=t.initialYear,r=t.initialMonth,a=t.initialFromValue,o=t.value,s=e.getFullYear(),l=e.getMonth();if(Number.isInteger(n)&&Number.isInteger(r)&&(s=n,l=r),a&&(i.default.isMoment(o)||(0,m.default)(o))){var c=(0,g.getYearMonthProps)(this.props);l=c.month,s=c.year}return{year:s,month:l,selectedStartDate:null,highlightedDate:null,highlightRange:null,hideSelection:!1,enabledRange:this.getEnabledRange(this.props),dateStates:this.getDateStates(this.props)}},getEnabledRange:function(e){var t=e.minimumDate?(0,i.default)(e.minimumDate).startOf("day"):w,n=e.maximumDate?(0,i.default)(e.maximumDate).startOf("day"):k;return i.default.range(t,n)},getDateStates:function(e){var t=e.dateStates,n=e.defaultState,r=e.stateDefinitions,a=[],o=w,l=k,c=(0,i.default)(o).startOf("day"),u=s.default.fromJS(r);return t.forEach((function(e){var t=e.range,r=t.start.startOf("day"),o=t.end.startOf("day");c.isSame(r,"day")||a.push({state:n,range:i.default.range(c,r)}),a.push(e),c=o})),a.push({state:n,range:i.default.range(c,l)}),s.default.List(a).map((function(e){var t=u.get(e.state);return s.default.Map({range:e.range,state:e.state,selectable:t.get("selectable",!0),color:t.get("color")})}))},isDateDisabled:function(e){return!this.state.enabledRange.contains(e)},isDateSelectable:function(e){return this.dateRangesForDate(e).some((function(e){return e.get("selectable")}))},nonSelectableStateRanges:function(){return this.state.dateStates.filter((function(e){return!e.get("selectable")}))},dateRangesForDate:function(e){return this.state.dateStates.filter((function(t){return t.get("range").contains(e)}))},sanitizeRange:function(e,t){var n=this.nonSelectableStateRanges().map((function(e){return e.get("range")})),r=void 0;if(t){if(r=n.find((function(t){return e.intersect(t)})))return i.default.range(e.start,r.start)}else if(r=n.findLast((function(t){return e.intersect(t)})))return i.default.range(r.end,e.end);return e.start.isBefore(this.state.enabledRange.start)?i.default.range(this.state.enabledRange.start,e.end):e.end.isAfter(this.state.enabledRange.end)?i.default.range(e.start,this.state.enabledRange.end):e},highlightRange:function(e){this.setState({highlightedRange:e,highlightedDate:null}),"function"==typeof this.props.onHighlightRange&&this.props.onHighlightRange(e,this.statesForRange(e))},onUnHighlightDate:function(){this.setState({highlightedDate:null})},onSelectDate:function(e){var t=this.props.selectionType,n=this.state.selectedStartDate;"range"===t?n?this.completeRangeSelection():e&&!this.isDateDisabled(e)&&this.isDateSelectable(e)&&(this.startRangeSelection(e),this.props.singleDateRange&&this.highlightRange(i.default.range(e,e))):!this.isDateDisabled(e)&&this.isDateSelectable(e)&&this.completeSelection()},onHighlightDate:function(e){var t=this.props.selectionType,n=this.state.selectedStartDate,r=void 0,a=void 0,o=void 0;"range"===t&&n?(r=s.default.List.of(n,e).sortBy((function(e){return e.unix()})),o=(a=i.default.range(r.get(0),r.get(1))).start.unix()===n.unix(),a=this.sanitizeRange(a,o),this.highlightRange(a)):!this.isDateDisabled(e)&&this.isDateSelectable(e)&&this.highlightDate(e)},startRangeSelection:function(e){this.setState({hideSelection:!0,selectedStartDate:e}),"function"==typeof this.props.onSelectStart&&this.props.onSelectStart((0,i.default)(e))},statesForDate:function(e){return this.state.dateStates.filter((function(t){return e.within(t.get("range"))})).map((function(e){return e.get("state")}))},statesForRange:function(e){return e.start.isSame(e.end,"day")?this.statesForDate(e.start):this.state.dateStates.filter((function(t){return t.get("range").intersect(e)})).map((function(e){return e.get("state")}))},completeSelection:function(){var e=this.state.highlightedDate;e&&(this.setState({hideSelection:!1,highlightedDate:null}),this.props.onSelect(e,this.statesForDate(e)))},completeRangeSelection:function(){var e=this.state.highlightedRange;!e||e.start.isSame(e.end,"day")&&!this.props.singleDateRange||(this.setState({selectedStartDate:null,highlightedRange:null,highlightedDate:null,hideSelection:!1}),this.props.onSelect(e,this.statesForRange(e)))},highlightDate:function(e){this.setState({highlightedDate:e}),"function"==typeof this.props.onHighlightDate&&this.props.onHighlightDate(e,this.statesForDate(e))},getMonthDate:function(){return(0,i.default)(new Date(this.state.year,this.state.month,1))},isStartOrEndVisible:function(e){var t=this,n=e.value,r=e.selectionType,a=e.numberOfCalendars,o=function(e){var n=(0,g.getYearMonth)(e),r=n.year===t.state.year,o=n.month===t.state.month||2===a&&n.month-1===t.state.month;return r&&o};return"single"===r?o(n):o(n.start)||o(n.end)},canMoveBack:function(){return!this.getMonthDate().subtract(1,"days").isBefore(this.state.enabledRange.start)},moveBack:function(){var e=void 0;this.canMoveBack()&&((e=this.getMonthDate()).subtract(1,"months"),this.setState((0,g.getYearMonth)(e)))},canMoveForward:function(){return!this.getMonthDate().add(this.props.numberOfCalendars,"months").isAfter(this.state.enabledRange.end)},moveForward:function(){var e=void 0;this.canMoveForward()&&((e=this.getMonthDate()).add(1,"months"),this.setState((0,g.getYearMonth)(e)))},changeYear:function(e){var t=this.state,n=t.enabledRange,r=t.month;(0,i.default)({years:e,months:r,date:1}).unix()<n.start.unix()&&(r=n.start.month()),(0,i.default)({years:e,months:r+1,date:1}).unix()>n.end.unix()&&(r=n.end.month()),this.setState({year:e,month:r})},changeMonth:function(e){this.setState({month:e})},rangesOverlap:function(e,t){return!!(e.overlaps(t)||e.contains(t.start)||e.contains(t.end))},renderCalendar:function(e){var t,n=this.props,a=n.bemBlock,o=n.bemNamespace,c=n.firstOfWeek,u=n.numberOfCalendars,p=n.selectionType,h=n.value,v=this.state,g=v.dateStates,y=v.enabledRange,b=v.hideSelection,w=v.highlightedDate,k=v.highlightedRange,_=this.getMonthDate(),E=e+"-"+_.year()+"-"+_.month();_.add(e,"months");var S=new l.default.Calendar(c),x=s.default.fromJS(S.monthDates(_.year(),_.month())),C=x.first().first(),T=x.last().last(),M=i.default.range(C,T);return(i.default.isMoment(h)&&!M.contains(h)||(0,m.default)(h)&&!this.rangesOverlap(M,h))&&(h=null),i.default.isMoment(w)&&M.contains(w)||(w=null),(0,m.default)(k)&&this.rangesOverlap(M,k)||(k=null),t={bemBlock:a,bemNamespace:o,dateStates:g,enabledRange:y,firstOfWeek:c,hideSelection:b,highlightedDate:w,highlightedRange:k,index:e,key:E,selectionType:p,value:h,maxIndex:u-1,firstOfMonth:_,onMonthChange:this.changeMonth,onYearChange:this.changeYear,onSelectDate:this.onSelectDate,onHighlightDate:this.onHighlightDate,onUnHighlightDate:this.onUnHighlightDate,dateRangesForDate:this.dateRangesForDate,dateComponent:f.default,locale:this.props.locale},r.default.createElement(d.default,t)},render:function(){var e=this.props,t=e.paginationArrowComponent,n=e.className,a=e.numberOfCalendars,o=e.stateDefinitions,i=e.selectedLabel,l=e.showLegend,c=e.helpMessage,u=s.default.Range(0,a).map(this.renderCalendar);return n=this.cx({element:null})+" "+n,r.default.createElement("div",{className:n.trim()},r.default.createElement(t,{direction:"previous",onTrigger:this.moveBack,disabled:!this.canMoveBack()}),u.toJS(),r.default.createElement(t,{direction:"next",onTrigger:this.moveForward,disabled:!this.canMoveForward()}),c?r.default.createElement("span",{className:this.cx({element:"HelpMessage"})},c):null,l?r.default.createElement(p.default,{stateDefinitions:o,selectedLabel:i}):null)}})},2699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),o=l(n(2555)),i=l(n(6060)),s=l(n(6781));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,o.default)({mixins:[i.default,s.default],displayName:"Legend",propTypes:{selectedLabel:a.default.string.isRequired,stateDefinitions:a.default.object.isRequired},render:function(){var e=this.props,t=e.selectedLabel,n=e.stateDefinitions,a=[],o=void 0,i=void 0,s=void 0;for(o in n)(i=n[o]).label&&i.color&&(s={backgroundColor:i.color},a.push(r.default.createElement("li",{className:this.cx({element:"LegendItem"}),key:o},r.default.createElement("span",{className:this.cx({element:"LegendItemColor"}),style:s}),r.default.createElement("span",{className:this.cx({element:"LegendItemLabel"})},i.label))));return r.default.createElement("ul",{className:this.cx()},r.default.createElement("li",{className:this.cx({element:"LegendItem"})},r.default.createElement("span",{className:this.cx({element:"LegendItemColor",modifiers:{selection:!0}})}),r.default.createElement("span",{className:this.cx({element:"LegendItemLabel"})},t)),a)}});t.default=c},4595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(9196)),o=c(n(5697)),i=c(n(2555)),s=c(n(6060)),l=c(n(6781));function c(e){return e&&e.__esModule?e:{default:e}}var u=(0,i.default)({mixins:[s.default,l.default],displayName:"PaginationArrow",propTypes:{disabled:o.default.bool,onTrigger:o.default.func,direction:o.default.oneOf(["next","previous"])},getDefaultProps:function(){return{disabled:!1}},render:function(){var e,t,n,o=this.props,i=o.disabled,s=o.direction,l=o.onTrigger,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["disabled","direction","onTrigger"]),u=(n=!0,(t=s)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),p={disabled:i},d={modifiers:u,states:p},f={element:"PaginationArrowIcon",modifiers:u,states:p};return a.default.createElement("div",r({className:this.cx(d)},c,{onClick:l}),a.default.createElement("div",{className:this.cx(f)}))}});t.default=u},1013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(9196)),a=h(n(5697)),o=h(n(2555)),i=h(n(3393)),s=h(n(6060)),l=h(n(8088)),c=h(n(25)),u=h(n(8876)),p=h(n(2729)),d=h(n(680)),f=h(n(5719));function h(e){return e&&e.__esModule?e:{default:e}}var m=(0,o.default)({mixins:[s.default,c.default],displayName:"CalendarDate",propTypes:{date:l.default.moment,firstOfMonth:a.default.object.isRequired,isSelectedDate:a.default.bool,isSelectedRangeStart:a.default.bool,isSelectedRangeEnd:a.default.bool,isInSelectedRange:a.default.bool,isHighlightedDate:a.default.bool,isHighlightedRangeStart:a.default.bool,isHighlightedRangeEnd:a.default.bool,isInHighlightedRange:a.default.bool,highlightedDate:a.default.object,dateStates:a.default.instanceOf(i.default.List),isDisabled:a.default.bool,isToday:a.default.bool,dateRangesForDate:a.default.func,onHighlightDate:a.default.func,onUnHighlightDate:a.default.func,onSelectDate:a.default.func},getInitialState:function(){return{mouseDown:!1}},componentWillUnmount:function(){this.isUnmounted=!0,document.removeEventListener("mouseup",this.mouseUp),document.removeEventListener("touchend",this.touchEnd)},mouseUp:function(){this.props.onSelectDate(this.props.date),this.isUnmounted||(this.state.mouseDown&&this.setState({mouseDown:!1}),document.removeEventListener("mouseup",this.mouseUp))},mouseDown:function(){this.setState({mouseDown:!0}),document.addEventListener("mouseup",this.mouseUp)},touchEnd:function(){event.preventDefault(),this.props.onHighlightDate(this.props.date),this.props.onSelectDate(this.props.date),this.isUnmounted||(this.state.mouseDown&&this.setState({mouseDown:!1}),document.removeEventListener("touchend",this.touchEnd))},touchStart:function(e){e.preventDefault(),this.setState({mouseDown:!0}),document.addEventListener("touchend",this.touchEnd)},mouseEnter:function(){this.props.onHighlightDate(this.props.date)},mouseLeave:function(){this.state.mouseDown&&(this.props.onSelectDate(this.props.date),this.setState({mouseDown:!1})),this.props.onUnHighlightDate(this.props.date)},getBemModifiers:function(){var e=this.props,t=e.date,n=e.firstOfMonth,r=e.isToday,a=!1,o=!1;return t.month()!==n.month()&&(a=!0),0!==t.day()&&6!==t.day()||(o=!0),{today:r,weekend:o,otherMonth:a}},getBemStates:function(){var e=this.props,t=e.isSelectedDate,n=e.isInSelectedRange,r=e.isInHighlightedRange,a=e.isHighlightedDate;return{disabled:e.isDisabled,highlighted:a,selected:t||n||r}},render:function(){var e=this.props,t=e.date,n=e.dateRangesForDate,a=e.isSelectedDate,o=e.isSelectedRangeStart,i=e.isSelectedRangeEnd,s=e.isInSelectedRange,l=e.isHighlightedDate,c=e.isHighlightedRangeStart,h=e.isHighlightedRangeEnd,m=e.isInHighlightedRange,v=this.getBemModifiers(),g=this.getBemStates(),y=m,b=void 0,w=void 0,k=void 0,_=n(t),E=_.count(),S={},x={},C=void 0,T=void 0;return a||o&&i||c&&h?T="single":o||c?T="start":i||h?T="end":(s||m)&&(T="segment"),l&&(C="single"),1===E?(b=_.getIn([0,"color"]))&&(x={backgroundColor:b},S={borderLeftColor:(0,u.default)(b,-10),borderRightColor:(0,u.default)(b,-10)}):(w=_.getIn([0,"color"]),k=_.getIn([1,"color"]),w&&(S.borderLeftColor=(0,u.default)(w,-10)),k&&(S.borderRightColor=(0,u.default)(k,-10))),r.default.createElement("td",{className:this.cx({element:"Date",modifiers:v,states:g}),style:S,onTouchStart:this.touchStart,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,onMouseDown:this.mouseDown},E>1&&r.default.createElement("div",{className:this.cx({element:"HalfDateStates"})},r.default.createElement(p.default,{period:"am",color:w}),r.default.createElement(p.default,{period:"pm",color:k})),1===E&&r.default.createElement("div",{className:this.cx({element:"FullDateStates"}),style:x}),r.default.createElement("span",{className:this.cx({element:"DateLabel"})},t.format("D")),T?r.default.createElement(f.default,{modifier:T,pending:y}):null,C?r.default.createElement(d.default,{modifier:C}):null)}});t.default=m},2729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),o=l(n(2555)),i=l(n(6060)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,o.default)({mixins:[i.default,s.default],displayName:"CalendarDatePeriod",propTypes:{color:a.default.string,period:a.default.string},render:function(){var e,t,n,a=this.props,o=a.color,i=a.period,s=(n=!0,(t=i)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),l=void 0;return o&&(l={backgroundColor:o}),r.default.createElement("div",{style:l,className:this.cx({modifiers:s})})}});t.default=c},680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),o=l(n(2555)),i=l(n(6060)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,o.default)({mixins:[i.default,s.default],displayName:"CalendarHighlight",propTypes:{modifier:a.default.string},render:function(){var e,t,n,a=this.props.modifier,o=(n=!0,(t=a)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e);return r.default.createElement("div",{className:this.cx({states:{},modifiers:o})})}});t.default=c},5353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=h(n(9196)),o=h(n(5697)),i=h(n(2555)),s=h(n(1891)),l=h(n(614)),c=h(n(3393)),u=h(n(6060)),p=h(n(8088)),d=h(n(5352)),f=h(n(25));function h(e){return e&&e.__esModule?e:{default:e}}var m=(0,i.default)({mixins:[u.default,f.default],displayName:"CalendarMonth",propTypes:{dateComponent:o.default.func,disableNavigation:o.default.bool,enabledRange:p.default.momentRange,firstOfMonth:p.default.moment,firstOfWeek:o.default.oneOf([0,1,2,3,4,5,6]),hideSelection:o.default.bool,highlightedDate:o.default.object,highlightedRange:o.default.object,onMonthChange:o.default.func,onYearChange:o.default.func,value:p.default.momentOrMomentRange,locale:o.default.string},setLocale:function(e){s.default.locale(e),this.WEEKDAYS=c.default.List(s.default.weekdays()).zip(c.default.List(s.default.weekdaysShort())),this.MONTHS=c.default.List(s.default.months())},componentWillMount:function(){var e=this.props.locale;this.setLocale(e)},componentWillReceiveProps:function(e){var t=e.locale;t!==this.props.locale&&this.setLocale(t)},renderDay:function(e,t){var n=this.props,o=n.dateComponent,i=n.value,l=n.highlightedDate,c=n.highlightedRange,u=n.hideSelection,p=n.enabledRange,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["dateComponent","value","highlightedDate","highlightedRange","hideSelection","enabledRange"]),h=(0,s.default)(e).locale(this.props.locale),m=void 0,v=void 0,g=void 0,y=void 0;return!u&&i&&s.default.isMoment(i)&&i.isSame(h,"day")?v=!0:!u&&i&&(0,d.default)(i)&&i.contains(h)&&(m=!0,g=i.start.isSame(h,"day"),y=i.end.isSame(h,"day")),a.default.createElement(o,r({key:t,isToday:h.isSame((0,s.default)(),"day"),isDisabled:!p.contains(h),isHighlightedDate:!(!l||!l.isSame(h,"day")),isHighlightedRangeStart:!(!c||!c.start.isSame(h,"day")),isHighlightedRangeEnd:!(!c||!c.end.isSame(h,"day")),isInHighlightedRange:!(!c||!c.contains(h)),isSelectedDate:v,isSelectedRangeStart:g,isSelectedRangeEnd:y,isInSelectedRange:m,date:h},f))},renderWeek:function(e,t){var n=e.map(this.renderDay);return a.default.createElement("tr",{className:this.cx({element:"Week"}),key:t},n.toJS())},renderDayHeaders:function(){var e=this.props.firstOfWeek,t=c.default.Range(e,7).concat(c.default.Range(0,e)).map(function(e){var t=this.WEEKDAYS.get(e);return a.default.createElement("th",{className:this.cx({element:"WeekdayHeading"}),key:t,scope:"col"},a.default.createElement("abbr",{title:t[0]},t[1]))}.bind(this));return a.default.createElement("tr",{className:this.cx({element:"Weekdays"})},t.toJS())},handleYearChange:function(e){this.props.onYearChange(parseInt(e.target.value,10))},renderYearChoice:function(e){var t=this.props.enabledRange;return e<t.start.year()||e>t.end.year()?null:a.default.createElement("option",{key:e,value:e},(0,s.default)(e,"YYYY").locale(this.props.locale).format("YYYY"))},renderHeaderYear:function(){var e=this.props.firstOfMonth,t=e.year(),n=c.default.Range(t-5,t).concat(c.default.Range(t,t+10)).map(this.renderYearChoice);return a.default.createElement("span",{className:this.cx({element:"MonthHeaderLabel",modifiers:{year:!0}})},e.locale(this.props.locale).format("YYYY"),this.props.disableNavigation?null:a.default.createElement("select",{className:this.cx({element:"MonthHeaderSelect"}),value:t,onChange:this.handleYearChange},n.toJS()))},handleMonthChange:function(e){this.props.onMonthChange(parseInt(e.target.value,10))},renderMonthChoice:function(e,t){var n=this.props,r=n.firstOfMonth,o=n.enabledRange,i=!1,l=r.year();return(0,s.default)({years:l,months:t+1,date:1}).unix()<o.start.unix()&&(i=!0),(0,s.default)({years:l,months:t,date:1}).unix()>o.end.unix()&&(i=!0),a.default.createElement("option",{key:e,value:t,disabled:i?"disabled":null},e)},renderHeaderMonth:function(){var e=this.props.firstOfMonth,t=this.MONTHS.map(this.renderMonthChoice);return a.default.createElement("span",{className:this.cx({element:"MonthHeaderLabel",modifiers:{month:!0}})},e.locale(this.props.locale).format("MMMM"),this.props.disableNavigation?null:a.default.createElement("select",{className:this.cx({element:"MonthHeaderSelect"}),value:e.month(),onChange:this.handleMonthChange},t.toJS()))},renderHeader:function(){return a.default.createElement("div",{className:this.cx({element:"MonthHeader"})},this.renderHeaderMonth()," ",this.renderHeaderYear())},render:function(){var e=this.props,t=e.firstOfWeek,n=e.firstOfMonth,r=new l.default.Calendar(t),o=c.default.fromJS(r.monthDates(n.year(),n.month())).map(this.renderWeek);return a.default.createElement("div",{className:this.cx({element:"Month"})},this.renderHeader(),a.default.createElement("table",{className:this.cx({element:"MonthDates"})},a.default.createElement("thead",null,this.renderDayHeaders()),a.default.createElement("tbody",null,o.toJS())))}});t.default=m},5719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9196)),a=l(n(5697)),o=l(n(2555)),i=l(n(6060)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}var c=(0,o.default)({mixins:[i.default,s.default],displayName:"CalendarSelection",propTypes:{modifier:a.default.string,pending:a.default.bool.isRequired},render:function(){var e,t,n,a=this.props,o=a.modifier,i=a.pending,s=(n=!0,(t=o)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),l={pending:i};return r.default.createElement("div",{className:this.cx({states:l,modifiers:s})})}});t.default=c},1891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(6292),o=(r=a)&&r.__esModule?r:{default:r};var i=(0,n(3542).extendMoment)(o.default);t.default=i},6060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5737)),a=o(n(5697));function o(e){return e&&e.__esModule?e:{default:e}}var i={propTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},contextTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},childContextTypes:{bemNamespace:a.default.string,bemBlock:a.default.string},getChildContext:function(){return{bemNamespace:this.getBemNamespace(),bemBlock:this.getBemBlock()}},getBemNamespace:function(){return this.props.bemNamespace?this.props.bemNamespace:this.context.bemNamespace?this.context.bemNamespace:null},getBemBlock:function(){return this.props.bemBlock?this.props.bemBlock:this.context.bemBlock?this.context.bemBlock:null},cx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={namespace:this.getBemNamespace(),element:this.constructor.displayName,block:this.getBemBlock()};return Object.assign(t,e),(0,r.default)(t)}};t.default=i},8088:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1891)),a=o(n(5352));function o(e){return e&&e.__esModule?e:{default:e}}t.default={momentOrMomentRange:function(e,t){var n=e[t];return n?r.default.isMoment(n)||(0,a.default)(n)?null:new Error("'"+t+"' must be a moment or a moment range"):null},moment:function(e,t){var n=e[t];return n?r.default.isMoment(n)?null:new Error("'"+t+"' must be a moment"):null},momentRange:function(e,t){var n=e[t];return n?(0,a.default)(n)?null:new Error("'"+t+"' must be a moment range"):null}}},25:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(1939),o=(r=a)&&r.__esModule?r:{default:r};var i={shouldComponentUpdate:function(e,t){return!(0,o.default)(this.props,e)||!(0,o.default)(this.state,t)}};t.default=i},8329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!(0,o.default)(e)||!(0,o.default)(t))return!1;return e.start.isSame(t.start,"day")&&e.end.isSame(t.end,"day")};var r,a=n(5352),o=(r=a)&&r.__esModule?r:{default:r}},8859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!o.default.isMoment(e)||!o.default.isMoment(t))&&e.isSame(t)};var r,a=n(1891),o=(r=a)&&r.__esModule?r:{default:r}},5737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.block,r=e.element,a=e.namespace,o=e.modifiers,i=e.states,s=[],l=void 0;l=r?a?a+"-"+t+"__"+r:t+"__"+r:a?a+"-"+t:t;s.push(l),i&&("object"===(void 0===i?"undefined":n(i))&&(i=Object.keys(i).filter((function(e){return i[e]}))),i.forEach((function(e){s.push(l+"--is-"+e)})));o&&("object"===(void 0===o?"undefined":n(o))&&(o=Object.keys(o).filter((function(e){return o[e]}))),o.forEach((function(e){s.push(l+"--"+e),i&&i.forEach((function(t){s.push(l+"--"+e+"--is-"+t)}))})));return s.join(" ")}},6380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getYearMonthProps=void 0,t.getYearMonth=i;var r=o(n(1891)),a=o(n(5352));function o(e){return e&&e.__esModule?e:{default:e}}function i(e){if(r.default.isMoment(e))return{year:e.year(),month:e.month()}}t.getYearMonthProps=function(e){var t=e.selectionType,n=e.value,o=e.initialYear,s=e.initialMonth;return r.default.isMoment(n)||(0,a.default)(n)?i("single"===t?n:n.start):{year:o,month:s}}},6935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.value,o=t.value;return!(n===o||(0,a.default)(n,o)||(0,r.default)(n,o))};var r=o(n(8329)),a=o(n(8859));function o(e){return e&&e.__esModule?e:{default:e}}},5352:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&e.start&&e.end&&o.default.isMoment(e.start)&&o.default.isMoment(e.end)};var r,a=n(1891),o=(r=a)&&r.__esModule?r:{default:r}},8876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r=!1,a=void 0,o=void 0,i=void 0;"#"===e[0]&&(e=e.slice(1),r=!0);n=parseInt(e,16),(a=(n>>16)+t)>255?a=255:a<0&&(a=0);(o=(n>>8&255)+t)>255?o=255:o<0&&(o=0);(i=(255&n)+t)>255?i=255:i<0&&(i=0);return(r?"#":"")+(i|o<<8|a<<16).toString(16)}},1939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1891)),a=i(n(8329)),o=i(n(5352));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n))return!1;if(r.default.isMoment(e[n])&&r.default.isMoment(t[n])){if(!e[n].isSame(t[n],"day"))return!1}else if((0,o.default)(e[n])&&(0,o.default)(t[n])){if(!(0,a.default)(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}},7418:e=>{"use strict";
|
|
21
16
|
/*
|
|
22
17
|
object-assign
|
|
23
18
|
(c) Sindre Sorhus
|
|
24
19
|
@license MIT
|
|
25
|
-
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,i){for(var o,s,l=a(e),c=1;c<arguments.length;c++){for(var u in o=Object(arguments[c]))n.call(o,u)&&(l[u]=o[u]);if(t){s=t(o);for(var p=0;p<s.length;p++)r.call(o,s[p])&&(l[s[p]]=o[s[p]])}}return l}},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&a&&"function"==typeof a.get?a.get:null,o=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,k=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,S=Array.prototype.join,x=Array.prototype.slice,C=Math.floor,M="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var a=String(r),i=y.call(t,a.length+1);return b.call(a,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var z=n(4654),L=z.custom,R=H(L)?L:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return b.call(String(e),/"/g,""")}function F(e){return!("[object Array]"!==V(e)||O&&"object"==typeof e&&O in e)}function $(e){return!("[object RegExp]"!==V(e)||O&&"object"==typeof e&&O in e)}function H(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,a){var s=n||{};if(Z(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Z(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Z(s,"customInspect")||s.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Z(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Z(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?D(t,w):w}if("bigint"==typeof t){var _=String(t)+"n";return m?D(t,_):_}var C=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=C&&C>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var T=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,r);if(void 0===a)a=[];else if(U(a,t)>=0)return"[Circular]";function L(t,n,i){if(n&&(a=x.call(a)).push(n),i){var o={depth:s.depth};return Z(s,"quoteStyle")&&(o.quoteStyle=s.quoteStyle),e(t,o,r+1,a)}return e(t,s,r+1,a)}if("function"==typeof t&&!$(t)){var q=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),W=J(t,L);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(W.length>0?" { "+S.call(W,", ")+" }":"")}if(H(t)){var ee=A?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||A?ee:Y(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+k.call(String(t.nodeName)),ne=t.attributes||[],re=0;re<ne.length;re++)te+=" "+ne[re].name+"="+j(B(ne[re].value),"double",s);return te+=">",t.childNodes&&t.childNodes.length&&(te+="..."),te+="</"+k.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ae=J(t,L);return T&&!function(e){for(var t=0;t<e.length;t++)if(U(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Q(ae,T)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||O&&"object"==typeof e&&O in e)}(t)){var ie=J(t,L);return"cause"in Error.prototype||!("cause"in t)||I.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(E.call("[cause]: "+L(t.cause),ie),", ")+" }"}if("object"==typeof t&&l){if(R&&"function"==typeof t[R]&&z)return z(t,{depth:C-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var oe=[];return o&&o.call(t,(function(e,n){oe.push(L(n,t,!0)+" => "+L(e,t))})),K("Map",i.call(t),oe,T)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(L(e,t))})),K("Set",c.call(t),se,T)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return X("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return X("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(t){}return!1}(t))return X("WeakRef");if(function(e){return!("[object Number]"!==V(e)||O&&"object"==typeof e&&O in e)}(t))return Y(L(Number(t)));if(function(e){if(!e||"object"!=typeof e||!M)return!1;try{return M.call(e),!0}catch(t){}return!1}(t))return Y(L(M.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||O&&"object"==typeof e&&O in e)}(t))return Y(h.call(t));if(function(e){return!("[object String]"!==V(e)||O&&"object"==typeof e&&O in e)}(t))return Y(L(String(t)));if(!function(e){return!("[object Date]"!==V(e)||O&&"object"==typeof e&&O in e)}(t)&&!$(t)){var le=J(t,L),ce=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",pe=!ce&&O&&Object(t)===t&&O in t?y.call(V(t),8,-1):ue?"Object":"",de=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||ue?"["+S.call(E.call([],pe||[],ue||[]),": ")+"] ":"");return 0===le.length?de+"{}":T?de+"{"+Q(le,T)+"}":de+"{ "+S.call(le,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function Z(e,t){return q.call(e,t)}function V(e){return m.call(e)}function U(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(y.call(e,0,t.maxStringLength),t)+r}return j(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,W),"single",t)}function W(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function K(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):S.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function J(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var a=0;a<e.length;a++)r[a]=Z(e,a)?t(e[a],e):""}var i,o="function"==typeof T?T(e):[];if(A){i={};for(var s=0;s<o.length;s++)i["$"+o[s]]=o[s]}for(var l in e)Z(e,l)&&(n&&String(Number(l))===l&&l<e.length||A&&i["$"+l]instanceof Symbol||(_.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof T)for(var c=0;c<o.length;c++)I.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}},4779:(e,t,n)=>{var r=n(6173);e.exports=f,e.exports.parse=i,e.exports.compile=function(e,t){return s(i(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=d;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,o=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var p=n[0],d=n[1],f=n.index;if(s+=e.slice(o,f),o=f+p.length,d)s+=d[1];else{var h=e[o],m=n[2],v=n[3],g=n[4],y=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=m&&null!=h&&h!==m,_="+"===b||"*"===b,E="?"===b||"*"===b,S=n[2]||u,x=g||y;r.push({name:v||i++,prefix:m||"",delimiter:S,optional:E,repeat:_,partial:k,asterisk:!!w,pattern:x?c(x):w?".*":"[^"+l(S)+"]+?"})}}return o<e.length&&(s+=e.substr(o)),s&&r.push(s),r}function o(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",p(t)));return function(t,a){for(var i="",s=t||{},l=(a||{}).pretty?o:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var p,d=s[u.name];if(null==d){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(d)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<d.length;f++){if(p=l(d[f]),!n[c].test(p))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(p)+"`");i+=(0===f?u.prefix:u.delimiter)+p}}else{if(p=u.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(d),!n[c].test(p))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+p+'"');i+=u.prefix+p}}else i+=u}return i}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,i=!1!==n.end,o="",s=0;s<e.length;s++){var c=e[s];if("string"==typeof c)o+=l(c);else{var d=l(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+d+f+")*"),o+=f=c.optional?c.partial?d+"("+f+")?":"(?:"+d+"("+f+"))?":d+"("+f+")"}}var h=l(n.delimiter||"/"),m=o.slice(-h.length)===h;return a||(o=(m?o.slice(0,-h.length):o)+"(?:"+h+"(?=$))?"),o+=i?"$":a&&m?"":"(?="+h+"|$)",u(new RegExp("^"+o,p(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(f(e[a],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",p(n)),t)}(e,t,n):function(e,t,n){return d(i(e,n),t,n)}(e,t,n)}},6173:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6781:e=>{"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function r(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var a=Object.keys(e),i=Object.keys(r);if(a.length!==i.length)return!1;for(var o=0;o<a.length;o++)if(!t.call(r,a[o])||!n(e[a[o]],r[a[o]]))return!1;return!0}e.exports={shouldComponentUpdate:function(e,t){return!r(this.props,e)||!r(this.state,t)}}},86:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;
|
|
20
|
+
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&a&&"function"==typeof a.get?a.get:null,i=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,k=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,S=Array.prototype.join,x=Array.prototype.slice,C=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function z(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var a=String(r),o=y.call(t,a.length+1);return b.call(a,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var D=n(4654),L=D.custom,R=H(L)?L:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return b.call(String(e),/"/g,""")}function F(e){return!("[object Array]"!==Z(e)||O&&"object"==typeof e&&O in e)}function $(e){return!("[object RegExp]"!==Z(e)||O&&"object"==typeof e&&O in e)}function H(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,a){var s=n||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?z(t,w):w}if("bigint"==typeof t){var _=String(t)+"n";return m?z(t,_):_}var C=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=C&&C>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,r);if(void 0===a)a=[];else if(U(a,t)>=0)return"[Circular]";function L(t,n,o){if(n&&(a=x.call(a)).push(n),o){var i={depth:s.depth};return V(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,r+1,a)}return e(t,s,r+1,a)}if("function"==typeof t&&!$(t)){var q=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),W=J(t,L);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(W.length>0?" { "+S.call(W,", ")+" }":"")}if(H(t)){var ee=A?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||A?ee:Y(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+k.call(String(t.nodeName)),ne=t.attributes||[],re=0;re<ne.length;re++)te+=" "+ne[re].name+"="+j(B(ne[re].value),"double",s);return te+=">",t.childNodes&&t.childNodes.length&&(te+="..."),te+="</"+k.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ae=J(t,L);return M&&!function(e){for(var t=0;t<e.length;t++)if(U(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Q(ae,M)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==Z(e)||O&&"object"==typeof e&&O in e)}(t)){var oe=J(t,L);return"cause"in Error.prototype||!("cause"in t)||I.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(oe,", ")+" }":"{ ["+String(t)+"] "+S.call(E.call("[cause]: "+L(t.cause),oe),", ")+" }"}if("object"==typeof t&&l){if(R&&"function"==typeof t[R]&&D)return D(t,{depth:C-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ie=[];return i&&i.call(t,(function(e,n){ie.push(L(n,t,!0)+" => "+L(e,t))})),K("Map",o.call(t),ie,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(L(e,t))})),K("Set",c.call(t),se,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return X("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return X("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(t){}return!1}(t))return X("WeakRef");if(function(e){return!("[object Number]"!==Z(e)||O&&"object"==typeof e&&O in e)}(t))return Y(L(Number(t)));if(function(e){if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(t){}return!1}(t))return Y(L(T.call(t)));if(function(e){return!("[object Boolean]"!==Z(e)||O&&"object"==typeof e&&O in e)}(t))return Y(h.call(t));if(function(e){return!("[object String]"!==Z(e)||O&&"object"==typeof e&&O in e)}(t))return Y(L(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===window)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==Z(e)||O&&"object"==typeof e&&O in e)}(t)&&!$(t)){var le=J(t,L),ce=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",pe=!ce&&O&&Object(t)===t&&O in t?y.call(Z(t),8,-1):ue?"Object":"",de=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||ue?"["+S.call(E.call([],pe||[],ue||[]),": ")+"] ":"");return 0===le.length?de+"{}":M?de+"{"+Q(le,M)+"}":de+"{ "+S.call(le,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return q.call(e,t)}function Z(e){return m.call(e)}function U(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(y.call(e,0,t.maxStringLength),t)+r}return j(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,W),"single",t)}function W(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function K(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):S.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function J(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var a=0;a<e.length;a++)r[a]=V(e,a)?t(e[a],e):""}var o,i="function"==typeof M?M(e):[];if(A){o={};for(var s=0;s<i.length;s++)o["$"+i[s]]=i[s]}for(var l in e)V(e,l)&&(n&&String(Number(l))===l&&l<e.length||A&&o["$"+l]instanceof Symbol||(_.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof M)for(var c=0;c<i.length;c++)I.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}},4779:(e,t,n)=>{var r=n(6173);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=d;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var p=n[0],d=n[1],f=n.index;if(s+=e.slice(i,f),i=f+p.length,d)s+=d[1];else{var h=e[i],m=n[2],v=n[3],g=n[4],y=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=m&&null!=h&&h!==m,_="+"===b||"*"===b,E="?"===b||"*"===b,S=n[2]||u,x=g||y;r.push({name:v||o++,prefix:m||"",delimiter:S,optional:E,repeat:_,partial:k,asterisk:!!w,pattern:x?c(x):w?".*":"[^"+l(S)+"]+?"})}}return i<e.length&&(s+=e.substr(i)),s&&r.push(s),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",p(t)));return function(t,a){for(var o="",s=t||{},l=(a||{}).pretty?i:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var p,d=s[u.name];if(null==d){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(d)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<d.length;f++){if(p=l(d[f]),!n[c].test(p))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===f?u.prefix:u.delimiter)+p}}else{if(p=u.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(d),!n[c].test(p))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+p+'"');o+=u.prefix+p}}else o+=u}return o}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,o=!1!==n.end,i="",s=0;s<e.length;s++){var c=e[s];if("string"==typeof c)i+=l(c);else{var d=l(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+d+f+")*"),i+=f=c.optional?c.partial?d+"("+f+")?":"(?:"+d+"("+f+"))?":d+"("+f+")"}}var h=l(n.delimiter||"/"),m=i.slice(-h.length)===h;return a||(i=(m?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":a&&m?"":"(?="+h+"|$)",u(new RegExp("^"+i,p(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(f(e[a],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",p(n)),t)}(e,t,n):function(e,t,n){return d(o(e,n),t,n)}(e,t,n)}},6173:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6781:e=>{"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function r(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var a=Object.keys(e),o=Object.keys(r);if(a.length!==o.length)return!1;for(var i=0;i<a.length;i++)if(!t.call(r,a[i])||!n(e[a[i]],r[a[i]]))return!1;return!0}e.exports={shouldComponentUpdate:function(e,t){return!r(this.props,e)||!r(this.state,t)}}},86:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;
|
|
26
21
|
/** @license React v16.13.1
|
|
27
22
|
* react-is.production.min.js
|
|
28
23
|
*
|
|
@@ -30,7 +25,7 @@ object-assign
|
|
|
30
25
|
*
|
|
31
26
|
* This source code is licensed under the MIT license found in the
|
|
32
27
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case
|
|
28
|
+
*/function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case o:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case v:case m:case l:return e;default:return t}}case a:return t}}}function _(e){return k(e)===p}},663:(e,t,n)=>{"use strict";n(86)},5251:(e,t,n)=>{"use strict";
|
|
34
29
|
/** @license React v17.0.2
|
|
35
30
|
* react-jsx-runtime.production.min.js
|
|
36
31
|
*
|
|
@@ -38,4 +33,9 @@ object-assign
|
|
|
38
33
|
*
|
|
39
34
|
* This source code is licensed under the MIT license found in the
|
|
40
35
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/n(7418);var r=n(9196),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;a=i("react.element"),t.Fragment=i("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},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)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:i,_owner:o.current}}t.jsx=c,t.jsxs=c},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},7478:(e,t,n)=>{"use strict";var r=n(210),a=n(1924),i=n(631),o=r("%TypeError%"),s=r("%WeakMap%",!0),l=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),p=a("WeakMap.prototype.has",!0),d=a("Map.prototype.get",!0),f=a("Map.prototype.set",!0),h=a("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new o("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return d(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(l){if(t)return h(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,a){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,a)):l?(t||(t=new l),f(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},7501:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),i=n(5736),o=n(1984),s=n(444);const l=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));var c=n(4942),u=n(9062),p=n(5861),d=n(3324),f=n(6989),h=n.n(f),m=n(2175),v=n(5609),g=n(2629);const y=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));var b=n(8341),w=n(4239),k=n(4688),_=n(6483),E=n(8438),S=n(2009),x=n(9133),C=n(989),M=n(4184),T=n.n(M),__=i.__;const P=function(e){var t,n,r=e.attributes,s=e.clientId,f=e.setAttributes,M=(0,a.useState)(null),P=(0,d.Z)(M,2),A=P[0],O=P[1],I=(0,a.useState)(null),N=(0,d.Z)(I,2),D=N[0],z=N[1],L=(0,a.useState)(!1),R=(0,d.Z)(L,2),j=R[0],B=R[1],F=(0,a.useState)(0),$=(0,d.Z)(F,2),H=$[0],q=$[1],Z=Boolean(null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.can_use_cap),V=null===(n=window.newspack_blocks_data)||void 0===n?void 0:n.editable_roles,U=[],G=r.authorRoles,W=r.authorType,Y=r.columns,X=r.exclude,K=r.excludeEmpty,Q=r.layout,J=r.showAvatar,ee=r.showSeparators,te=r.separatorSections,ne=r.textSize,re=r.avatarAlignment,ae=r.avatarBorderRadius,ie=r.avatarSize,oe=r.avatarHideDefault,se="columns"===Q;(0,a.useEffect)((function(){le()}),[G,W,oe,X,K]);var le=function(){var e=(0,p.Z)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(null),B(!0),e.prev=2,t={author_type:W,author_roles:G,exclude:X.map((function(e){return{value:e.value,isGuest:e.isGuest}}))},K&&(t.exclude_empty=1),oe&&(t.avatar_hide_default=1),e.next=8,h()({path:(0,_.addQueryArgs)("/newspack-blocks/v1/author-list",t)});case 8:if(n=e.sent){e.next=11;break}throw __("Error fetching authors.","newspack-blocks");case 11:O(n),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),z(e.t0.message||e.t0||__("Error fetching authors.","newspack-blocks"));case 17:B(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),ce={};return Array.isArray(A)&&te&&A.forEach((function(e){var t=e.last_name.charAt(0).toUpperCase();ce.hasOwnProperty(t)||(ce[t]=[]),ce[t].push(e)})),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.InspectorControls,null,(0,a.createElement)(v.PanelBody,{title:__("Author List Settings","newspack-blocks")},Z&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.RadioControl,{label:__("Author Type","newspack-blocks"),help:(0,i.sprintf)(__("%s will be displayed.","newspack-blocks"),"all"===W?__("Both guest authors and WP users","newspack-blocks"):(0,i.sprintf)(__("%s only","newspack-blocks"),__("guest-authors"===W?"Guest authors":"WP users","newspack-blocks"))),selected:W||"all",options:[{label:__("All authors","newspack-blocks"),value:"all"},{label:__("Guest authors","newspack-blocks"),value:"guest-authors"},{label:__("WP users","newspack-blocks"),value:"users"}],onChange:function(e){return f({authorType:e})}})),se&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.RangeControl,{label:__("Columns","newspack-blocks"),value:Y,onChange:function(e){return f({columns:e})},min:2,max:6,required:!0})),"guest-authors"!==W&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.BaseControl,{id:"newspack-blocks__author-list-roles",label:__("WP User Roles","newspack-blocks")},V.map((function(e,t){return(0,a.createElement)(v.CheckboxControl,{checked:-1<G.indexOf(e),key:t,label:e,value:e,onChange:function(t){var n=t?[].concat((0,u.Z)(G),[e]):G.filter((function(t){return t!==e}));f({authorRoles:n})}})})))),(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Display alphabetical separators","newspack-blocks"),help:__("Chunk authors alphabetically.","newspack-blocks"),checked:ee,onChange:function(){return f({showSeparators:!ee})}})),se&&ee&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Group authors by alphabet","newspack-blocks"),help:__("Display each alphabetical chunk as a discrete section.","newspack-blocks"),checked:te,onChange:function(){return f({separatorSections:!te})}}))),(0,a.createElement)(v.PanelBody,{title:__("Author List Exclusions","newspack-block")},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Exclude authors with 0 posts","newspack-blocks"),help:(0,i.sprintf)(__("Authors with no published posts will be %s.","newspack-blocks"),__(K?"hidden":"displayed","newspack-blocks")),checked:K,onChange:function(){return f({excludeEmpty:!K})}})),(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(C.ah,{label:__("Search by author name","newspack-blocks"),help:__("Authors selected here will not be displayed.","newspack-blocks"),fetchSuggestions:(0,p.Z)(regeneratorRuntime.mark((function e(){var t,n,r,a,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:null,n=o.length>1&&void 0!==o[1]?o[1]:0,e.next=4,h()({parse:!1,path:(0,_.addQueryArgs)("/newspack-blocks/v1/authors",{search:t,offset:n,fields:"id,name"})});case 4:return r=e.sent,a=parseInt(r.headers.get("x-wp-total")||0),e.next=8,r.json();case 8:return i=e.sent,H||t||q(a),e.abrupt("return",i.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no name)","newspack-blocks"),isGuest:e.is_guest}})));case 11:case"end":return e.stop()}}),e)}))),maxItemsToSuggest:H,multiSelect:!0,onChange:function(e){return f({exclude:e})},postTypeLabel:__("author","newspack-blocks"),postTypeLabelPlural:__("authors","newspack-blocks"),selectedItems:X}))),(0,a.createElement)(v.PanelBody,{title:__("Author Profile Settings","newspack-blocks")},(0,a.createElement)(v.BaseControl,{label:__("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control"},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":__("Text Size","newspack-blocks")},E.dN.map((function(e){var t=ne===e.value;return(0,a.createElement)(v.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return f({textSize:e.value})}},e.shortName)}))))),(0,a.createElement)(x.m,{attributes:r,setAttributes:f})),(0,a.createElement)(v.PanelBody,{title:__("Avatar Settings","newspack-blocks")},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Display avatar","newspack-blocks"),checked:J,onChange:function(){return f({showAvatar:!J})}})),J&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Hide default avatar","newspack-blocks"),checked:oe,onChange:function(){return f({avatarHideDefault:!oe})}})),J&&(0,a.createElement)(v.BaseControl,{label:__("Avatar Size","newspack-blocks"),id:"newspack-blocks__avatar-size-control"},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":__("Avatar Size","newspack-blocks")},E.E4.map((function(e){var t=ie===e.value;return(0,a.createElement)(v.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return f({avatarSize:e.value})}},e.shortName)}))))),J&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.__experimentalUnitControl,{label:__("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:E.Dl,value:ae,onChange:function(e){return f({avatarBorderRadius:0>parseFloat(e)?"0":e})}})))),A&&!j&&(0,a.createElement)(m.BlockControls,null,(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(o.Z,{icon:l}),title:__("List","newspack-blocks"),isActive:"list"===Q,onClick:function(){f({layout:"list"})}},{icon:(0,a.createElement)(o.Z,{icon:y}),title:__("Columns","newspack-blocks"),isActive:se,onClick:function(){f({layout:"columns"})}}]}),J&&"is-style-center"!==r.className&&(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(o.Z,{icon:b.Z}),title:__("Show avatar on left","newspack-blocks"),isActive:"left"===re,onClick:function(){return f({avatarAlignment:"left"})}},{icon:(0,a.createElement)(o.Z,{icon:w.Z}),title:__("Show avatar on right","newspack-blocks"),isActive:"right"===re,onClick:function(){return f({avatarAlignment:"right"})}}]}),(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(o.Z,{icon:k.Z}),title:__("Edit selection","newspack-blocks"),onClick:function(){f({authorId:0})}}]})),(0,a.createElement)("div",{className:T()(r.className,"wp-block-newspack-blocks-author-list")},!j&&!D&&A&&Array.isArray(A)&&(0,a.createElement)(a.Fragment,null,se&&ee&&te?Object.keys(ce).map((function(e,t){return(0,a.createElement)(a.Fragment,{key:t},(0,a.createElement)("h2",{className:"newspack-blocks__author-list-separator",id:"newspack-blocks__author-list-separator__".concat(s,"__").concat(e)},e),(0,a.createElement)("ul",{className:T()("newspack-blocks__author-list-container",(0,c.Z)({"is-columns":se},"columns-".concat(Y),se))},ce[e].map((function(e,t){return(0,a.createElement)("li",{key:t,className:"newspack-blocks__author-list-item"},(0,a.createElement)(S.T,{author:e,attributes:r}))}))))})):(0,a.createElement)("ul",{className:T()("newspack-blocks__author-list-container",(0,c.Z)({"is-columns":se},"columns-".concat(Y),se))},A.map((function(e,t){var n=e.last_name.charAt(0).toUpperCase(),i=0>U.indexOf(n);return i&&U.push(n),(0,a.createElement)(a.Fragment,{key:t},ee&&i&&(0,a.createElement)("li",{className:"newspack-blocks__author-list-item"},(0,a.createElement)("h2",{className:"newspack-blocks__author-list-separator",id:"newspack-blocks__author-list-separator__".concat(s,"__").concat(n)},n)),(0,a.createElement)("li",{className:"newspack-blocks__author-list-item"},(0,a.createElement)(S.T,{author:e,attributes:r})))})))),(!A||j)&&(0,a.createElement)(v.Placeholder,{icon:(0,a.createElement)(o.Z,{icon:l}),label:__("Author List","newspack-blocks")},D&&(0,a.createElement)(v.Notice,{status:"error",isDismissible:!1},D),j&&(0,a.createElement)("div",{className:"is-loading"},__("Fetching authors…","newspack-blocks"),(0,a.createElement)(v.Spinner,null)))))},A=JSON.parse('{"u2":"author-list","W3":"newspack","Y4":{"className":{"type":"string","default":""},"columns":{"type":"number","default":2},"exclude":{"type":"array","default":[]},"excludeEmpty":{"type":"boolean","default":false},"layout":{"type":"string","default":"list"},"textSize":{"type":"string","default":"medium"},"authorRoles":{"type":"array","default":["Administrator","Editor","Author","Contributor"]},"authorType":{"type":"string","default":"all"},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"showSeparators":{"type":"boolean","default":false},"separatorSections":{"type":"boolean","default":false},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var O,I=i.__,_x=i._x,N=A.u2,D=A.Y4,z=A.W3,L=I("Author List","newspack-blocks");((null===(O=window.newspack_blocks_data)||void 0===O?void 0:O.author_custom_fields)||[]).forEach((function(e){D["show".concat(e.name)]={type:"boolean",default:!0}}));var R={title:L,icon:{src:(0,a.createElement)(o.Z,{icon:l}),foreground:"#36f"},keywords:[I("author","newspack-blocks"),I("profile","newspack-blocks")],description:I("Display a list of author profile cards.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:_x("Centered","block style","newspack-blocks")}],attributes:D,category:z,supports:{html:!1,default:""},edit:P,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(N),R)},8438:(e,t,n)=>{"use strict";n.d(t,{Dl:()=>k,dN:()=>_,E4:()=>E,ZP:()=>S});var r=n(5861),a=n(3324),i=n(9307),o=n(6989),s=n.n(o),l=n(2175),c=n(5609),u=n(2629),p=n(1984),d=n(8341),f=n(4239),h=n(4688),m=n(9862),v=n(5736),g=n(6483),y=n(2009),b=n(9133),w=n(989),__=v.__,k=[{value:"%",label:"%"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"}],_=[{value:"small",label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:"medium",label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:"large",label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:"extra-large",label:__("Extra Large","newspack-blocks"),shortName:__("XL","newspack-blocks")}],E=[{value:72,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:128,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:192,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:256,label:__("Extra-large","newspack-blocks"),shortName:__("XL","newspack-blocks")}];const S=function(e){var t=e.attributes,n=e.setAttributes,o=(0,i.useState)(null),S=(0,a.Z)(o,2),x=S[0],C=S[1],M=(0,i.useState)(null),T=(0,a.Z)(M,2),P=T[0],A=T[1],O=(0,i.useState)(null),I=(0,a.Z)(O,2),N=I[0],D=I[1],z=(0,i.useState)(!1),L=(0,a.Z)(z,2),R=L[0],j=L[1],B=(0,i.useState)(0),F=(0,a.Z)(B,2),$=F[0],H=F[1],q=t.authorId,Z=t.isGuestAuthor,V=t.showSocial,U=t.showEmail,G=t.textSize,W=t.showAvatar,Y=t.avatarAlignment,X=t.avatarBorderRadius,K=t.avatarSize,Q=t.avatarHideDefault;(0,i.useEffect)((function(){0!==q&&J()}),[q,Q,Z]);var J=function(){var e=(0,r.Z)(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(null),j(!0),e.prev=2,t={author_id:q,is_guest_author:Z?1:0,fields:"id,name,bio,email,social,avatar,url"},Q&&(t.avatar_hide_default=1),e.next=7,s()({path:(0,g.addQueryArgs)("/newspack-blocks/v1/authors",t)});case 7:if(n=e.sent,r=n.pop()){e.next=11;break}throw(0,v.sprintf)(__("No authors or guest authors found for ID %s.","newspack-blocks"),q);case 11:C(r),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),D(e.t0.message||e.t0||(0,v.sprintf)(__("No authors or guest authors found for ID %s.","newspack-blocks"),q));case 17:j(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),ee=V&&x&&x.social||{};return U&&x&&x.email?ee.email=x.email:delete ee.email,(0,i.createElement)(i.Fragment,null,(0,i.createElement)(l.InspectorControls,null,(0,i.createElement)(c.PanelBody,{title:__("Author Profile Settings","newspack-blocks")},(0,i.createElement)(c.BaseControl,{label:__("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control"},(0,i.createElement)(c.PanelRow,null,(0,i.createElement)(c.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":__("Text Size","newspack-blocks")},_.map((function(e){var t=G===e.value;return(0,i.createElement)(c.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return n({textSize:e.value})}},e.shortName)}))))),(0,i.createElement)(b.m,{attributes:t,setAttributes:n})),(0,i.createElement)(c.PanelBody,{title:__("Avatar Settings","newspack-blocks")},(0,i.createElement)(c.PanelRow,null,(0,i.createElement)(c.ToggleControl,{label:__("Display avatar","newspack-blocks"),checked:W,onChange:function(){return n({showAvatar:!W})}})),W&&(0,i.createElement)(c.PanelRow,null,(0,i.createElement)(c.ToggleControl,{label:__("Hide default avatar","newspack-blocks"),checked:Q,onChange:function(){return n({avatarHideDefault:!Q})}})),W&&(0,i.createElement)(c.BaseControl,{label:__("Avatar size","newspack-blocks"),id:"newspack-blocks__avatar-size-control"},(0,i.createElement)(c.PanelRow,null,(0,i.createElement)(c.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":__("Avatar size","newspack-blocks")},E.map((function(e){var t=K===e.value;return(0,i.createElement)(c.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return n({avatarSize:e.value})}},e.shortName)}))))),W&&(0,i.createElement)(c.PanelRow,null,(0,i.createElement)(c.__experimentalUnitControl,{label:__("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:k,value:X,onChange:function(e){return n({avatarBorderRadius:0>parseFloat(e)?"0":e})}})))),x&&(0,i.createElement)(l.BlockControls,null,W&&"is-style-center"!==t.className&&(0,i.createElement)(c.Toolbar,{controls:[{icon:(0,i.createElement)(p.Z,{icon:d.Z}),title:__("Show avatar on left","newspack-blocks"),isActive:"left"===Y,onClick:function(){return n({avatarAlignment:"left"})}},{icon:(0,i.createElement)(p.Z,{icon:f.Z}),title:__("Show avatar on right","newspack-blocks"),isActive:"right"===Y,onClick:function(){return n({avatarAlignment:"right"})}}]}),(0,i.createElement)(c.Toolbar,{controls:[{icon:(0,i.createElement)(p.Z,{icon:h.Z}),title:__("Edit selection","newspack-blocks"),onClick:function(){n({authorId:0}),C(null)}}]})),x?(0,i.createElement)(y.T,{author:x,attributes:t}):(0,i.createElement)(c.Placeholder,{className:"newspack-blocks-author-profile",icon:(0,i.createElement)(p.Z,{icon:m.Z}),label:__("Author Profile","newspack-blocks")},N&&(0,i.createElement)(c.Notice,{status:"error",isDismissible:!1},N),R&&(0,i.createElement)("div",{className:"is-loading"},__("Fetching author info…","newspack-blocks"),(0,i.createElement)(c.Spinner,null)),!R&&(0,i.createElement)(w.ah,{label:__("Search for an author to display","newspack-blocks"),help:__("Begin typing name, click autocomplete result to select.","newspack-blocks"),fetchSuggestions:(0,r.Z)(regeneratorRuntime.mark((function e(){var t,n,r,a,i,o,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>0&&void 0!==l[0]?l[0]:null,n=l.length>1&&void 0!==l[1]?l[1]:0,A(null),!q||N){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,s()({parse:!1,path:(0,g.addQueryArgs)("/newspack-blocks/v1/authors",{search:t,offset:n,fields:"id,name"})});case 7:return r=e.sent,a=parseInt(r.headers.get("x-wp-total")||0),e.next=11,r.json();case 11:return i=e.sent,$||t||H(a),o=i.map((function(e){return{value:e.id,label:(0,u.decodeEntities)(e.name)||__("(no name)","newspack-blocks"),isGuestAuthor:e.is_guest}})),A(o),e.abrupt("return",o);case 16:case"end":return e.stop()}}),e)}))),maxItemsToSuggest:$,onChange:function(e){var t=!1,r=e[0];P&&P.forEach((function(e){parseInt(null==r?void 0:r.value)===parseInt(null==e?void 0:e.value)&&null!=e&&e.isGuestAuthor&&(t=!0)})),n({authorId:parseInt((null==r?void 0:r.value)||0),isGuestAuthor:t})},postTypeLabel:__("author","newspack-blocks"),postTypeLabelPlural:__("authors","newspack-blocks"),selectedItems:[]})))}},7362:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),i=n(5736),o=n(1984),s=n(9862),l=n(8438);const c=JSON.parse('{"u2":"author-profile","W3":"newspack","Y4":{"className":{"type":"string","default":""},"authorId":{"type":"number","default":0},"isGuestAuthor":{"type":"boolean","default":true},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"textSize":{"type":"string","default":"medium"},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var u,__=i.__,_x=i._x,p=c.u2,d=c.Y4,f=c.W3,h=__("Author Profile","newspack-blocks");((null===(u=window.newspack_blocks_data)||void 0===u?void 0:u.author_custom_fields)||[]).forEach((function(e){d["show".concat(e.name)]={type:"boolean",default:!0}}));var m={title:h,icon:{src:(0,a.createElement)(o.Z,{icon:s.Z}),foreground:"#36f"},keywords:[__("author","newspack-blocks"),__("profile","newspack-blocks")],description:__("Display an author profile card.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:_x("Centered","block style","newspack-blocks")}],attributes:d,category:f,supports:{html:!1,default:""},edit:l.ZP,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(p),m)},2009:(e,t,n)=>{"use strict";n.d(t,{T:()=>l});var r=n(9307),a=n(5736),i=n(4184),o=n.n(i),__=a.__,s=function(e){var t=e.author,n=e.children;return e.showArchiveLink&&t&&t.url?(0,r.createElement)("a",{href:"#",className:"no-op"},n):(0,r.createElement)(r.Fragment,null,n)},l=function(e){var t=e.author,n=e.attributes,a=n.showBio,i=n.showSocial,l=n.showEmail,c=n.showArchiveLink,u=n.showAvatar,p=n.textSize,d=n.avatarAlignment,f=n.avatarBorderRadius,h=n.avatarSize,m=i&&t&&t.social||{};l&&t&&t.email?m.email=t.email:delete m.email,n.shownewspack_phone_number&&t&&t.newspack_phone_number?m.newspack_phone_number=t.newspack_phone_number:delete m.newspack_phone_number;var v=[n.shownewspack_role&&t.newspack_role,n.shownewspack_employer&&t.newspack_employer].filter(Boolean).join(", "),g=Object.keys(m);return(0,r.createElement)("div",{className:o()("wp-block-newspack-blocks-author-profile","avatar-"+d,"text-size-"+p,{"is-style-center":"is-style-center"===n.className})},u&&t.avatar&&(0,r.createElement)("div",{className:"wp-block-newspack-blocks-author-profile__avatar"},(0,r.createElement)("figure",{style:{borderRadius:f,height:"".concat(h,"px"),width:"".concat(h,"px")},dangerouslySetInnerHTML:{__html:t.avatar}})),(0,r.createElement)("div",{className:"wp-block-newspack-blocks-author-profile__bio"},(0,r.createElement)("h3",null,(0,r.createElement)(s,{author:t,showArchiveLink:c},t.name)),n.shownewspack_job_title&&t.newspack_job_title&&(0,r.createElement)("p",{className:"wp-block-newspack-blocks-author-profile__job-title"},t.newspack_job_title),v&&(0,r.createElement)("p",{className:"wp-block-newspack-blocks-author-profile__employment"},v),a&&t.bio&&(0,r.createElement)("p",null,t.bio," ",c&&(0,r.createElement)("a",{href:"#",className:"no-op"},__("More by","newspack-blocks")+" "+t.name)),0!==g.length&&(0,r.createElement)("ul",{className:"wp-block-newspack-blocks-author-profile__social-links"},g.map((function(e){return(0,r.createElement)("li",{key:e},(0,r.createElement)("a",{href:"#",className:"no-op"},m[e].svg&&(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:m[e].svg}}),(0,r.createElement)("span",{className:m[e].svg?"hidden":"visible"},e)))})))))}},5671:(e,t,n)=>{"use strict";var r=n(4981),a=n(632);(0,r.registerBlockType)("newspack-blocks/".concat(a.u2),a.Xd)},632:(e,t,n)=>{"use strict";n.d(t,{u2:()=>Ve,Xd:()=>Ue});var r=n(9307),a=n(5609),i=n(5736),o=n(5048),s=n(3144),l=n(136),c=n(8347),u=n(2819),p=n(4184),d=n.n(p),f=n(2175),h=n(9771),m=n(9818),v=n(4333),g=n(2629),y=n(6967),b=n(96);const w=window.wp.a11y,k=window.wp.escapeHtml;function _(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function E(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:_(t[n])&&_(e[n])&&Object.keys(t[n]).length>0&&E(e[n],t[n])}))}const S={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function x(){const e="undefined"!=typeof document?document:{};return E(e,S),e}const C={document:S,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function M(){const e="undefined"!=typeof window?window:{};return E(e,C),e}function T(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function P(){return Date.now()}function A(e,t){void 0===t&&(t="x");const n=M();let r,a,i;const o=function(e){const t=M();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(a=o.transform||o.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),i=new n.WebKitCSSMatrix("none"===a?"":a)):(i=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),"x"===t&&(a=n.WebKitCSSMatrix?i.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(a=n.WebKitCSSMatrix?i.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),a||0}function O(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function I(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function N(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!I(r)){const n=Object.keys(Object(r)).filter((e=>t.indexOf(e)<0));for(let t=0,a=n.length;t<a;t+=1){const a=n[t],i=Object.getOwnPropertyDescriptor(r,a);void 0!==i&&i.enumerable&&(O(e[a])&&O(r[a])?r[a].__swiper__?e[a]=r[a]:N(e[a],r[a]):!O(e[a])&&O(r[a])?(e[a]={},r[a].__swiper__?e[a]=r[a]:N(e[a],r[a])):e[a]=r[a])}}}return e}function D(e,t,n){e.style.setProperty(t,n)}function z(e){let{swiper:t,targetPosition:n,side:r}=e;const a=M(),i=-t.translate;let o,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const c=n>i?"next":"prev",u=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,p=()=>{o=(new Date).getTime(),null===s&&(s=o);const e=Math.max(Math.min((o-s)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let d=i+c*(n-i);if(u(d,n)&&(d=n),t.wrapperEl.scrollTo({[r]:d}),u(d,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:d})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(p)};p()}function L(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function R(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function j(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:[t]),n}function B(e){const t=M(),n=x(),r=e.getBoundingClientRect(),a=n.body,i=e.clientTop||a.clientTop||0,o=e.clientLeft||a.clientLeft||0,s=e===t?t.scrollY:e.scrollTop,l=e===t?t.scrollX:e.scrollLeft;return{top:r.top+s-i,left:r.left+l-o}}function F(e,t){return M().getComputedStyle(e,null).getPropertyValue(t)}function $(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function H(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function q(e,t){t&&e.addEventListener("transitionend",(function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))}))}function Z(e,t,n){const r=M();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}let V,U,G;function W(){return V||(V=function(){const e=M(),t=x();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),V}function Y(e){return void 0===e&&(e={}),U||(U=function(e){let{userAgent:t}=void 0===e?{}:e;const n=W(),r=M(),a=r.navigator.platform,i=t||r.navigator.userAgent,o={ios:!1,android:!1},s=r.screen.width,l=r.screen.height,c=i.match(/(Android);?[\s\/]+([\d.]+)?/);let u=i.match(/(iPad).*OS\s([\d_]+)/);const p=i.match(/(iPod)(.*OS\s([\d_]+))?/),d=!u&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===a;let h="MacIntel"===a;return!u&&h&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(u=i.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!f&&(o.os="android",o.android=!0),(u||d||p)&&(o.os="ios",o.ios=!0),o}(e)),U}function X(){return G||(G=function(){const e=M();let t=!1;function n(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(n()){const n=String(e.navigator.userAgent);if(n.includes("Version/")){const[e,r]=n.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));t=e<16||16===e&&r<2}}return{isSafari:t||n(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),G}var K={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const a=n?"unshift":"push";return e.split(" ").forEach((e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][a](t)})),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;function a(){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t.apply(r,i)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((r,a)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,r;for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];"string"==typeof i[0]||Array.isArray(i[0])?(t=i[0],n=i.slice(1,i.length),r=e):(t=i[0].events,n=i[0].data,r=i[0].context||e),n.unshift(r);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(r,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(r,n)}))})),e}};const Q=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},J=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},ee=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=a,i=[n-t];return i.push(...Array.from({length:t}).map(((e,t)=>n+r+t))),void e.slides.forEach(((t,n)=>{i.includes(t.column)&&J(e,n)}))}const i=a+r-1;if(e.params.rewind||e.params.loop)for(let o=a-t;o<=i+t;o+=1){const t=(o%n+n)%n;(t<a||t>i)&&J(e,t)}else for(let o=Math.max(a-t,0);o<=Math.min(i+t,n-1);o+=1)o!==a&&(o>i||o<a)&&J(e,o)};var te={updateSize:function(){const e=this;let t,n;const r=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(F(r,"padding-left")||0,10)-parseInt(F(r,"padding-right")||0,10),n=n-parseInt(F(r,"padding-top")||0,10)-parseInt(F(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function n(e,n){return parseFloat(e.getPropertyValue(t(n))||0)}const r=e.params,{wrapperEl:a,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:l}=e,c=e.virtual&&r.virtual.enabled,u=c?e.virtual.slides.length:e.slides.length,p=R(i,`.${e.params.slideClass}, swiper-slide`),d=c?e.virtual.slides.length:p.length;let f=[];const h=[],m=[];let v=r.slidesOffsetBefore;"function"==typeof v&&(v=r.slidesOffsetBefore.call(e));let g=r.slidesOffsetAfter;"function"==typeof g&&(g=r.slidesOffsetAfter.call(e));const y=e.snapGrid.length,b=e.slidesGrid.length;let w=r.spaceBetween,k=-v,_=0,E=0;if(void 0===o)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*o:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,p.forEach((e=>{s?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),r.centeredSlides&&r.cssMode&&(D(a,"--swiper-centered-offset-before",""),D(a,"--swiper-centered-offset-after",""));const S=r.grid&&r.grid.rows>1&&e.grid;let x;S&&e.grid.initSlides(d);const C="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter((e=>void 0!==r.breakpoints[e].slidesPerView)).length>0;for(let M=0;M<d;M+=1){let a;if(x=0,p[M]&&(a=p[M]),S&&e.grid.updateSlide(M,a,d,t),!p[M]||"none"!==F(a,"display")){if("auto"===r.slidesPerView){C&&(p[M].style[t("width")]="");const i=getComputedStyle(a),o=a.style.transform,s=a.style.webkitTransform;if(o&&(a.style.transform="none"),s&&(a.style.webkitTransform="none"),r.roundLengths)x=e.isHorizontal()?Z(a,"width",!0):Z(a,"height",!0);else{const e=n(i,"width"),t=n(i,"padding-left"),r=n(i,"padding-right"),o=n(i,"margin-left"),s=n(i,"margin-right"),l=i.getPropertyValue("box-sizing");if(l&&"border-box"===l)x=e+o+s;else{const{clientWidth:n,offsetWidth:i}=a;x=e+t+r+o+s+(i-n)}}o&&(a.style.transform=o),s&&(a.style.webkitTransform=s),r.roundLengths&&(x=Math.floor(x))}else x=(o-(r.slidesPerView-1)*w)/r.slidesPerView,r.roundLengths&&(x=Math.floor(x)),p[M]&&(p[M].style[t("width")]=`${x}px`);p[M]&&(p[M].swiperSlideSize=x),m.push(x),r.centeredSlides?(k=k+x/2+_/2+w,0===_&&0!==M&&(k=k-o/2-w),0===M&&(k=k-o/2-w),Math.abs(k)<.001&&(k=0),r.roundLengths&&(k=Math.floor(k)),E%r.slidesPerGroup==0&&f.push(k),h.push(k)):(r.roundLengths&&(k=Math.floor(k)),(E-Math.min(e.params.slidesPerGroupSkip,E))%e.params.slidesPerGroup==0&&f.push(k),h.push(k),k=k+x+w),e.virtualSize+=x+w,_=x,E+=1}}if(e.virtualSize=Math.max(e.virtualSize,o)+g,s&&l&&("slide"===r.effect||"coverflow"===r.effect)&&(a.style.width=`${e.virtualSize+w}px`),r.setWrapperSize&&(a.style[t("width")]=`${e.virtualSize+w}px`),S&&e.grid.updateWrapperSize(x,f,t),!r.centeredSlides){const t=[];for(let n=0;n<f.length;n+=1){let a=f[n];r.roundLengths&&(a=Math.floor(a)),f[n]<=e.virtualSize-o&&t.push(a)}f=t,Math.floor(e.virtualSize-o)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-o)}if(c&&r.loop){const t=m[0]+w;if(r.slidesPerGroup>1){const n=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),a=t*r.slidesPerGroup;for(let e=0;e<n;e+=1)f.push(f[f.length-1]+a)}for(let n=0;n<e.virtual.slidesBefore+e.virtual.slidesAfter;n+=1)1===r.slidesPerGroup&&f.push(f[f.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===f.length&&(f=[0]),0!==w){const n=e.isHorizontal()&&s?"marginLeft":t("marginRight");p.filter(((e,t)=>!(r.cssMode&&!r.loop)||t!==p.length-1)).forEach((e=>{e.style[n]=`${w}px`}))}if(r.centeredSlides&&r.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(w||0)})),e-=w;const t=e-o;f=f.map((e=>e<=0?-v:e>t?t+g:e))}if(r.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(w||0)})),e-=w,e<o){const t=(o-e)/2;f.forEach(((e,n)=>{f[n]=e-t})),h.forEach(((e,n)=>{h[n]=e+t}))}}if(Object.assign(e,{slides:p,snapGrid:f,slidesGrid:h,slidesSizesGrid:m}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){D(a,"--swiper-centered-offset-before",-f[0]+"px"),D(a,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(d!==u&&e.emit("slidesLengthChange"),f.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),!(c||r.cssMode||"slide"!==r.effect&&"fade"!==r.effect)){const t=`${r.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);d<=r.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a,i=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>r?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!r)break;n.push(o(e))}else n.push(o(t.activeIndex));for(a=0;a<n.length;a+=1)if(void 0!==n[a]){const e=n[a].offsetHeight;i=e>i?e:i}(i||0===i)&&(t.wrapperEl.style.height=`${i}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:i}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let o=-e;a&&(o=e),r.forEach((e=>{e.classList.remove(n.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let l=0;l<r.length;l+=1){const e=r[l];let c=e.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const u=(o+(n.centeredSlides?t.minTranslate():0)-c)/(e.swiperSlideSize+s),p=(o-i[0]+(n.centeredSlides?t.minTranslate():0)-c)/(e.swiperSlideSize+s),d=-(o-c),f=d+t.slidesSizesGrid[l];(d>=0&&d<t.size-1||f>1&&f<=t.size||d<=0&&f>=t.size)&&(t.visibleSlides.push(e),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),e.progress=a?-u:u,e.originalProgress=a?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:o,progressLoop:s}=t;const l=i,c=o;if(0===r)a=0,i=!0,o=!0;else{a=(e-t.minTranslate())/r;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;i=n||a<=0,o=s||a>=1,n&&(a=0),s&&(a=1)}if(n.loop){const n=t.getSlideIndexByData(0),r=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[n],i=t.slidesGrid[r],o=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=a?(l-a)/o:(l+o-i)/o,s>1&&(s-=1)}Object.assign(t,{progress:a,progressLoop:s,isBeginning:i,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!l&&t.emit("reachBeginning toEdge"),o&&!c&&t.emit("reachEnd toEdge"),(l&&!i||c&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,i=e.virtual&&n.virtual.enabled,o=e=>R(r,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let s;if(t.forEach((e=>{e.classList.remove(n.slideActiveClass,n.slideNextClass,n.slidePrevClass)})),i)if(n.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),s=o(`[data-swiper-slide-index="${t}"]`)}else s=o(`[data-swiper-slide-index="${a}"]`);else s=t[a];if(s){s.classList.add(n.slideActiveClass);let e=function(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(s,`.${n.slideClass}, swiper-slide`)[0];n.loop&&!e&&(e=t[0]),e&&e.classList.add(n.slideNextClass);let r=function(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(s,`.${n.slideClass}, swiper-slide`)[0];n.loop&&0===!r&&(r=t[t.length-1]),r&&r.classList.add(n.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:o,snapIndex:s}=t;let l,c=e;const u=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let i=0;i<t.length;i+=1)void 0!==t[i+1]?r>=t[i]&&r<t[i+1]-(t[i+1]-t[i])/2?a=i:r>=t[i]&&r<t[i+1]&&(a=i+1):r>=t[i]&&(a=i);return n.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const e=Math.min(a.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),c===i)return l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")),void(t.params.loop&&t.virtual&&t.params.virtual.enabled&&(t.realIndex=u(c)));let p;p=t.virtual&&a.virtual.enabled&&a.loop?u(c):t.slides[c]?parseInt(t.slides[c].getAttribute("data-swiper-slide-index")||c,10):c,Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:o,realIndex:p,previousIndex:i,activeIndex:c}),t.initialized&&ee(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${r.slideClass}, swiper-slide`)&&(a=e)}));let i,o=!1;if(a)for(let s=0;s<n.slides.length;s+=1)if(n.slides[s]===a){o=!0,i=s;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=i,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var ne={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:r,wrapperEl:a}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let i=A(a,e);return i+=this.cssOverflowAdjustment(),n&&(i=-i),i||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:o}=n;let s,l=0,c=0;n.isHorizontal()?l=r?-e:e:c=e,a.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:a.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const u=n.maxTranslate()-n.minTranslate();s=0===u?0:(e-n.minTranslate())/u,s!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,r,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);const i=this,{params:o,wrapperEl:s}=i;if(i.animating&&o.preventInteractionOnTransition)return!1;const l=i.minTranslate(),c=i.maxTranslate();let u;if(u=r&&e>l?l:r&&e<c?c:e,i.updateProgress(u),o.cssMode){const e=i.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!i.support.smoothScroll)return z({swiper:i,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(i.setTransition(0),i.setTranslate(u),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(u),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}};function re(e){let{swiper:t,runCallbacks:n,direction:r,step:a}=e;const{activeIndex:i,previousIndex:o}=t;let s=r;if(s||(s=i>o?"next":i<o?"prev":"reset"),t.emit(`transition${a}`),n&&i!==o){if("reset"===s)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===s?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var ae={slideTo:function(e,t,n,r,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;let o=e;o<0&&(o=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:p,rtlTranslate:d,wrapperEl:f,enabled:h}=i;if(i.animating&&s.preventInteractionOnTransition||!h&&!r&&!a)return!1;const m=Math.min(i.params.slidesPerGroupSkip,o);let v=m+Math.floor((o-m)/i.params.slidesPerGroup);v>=l.length&&(v=l.length-1);const g=-l[v];if(s.normalizeSlideIndex)for(let b=0;b<c.length;b+=1){const e=-Math.floor(100*g),t=Math.floor(100*c[b]),n=Math.floor(100*c[b+1]);void 0!==c[b+1]?e>=t&&e<n-(n-t)/2?o=b:e>=t&&e<n&&(o=b+1):e>=t&&(o=b)}if(i.initialized&&o!==p){if(!i.allowSlideNext&&(d?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate()))return!1;if(!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(p||0)!==o)return!1}let y;if(o!==(u||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g),y=o>p?"next":o<p?"prev":"reset",d&&-g===i.translate||!d&&g===i.translate)return i.updateActiveIndex(o),s.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),"slide"!==s.effect&&i.setTranslate(g),"reset"!==y&&(i.transitionStart(n,y),i.transitionEnd(n,y)),!1;if(s.cssMode){const e=i.isHorizontal(),n=d?g:-g;if(0===t){const t=i.virtual&&i.params.virtual.enabled;t&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),t&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{f[e?"scrollLeft":"scrollTop"]=n}))):f[e?"scrollLeft":"scrollTop"]=n,t&&requestAnimationFrame((()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1}))}else{if(!i.support.smoothScroll)return z({swiper:i,targetPosition:n,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return i.setTransition(t),i.setTranslate(g),i.updateActiveIndex(o),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,y),0===t?i.transitionEnd(n,y):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,y))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const a=this;let i=e;return a.params.loop&&(a.virtual&&a.params.virtual.enabled?i+=a.virtual.slidesBefore:i=a.getSlideIndexByData(i)),a.slideTo(i,t,n,r)},slideNext:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{enabled:a,params:i,animating:o}=r;if(!a)return r;let s=i.slidesPerGroup;"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<i.slidesPerGroupSkip?1:s,c=r.virtual&&i.virtual.enabled;if(i.loop){if(o&&!c&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame((()=>{r.slideTo(r.activeIndex+l,e,t,n)})),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{params:a,snapGrid:i,slidesGrid:o,rtlTranslate:s,enabled:l,animating:c}=r;if(!l)return r;const u=r.virtual&&a.virtual.enabled;if(a.loop){if(c&&!u&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const d=p(s?r.translate:-r.translate),f=i.map((e=>p(e)));let h=i[f.indexOf(d)-1];if(void 0===h&&a.cssMode){let e;i.forEach(((t,n)=>{d>=t&&(e=n)})),void 0!==e&&(h=i[e>0?e-1:e])}let m=0;if(void 0!==h&&(m=o.indexOf(h),m<0&&(m=r.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(m=m-r.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),a.rewind&&r.isBeginning){const a=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(a,e,t,n)}return a.loop&&0===r.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{r.slideTo(m,e,t,n)})),!0):r.slideTo(m,e,t,n)},slideReset:function(e,t,n){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,n)},slideToClosest:function(e,t,n,r){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===r&&(r=.5);const a=this;let i=a.activeIndex;const o=Math.min(a.params.slidesPerGroupSkip,i),s=o+Math.floor((i-o)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){const e=a.snapGrid[s];l-e>(a.snapGrid[s+1]-e)*r&&(i+=a.params.slidesPerGroup)}else{const e=a.snapGrid[s-1];l-e<=(a.snapGrid[s]-e)*r&&(i-=a.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,a.slidesGrid.length-1),a.slideTo(i,e,t,n)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:n}=e,r="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,i=e.clickedIndex;const o=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?i<e.loopedSlides-r/2||i>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(R(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),T((()=>{e.slideTo(i)}))):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(R(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),T((()=>{e.slideTo(i)}))):e.slideTo(i)}else e.slideTo(i)}};var ie={loopCreate:function(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;R(r,`.${n.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:a,activeSlideIndex:i,byController:o,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:u,allowSlideNext:p,slidesEl:d,params:f}=l;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&f.virtual.enabled)return n&&(f.centeredSlides||0!==l.snapIndex?f.centeredSlides&&l.snapIndex<f.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=p,void l.emit("loopFix");const h="auto"===f.slidesPerView?l.slidesPerViewDynamic():Math.ceil(parseFloat(f.slidesPerView,10));let m=f.loopedSlides||h;m%f.slidesPerGroup!=0&&(m+=f.slidesPerGroup-m%f.slidesPerGroup),l.loopedSlides=m;const v=[],g=[];let y=l.activeIndex;void 0===i?i=l.getSlideIndex(l.slides.filter((e=>e.classList.contains(f.slideActiveClass)))[0]):y=i;const b="next"===r||!r,w="prev"===r||!r;let k=0,_=0;if(i<m){k=Math.max(m-i,f.slidesPerGroup);for(let e=0;e<m-i;e+=1){const t=e-Math.floor(e/c.length)*c.length;v.push(c.length-t-1)}}else if(i>l.slides.length-2*m){_=Math.max(i-(l.slides.length-2*m),f.slidesPerGroup);for(let e=0;e<_;e+=1){const t=e-Math.floor(e/c.length)*c.length;g.push(t)}}if(w&&v.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,d.prepend(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),b&&g.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,d.append(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===f.slidesPerView&&l.updateSlides(),f.watchSlidesProgress&&l.updateSlidesOffset(),n)if(v.length>0&&w)if(void 0===t){const e=l.slidesGrid[y],t=l.slidesGrid[y+k]-e;s?l.setTranslate(l.translate-t):(l.slideTo(y+k,0,!1,!0),a&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else a&&(l.slideToLoop(t,0,!1,!0),l.touchEventsData.currentTranslate=l.translate);else if(g.length>0&&b)if(void 0===t){const e=l.slidesGrid[y],t=l.slidesGrid[y-_]-e;s?l.setTranslate(l.translate-t):(l.slideTo(y-_,0,!1,!0),a&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else l.slideToLoop(t,0,!1,!0);if(l.allowSlidePrev=u,l.allowSlideNext=p,l.controller&&l.controller.control&&!o){const e={slideRealIndex:t,direction:r,setTranslate:a,activeSlideIndex:i,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&n})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===f.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;r[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),r.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function oe(e){const t=this,n=x(),r=M(),a=t.touchEventsData;a.evCache.push(e);const{params:i,touches:o,enabled:s}=t;if(!s)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;if(t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let l=e;l.originalEvent&&(l=l.originalEvent);let c=l.target;if("wrapper"===i.touchEventsTarget&&!t.wrapperEl.contains(c))return;if("which"in l&&3===l.which)return;if("button"in l&&l.button>0)return;if(a.isTouched&&a.isMoved)return;const u=!!i.noSwipingClass&&""!==i.noSwipingClass,p=e.composedPath?e.composedPath():e.path;u&&l.target&&l.target.shadowRoot&&p&&(c=p[0]);const d=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,f=!(!l.target||!l.target.shadowRoot);if(i.noSwiping&&(f?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===x()||n===M())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(e);return r||n.getRootNode?r||t(n.getRootNode().host):null}(t)}(d,c):c.closest(d)))return void(t.allowClick=!0);if(i.swipeHandler&&!c.closest(i.swipeHandler))return;o.currentX=l.pageX,o.currentY=l.pageY;const h=o.currentX,m=o.currentY,v=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,g=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(v&&(h<=g||h>=r.innerWidth-g)){if("prevent"!==v)return;e.preventDefault()}Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=m,a.touchStartTime=P(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let y=!0;c.matches(a.focusableElements)&&(y=!1,"SELECT"===c.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==c&&n.activeElement.blur();const b=y&&t.allowTouchMove&&i.touchStartPreventDefault;!i.touchStartForcePreventDefault&&!b||c.isContentEditable||l.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function se(e){const t=x(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:o,enabled:s}=n;if(!s)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),!r.isTouched)return void(r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l));const c=r.evCache.findIndex((e=>e.pointerId===l.pointerId));c>=0&&(r.evCache[c]=l);const u=r.evCache.length>1?r.evCache[0]:l,p=u.pageX,d=u.pageY;if(l.preventedByNestedSwiper)return i.startX=p,void(i.startY=d);if(!n.allowTouchMove)return l.target.matches(r.focusableElements)||(n.allowClick=!1),void(r.isTouched&&(Object.assign(i,{startX:p,startY:d,prevX:n.touches.currentX,prevY:n.touches.currentY,currentX:p,currentY:d}),r.touchStartTime=P()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(d<i.startY&&n.translate<=n.maxTranslate()||d>i.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(p<i.startX&&n.translate<=n.maxTranslate()||p>i.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);if(r.allowTouchCallbacks&&n.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;i.currentX=p,i.currentY=d;const f=i.currentX-i.startX,h=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(f**2+h**2)<n.params.threshold)return;if(void 0===r.isScrolling){let e;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:f*f+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(f))/Math.PI,r.isScrolling=n.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),void 0===r.startMoving&&(i.currentX===i.startX&&i.currentY===i.startY||(r.startMoving=!0)),r.isScrolling||n.zoom&&n.params.zoom&&n.params.zoom.enabled&&r.evCache.length>1)return void(r.isTouched=!1);if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&l.cancelable&&l.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&l.stopPropagation();let m=n.isHorizontal()?f:h,v=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(m=Math.abs(m)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),i.diff=m,m*=a.touchRatio,o&&(m=-m,v=-v);const g=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=v>0?"prev":"next";const y=n.params.loop&&!a.cssMode,b="next"===n.swipeDirection&&n.allowSlideNext||"prev"===n.swipeDirection&&n.allowSlidePrev;if(!r.isMoved){if(y&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let w;r.isMoved&&g!==n.touchesDirection&&y&&b&&Math.abs(m)>=1&&(n.loopFix({direction:n.swipeDirection,setTranslate:!0}),w=!0),n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=m+r.startTranslate;let k=!0,_=a.resistanceRatio;if(a.touchReleaseOnEdges&&(_=0),m>0?(y&&b&&!w&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.size/2:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(k=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+m)**_))):m<0&&(y&&b&&!w&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.size/2:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(k=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-m)**_))),k&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),a.threshold>0){if(!(Math.abs(m)>a.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,void(i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function le(e){const t=this,n=t.touchEventsData,r=n.evCache.findIndex((t=>t.pointerId===e.pointerId));if(r>=0&&n.evCache.splice(r,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(e.type)){if(!(["pointercancel","contextmenu"].includes(e.type)&&(t.browser.isSafari||t.browser.isWebView)))return}const{params:a,touches:i,rtlTranslate:o,slidesGrid:s,enabled:l}=t;if(!l)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),n.allowTouchCallbacks&&t.emit("touchEnd",c),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);a.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=P(),p=u-n.touchStartTime;if(t.allowClick){const e=c.path||c.composedPath&&c.composedPath();t.updateClickedSlide(e&&e[0]||c.target,e),t.emit("tap click",c),p<300&&u-n.lastClickTime<300&&t.emit("doubleTap doubleClick",c)}if(n.lastClickTime=P(),T((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===i.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let d;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,d=a.followFinger?o?t.translate:-t.translate:-n.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:d});let f=0,h=t.slidesSizesGrid[0];for(let b=0;b<s.length;b+=b<a.slidesPerGroupSkip?1:a.slidesPerGroup){const e=b<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==s[b+e]?d>=s[b]&&d<s[b+e]&&(f=b,h=s[b+e]-s[b]):d>=s[b]&&(f=b,h=s[s.length-1]-s[s.length-2])}let m=null,v=null;a.rewind&&(t.isBeginning?v=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const g=(d-s[f])/h,y=f<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(p>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?m:f+y):t.slideTo(f)),"prev"===t.swipeDirection&&(g>1-a.longSwipesRatio?t.slideTo(f+y):null!==v&&g<0&&Math.abs(g)>a.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(c.target===t.navigation.nextEl||c.target===t.navigation.prevEl)?c.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==m?m:f+y),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function ce(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:i}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=o&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function ue(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function pe(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const i=e.maxTranslate()-e.minTranslate();a=0===i?0:(e.translate-e.minTranslate())/i,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function de(e){const t=this;Q(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}let fe=!1;function he(){}const me=(e,t)=>{const n=x(),{params:r,el:a,wrapperEl:i,device:o}=e,s=!!r.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;a[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[l]("click",e.onClick,!0),r.cssMode&&i[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",ce,!0):e[c]("observerUpdate",ce,!0),a[l]("load",e.onLoad,{capture:!0})};const ve=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ge={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,i=r.breakpoints;if(!i||i&&0===Object.keys(i).length)return;const o=e.getBreakpoint(i,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const s=(o in i?i[o]:void 0)||e.originalParams,l=ve(e,r),c=ve(e,s),u=r.enabled;l&&!c?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(a.classList.add(`${r.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===r.grid.fill)&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===s[t])return;const n=r[t]&&r[t].enabled,a=s[t]&&s[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}));const p=s.direction&&s.direction!==r.direction,d=r.loop&&(s.slidesPerView!==r.slidesPerView||p),f=r.loop;p&&n&&e.changeDirection(),N(e.params,s);const h=e.params.enabled,m=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),u&&!h?e.disable():!u&&h&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",s),n&&(d?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!f&&m?(e.loopCreate(t),e.updateSlides()):f&&!m&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let r=!1;const a=M(),i="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:i*t,point:e}}return{value:e,point:e}}));o.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let s=0;s<o.length;s+=1){const{point:e,value:i}=o[s];"window"===t?a.matchMedia(`(min-width: ${i}px)`).matches&&(r=e):i<=n.clientWidth&&(r=e)}return r||"max"}};var ye={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function be(e,t){return function(n){void 0===n&&(n={});const r=Object.keys(n)[0],a=n[r];"object"==typeof a&&null!==a?(!0===e[r]&&(e[r]={enabled:!0}),"navigation"===r&&e[r]&&e[r].enabled&&!e[r].prevEl&&!e[r].nextEl&&(e[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&e[r]&&e[r].enabled&&!e[r].el&&(e[r].auto=!0),r in e&&"enabled"in a?("object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),N(t,n)):N(t,n)):N(t,n)}}const we={eventsEmitter:K,update:te,translate:ne,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),re({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),re({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:ae,loop:ie,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,t=x(),{params:n}=e;e.onTouchStart=oe.bind(e),e.onTouchMove=se.bind(e),e.onTouchEnd=le.bind(e),n.cssMode&&(e.onScroll=pe.bind(e)),e.onClick=ue.bind(e),e.onLoad=de.bind(e),fe||(t.addEventListener("touchstart",he),fe=!0),me(e,"on")},detachEvents:function(){me(this,"off")}},breakpoints:ge,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,o=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((r=>{e[r]&&n.push(t+r)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},ke={};class _e{constructor(){let e,t;for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];1===r.length&&r[0].constructor&&"Object"===Object.prototype.toString.call(r[0]).slice(8,-1)?t=r[0]:[e,t]=r,t||(t={}),t=N({},t),e&&!t.el&&(t.el=e);const i=x();if(t.el&&"string"==typeof t.el&&i.querySelectorAll(t.el).length>1){const e=[];return i.querySelectorAll(t.el).forEach((n=>{const r=N({},t,{el:n});e.push(new _e(r))})),e}const o=this;o.__swiper__=!0,o.support=W(),o.device=Y({userAgent:t.userAgent}),o.browser=X(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const s={};o.modules.forEach((e=>{e({params:t,swiper:o,extendParams:be(t,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})}));const l=N({},ye,s);return o.params=N({},l,ke,t),o.originalParams=N({},o.params),o.passedParams=N({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach((e=>{o.on(e,o.params.on[e])})),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=$(R(t,`.${n.slideClass}, swiper-slide`)[0]);return $(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=R(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),a=(n.maxTranslate()-r)*e+r;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:r,slidesGrid:a,slidesSizesGrid:i,size:o,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=r[s]?r[s].swiperSlideSize:0;for(let n=s+1;n<r.length;n+=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>o&&(e=!0));for(let n=s-1;n>=0;n-=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let c=s+1;c<r.length;c+=1){(t?a[c]+i[c]-a[s]<o:a[c]-a[s]<o)&&(l+=1)}else for(let c=s-1;c>=0;c-=1){a[s]-a[c]<o&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&Q(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&"SWIPER-CONTAINER"===n.parentNode.host.nodeName&&(t.isElement=!0);const r=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(r())}return R(n,r())[0]})();return!a&&t.params.createElements&&(a=j("div",t.params.wrapperClass),n.append(a),R(n,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===F(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===F(n,"direction")),wrongRTL:"-webkit-box"===F(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?Q(t,e):e.addEventListener("load",(e=>{Q(t,e.target)}))})),ee(t),t.initialized=!0,ee(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:r,el:a,wrapperEl:i,slides:o}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),a.removeAttribute("style"),i.removeAttribute("style"),o&&o.length&&o.forEach((e=>{e.classList.remove(r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el.swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(n){}try{delete t[e]}catch(n){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){N(ke,e)}static get extendedDefaults(){return ke}static get defaults(){return ye}static installModule(e){_e.prototype.__modules__||(_e.prototype.__modules__=[]);const t=_e.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>_e.installModule(e))),_e):(_e.installModule(e),_e)}}function Ee(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach((a=>{if(!n[a]&&!0===n.auto){let i=R(e.el,`.${r[a]}`)[0];i||(i=j("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}})),n}function Se(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function xe(e){const t=this,{params:n,slidesEl:r}=t;n.loop&&t.loopDestroy();const a=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,r.append(t.children[0]),t.innerHTML=""}else r.append(e)};if("object"==typeof e&&"length"in e)for(let i=0;i<e.length;i+=1)e[i]&&a(e[i]);else a(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update()}function Ce(e){const t=this,{params:n,activeIndex:r,slidesEl:a}=t;n.loop&&t.loopDestroy();let i=r+1;const o=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,a.prepend(t.children[0]),t.innerHTML=""}else a.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&o(e[t]);i=r+e.length}else o(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),t.slideTo(i,0,!1)}function Me(e,t){const n=this,{params:r,activeIndex:a,slidesEl:i}=n;let o=a;r.loop&&(o-=n.loopedSlides,n.loopDestroy(),n.recalcSlides());const s=n.slides.length;if(e<=0)return void n.prependSlide(t);if(e>=s)return void n.appendSlide(t);let l=o>e?o+1:o;const c=[];for(let u=s-1;u>=e;u-=1){const e=n.slides[u];e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);l=o>e?o+t.length:o}else i.append(t);for(let u=0;u<c.length;u+=1)i.append(c[u]);n.recalcSlides(),r.loop&&n.loopCreate(),r.observer&&!n.isElement||n.update(),r.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function Te(e){const t=this,{params:n,activeIndex:r}=t;let a=r;n.loop&&(a-=t.loopedSlides,t.loopDestroy());let i,o=a;if("object"==typeof e&&"length"in e){for(let n=0;n<e.length;n+=1)i=e[n],t.slides[i]&&t.slides[i].remove(),i<o&&(o-=1);o=Math.max(o,0)}else i=e,t.slides[i]&&t.slides[i].remove(),i<o&&(o-=1),o=Math.max(o,0);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),n.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)}function Pe(){const e=this,t=[];for(let n=0;n<e.slides.length;n+=1)t.push(n);e.removeSlide(t)}function Ae(e){const{effect:t,swiper:n,on:r,setTranslate:a,setTransition:i,overwriteParams:o,perspective:s,recreateShadows:l,getEffectParams:c}=e;let u;r("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=o?o():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),r("setTranslate",(()=>{n.params.effect===t&&a()})),r("setTransition",((e,r)=>{n.params.effect===t&&i(r)})),r("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),r("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(u=!0),requestAnimationFrame((()=>{u&&n.slides&&n.slides.length&&(a(),u=!1)})))}))}function Oe(e,t){const n=L(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function Ie(e){let{swiper:t,duration:n,transformElements:r,allSlides:a}=e;const{activeIndex:i}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=a?r:r.filter((e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter((t=>t.shadowRoot&&t.shadowRoot===e.parentNode))[0];return e.parentElement})(e):e;return t.getSlideIndex(n)===i})),e.forEach((e=>{q(e,(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function Ne(e,t,n){const r=`swiper-slide-shadow${n?`-${n}`:""}${e?` swiper-slide-shadow-${e}`:""}`,a=L(t);let i=a.querySelector(`.${r.split(" ").join(".")}`);return i||(i=j("div",r.split(" ")),a.append(i)),i}Object.keys(we).forEach((e=>{Object.keys(we[e]).forEach((t=>{_e.prototype[t]=we[e][t]}))})),_e.use([function(e){let{swiper:t,on:n,emit:r}=e;const a=M();let i=null,o=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(i=new ResizeObserver((e=>{o=a.requestAnimationFrame((()=>{const{width:n,height:r}=t;let a=n,i=r;e.forEach((e=>{let{contentBoxSize:n,contentRect:r,target:o}=e;o&&o!==t.el||(a=r?r.width:(n[0]||n).inlineSize,i=r?r.height:(n[0]||n).blockSize)})),a===n&&i===r||s()}))})),i.observe(t.el)):(a.addEventListener("resize",s),a.addEventListener("orientationchange",l))})),n("destroy",(()=>{o&&a.cancelAnimationFrame(o),i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null),a.removeEventListener("resize",s),a.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i=[],o=M(),s=function(e,n){void 0===n&&(n={});const r=new(o.MutationObserver||o.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const n=function(){a("observerUpdate",e[0])};o.requestAnimationFrame?o.requestAnimationFrame(n):o.setTimeout(n,0)}));r.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:void 0===n.childList||n.childList,characterData:void 0===n.characterData||n.characterData}),i.push(r)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=H(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}})),r("destroy",(()=>{i.forEach((e=>{e.disconnect()})),i.splice(0,i.length)}))}]);const De=[function(e){let t,{swiper:n,extendParams:r,on:a,emit:i}=e;r({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const o=x();n.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const s=o.createElement("div");function l(e,t){const r=n.params.virtual;if(r.cache&&n.virtual.cache[t])return n.virtual.cache[t];let a;return r.renderSlide?(a=r.renderSlide.call(n,e,t),"string"==typeof a&&(s.innerHTML=a,a=s.children[0])):a=n.isElement?j("swiper-slide"):j("div",n.params.slideClass),a.setAttribute("data-swiper-slide-index",t),r.renderSlide||(a.innerHTML=e),r.cache&&(n.virtual.cache[t]=a),a}function c(e){const{slidesPerView:t,slidesPerGroup:r,centeredSlides:a,loop:o}=n.params,{addSlidesBefore:s,addSlidesAfter:c}=n.params.virtual,{from:u,to:p,slides:d,slidesGrid:f,offset:h}=n.virtual;n.params.cssMode||n.updateActiveIndex();const m=n.activeIndex||0;let v,g,y;v=n.rtlTranslate?"right":n.isHorizontal()?"left":"top",a?(g=Math.floor(t/2)+r+c,y=Math.floor(t/2)+r+s):(g=t+(r-1)+c,y=(o?t:r)+s);let b=m-y,w=m+g;o||(b=Math.max(b,0),w=Math.min(w,d.length-1));let k=(n.slidesGrid[b]||0)-(n.slidesGrid[0]||0);function _(){n.updateSlides(),n.updateProgress(),n.updateSlidesClasses(),i("virtualUpdate")}if(o&&m>=y?(b-=y,a||(k+=n.slidesGrid[0])):o&&m<y&&(b=-y,a&&(k+=n.slidesGrid[0])),Object.assign(n.virtual,{from:b,to:w,offset:k,slidesGrid:n.slidesGrid,slidesBefore:y,slidesAfter:g}),u===b&&p===w&&!e)return n.slidesGrid!==f&&k!==h&&n.slides.forEach((e=>{e.style[v]=k-Math.abs(n.cssOverflowAdjustment())+"px"})),n.updateProgress(),void i("virtualUpdate");if(n.params.virtual.renderExternal)return n.params.virtual.renderExternal.call(n,{offset:k,from:b,to:w,slides:function(){const e=[];for(let t=b;t<=w;t+=1)e.push(d[t]);return e}()}),void(n.params.virtual.renderExternalUpdate?_():i("virtualUpdate"));const E=[],S=[],x=e=>{let t=e;return e<0?t=d.length+e:t>=d.length&&(t-=d.length),t};if(e)n.slides.filter((e=>e.matches(`.${n.params.slideClass}, swiper-slide`))).forEach((e=>{e.remove()}));else for(let i=u;i<=p;i+=1)if(i<b||i>w){const e=x(i);n.slides.filter((t=>t.matches(`.${n.params.slideClass}[data-swiper-slide-index="${e}"], swiper-slide[data-swiper-slide-index="${e}"]`))).forEach((e=>{e.remove()}))}const C=o?-d.length:0,M=o?2*d.length:d.length;for(let n=C;n<M;n+=1)if(n>=b&&n<=w){const t=x(n);void 0===p||e?S.push(t):(n>p&&S.push(t),n<u&&E.push(t))}if(S.forEach((e=>{n.slidesEl.append(l(d[e],e))})),o)for(let i=E.length-1;i>=0;i-=1){const e=E[i];n.slidesEl.prepend(l(d[e],e))}else E.sort(((e,t)=>t-e)),E.forEach((e=>{n.slidesEl.prepend(l(d[e],e))}));R(n.slidesEl,".swiper-slide, swiper-slide").forEach((e=>{e.style[v]=k-Math.abs(n.cssOverflowAdjustment())+"px"})),_()}a("beforeInit",(()=>{if(!n.params.virtual.enabled)return;let e;if(void 0===n.passedParams.virtual.slides){const t=[...n.slidesEl.children].filter((e=>e.matches(`.${n.params.slideClass}, swiper-slide`)));t&&t.length&&(n.virtual.slides=[...t],e=!0,t.forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t),n.virtual.cache[t]=e,e.remove()})))}e||(n.virtual.slides=n.params.virtual.slides),n.classNames.push(`${n.params.containerModifierClass}virtual`),n.params.watchSlidesProgress=!0,n.originalParams.watchSlidesProgress=!0,c()})),a("setTranslate",(()=>{n.params.virtual.enabled&&(n.params.cssMode&&!n._immediateVirtual?(clearTimeout(t),t=setTimeout((()=>{c()}),100)):c())})),a("init update resize",(()=>{n.params.virtual.enabled&&n.params.cssMode&&D(n.wrapperEl,"--swiper-virtual-size",`${n.virtualSize}px`)})),Object.assign(n.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.push(e[t]);else n.virtual.slides.push(e);c(!0)},prependSlide:function(e){const t=n.activeIndex;let r=t+1,a=1;if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.unshift(e[t]);r=t+e.length,a=e.length}else n.virtual.slides.unshift(e);if(n.params.virtual.cache){const e=n.virtual.cache,t={};Object.keys(e).forEach((n=>{const r=e[n],i=r.getAttribute("data-swiper-slide-index");i&&r.setAttribute("data-swiper-slide-index",parseInt(i,10)+a),t[parseInt(n,10)+a]=r})),n.virtual.cache=t}c(!0),n.slideTo(r,0)},removeSlide:function(e){if(null==e)return;let t=n.activeIndex;if(Array.isArray(e))for(let r=e.length-1;r>=0;r-=1)n.params.virtual.cache&&(delete n.virtual.cache[e[r]],Object.keys(n.virtual.cache).forEach((t=>{t>e&&(n.virtual.cache[t-1]=n.virtual.cache[t],n.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete n.virtual.cache[t])}))),n.virtual.slides.splice(e[r],1),e[r]<t&&(t-=1),t=Math.max(t,0);else n.params.virtual.cache&&(delete n.virtual.cache[e],Object.keys(n.virtual.cache).forEach((t=>{t>e&&(n.virtual.cache[t-1]=n.virtual.cache[t],n.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete n.virtual.cache[t])}))),n.virtual.slides.splice(e,1),e<t&&(t-=1),t=Math.max(t,0);c(!0),n.slideTo(t,0)},removeAllSlides:function(){n.virtual.slides=[],n.params.virtual.cache&&(n.virtual.cache={}),c(!0),n.slideTo(0,0)},update:c})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i=x(),o=M();function s(e){if(!t.enabled)return;const{rtlTranslate:n}=t;let r=e;r.originalEvent&&(r=r.originalEvent);const s=r.keyCode||r.charCode,l=t.params.keyboard.pageUpDown,c=l&&33===s,u=l&&34===s,p=37===s,d=39===s,f=38===s,h=40===s;if(!t.allowSlideNext&&(t.isHorizontal()&&d||t.isVertical()&&h||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&p||t.isVertical()&&f||c))return!1;if(!(r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||u||p||d||f||h)){let e=!1;if(H(t.el,`.${t.params.slideClass}, swiper-slide`).length>0&&0===H(t.el,`.${t.params.slideActiveClass}`).length)return;const r=t.el,a=r.clientWidth,i=r.clientHeight,s=o.innerWidth,l=o.innerHeight,c=B(r);n&&(c.left-=r.scrollLeft);const u=[[c.left,c.top],[c.left+a,c.top],[c.left,c.top+i],[c.left+a,c.top+i]];for(let t=0;t<u.length;t+=1){const n=u[t];if(n[0]>=0&&n[0]<=s&&n[1]>=0&&n[1]<=l){if(0===n[0]&&0===n[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((c||u||p||d)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),((u||d)&&!n||(c||p)&&n)&&t.slideNext(),((c||p)&&!n||(u||d)&&n)&&t.slidePrev()):((c||u||f||h)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),(u||h)&&t.slideNext(),(c||f)&&t.slidePrev()),a("keyPress",s)}}function l(){t.keyboard.enabled||(i.addEventListener("keydown",s),t.keyboard.enabled=!0)}function c(){t.keyboard.enabled&&(i.removeEventListener("keydown",s),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},n({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),r("init",(()=>{t.params.keyboard.enabled&&l()})),r("destroy",(()=>{t.keyboard.enabled&&c()})),Object.assign(t.keyboard,{enable:l,disable:c})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i=M();let o;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let s,l=P();const c=[];function u(){t.enabled&&(t.mouseEntered=!0)}function p(){t.enabled&&(t.mouseEntered=!1)}function d(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&P()-l<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&P()-l<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),a("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),a("scroll",e.raw)),l=(new i.Date).getTime(),!1)))}function f(e){let n=e,r=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const i=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const u=l&&l.contains(n.target);if(!t.mouseEntered&&!u&&!i.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let p=0;const f=t.rtlTranslate?-1:1,h=function(e){let t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),e.shiftKey&&!r&&(r=a,a=0),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}}(n);if(i.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(h.pixelX)>Math.abs(h.pixelY)))return!0;p=-h.pixelX*f}else{if(!(Math.abs(h.pixelY)>Math.abs(h.pixelX)))return!0;p=-h.pixelY}else p=Math.abs(h.pixelX)>Math.abs(h.pixelY)?-h.pixelX*f:-h.pixelY;if(0===p)return!0;i.invert&&(p=-p);let m=t.getTranslate()+p*i.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),r=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),r&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:P(),delta:Math.abs(p),direction:Math.sign(p)},r=s&&e.time<s.time+500&&e.delta<=s.delta&&e.direction===s.direction;if(!r){s=void 0;let l=t.getTranslate()+p*i.sensitivity;const u=t.isBeginning,d=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!u&&t.isBeginning||!d&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(o),o=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,r=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=p>0?.8:.2;s=e,c.splice(0),o=T((()=>{t.slideToClosest(t.params.speed,!0,void 0,n)}),0)}o||(o=T((()=>{s=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(r||a("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),i.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:P(),delta:Math.abs(p),direction:Math.sign(p),raw:e};c.length>=2&&c.shift();const r=c.length?c[c.length-1]:void 0;if(c.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&d(n):d(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function h(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",u),n[e]("mouseleave",p),n[e]("wheel",f)}function m(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",f),!0):!t.mousewheel.enabled&&(h("addEventListener"),t.mousewheel.enabled=!0,!0)}function v(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,f),!0):!!t.mousewheel.enabled&&(h("removeEventListener"),t.mousewheel.enabled=!1,!0)}r("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&v(),t.params.mousewheel.enabled&&m()})),r("destroy",(()=>{t.params.cssMode&&m(),t.mousewheel.enabled&&v()})),Object.assign(t.mousewheel,{enable:m,disable:v})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const i=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function o(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n.length>1&&1===t.el.querySelectorAll(e).length&&(n=t.el.querySelector(e))),e&&!n?e:n)}function s(e,n){const r=t.params.navigation;(e=i(e)).forEach((e=>{e&&(e.classList[n?"add":"remove"](...r.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass))}))}function l(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return s(n,!1),void s(e,!1);s(n,t.isBeginning&&!t.params.rewind),s(e,t.isEnd&&!t.params.rewind)}function c(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),a("navigationPrev"))}function u(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),a("navigationNext"))}function p(){const e=t.params.navigation;if(t.params.navigation=Ee(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=o(e.nextEl),r=o(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:r}),n=i(n),r=i(r);const a=(n,r)=>{n&&n.addEventListener("click","next"===r?u:c),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach((e=>a(e,"next"))),r.forEach((e=>a(e,"prev")))}function d(){let{nextEl:e,prevEl:n}=t.navigation;e=i(e),n=i(n);const r=(e,n)=>{e.removeEventListener("click","next"===n?u:c),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>r(e,"next"))),n.forEach((e=>r(e,"prev")))}r("init",(()=>{!1===t.params.navigation.enabled?f():(p(),l())})),r("toEdge fromEdge lock unlock",(()=>{l()})),r("destroy",(()=>{d()})),r("enable disable",(()=>{let{nextEl:e,prevEl:n}=t.navigation;e=i(e),n=i(n),t.enabled?l():[...e,...n].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),r("click",((e,n)=>{let{nextEl:r,prevEl:o}=t.navigation;r=i(r),o=i(o);const s=n.target;if(t.params.navigation.hideOnClick&&!o.includes(s)&&!r.includes(s)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===s||t.pagination.el.contains(s)))return;let e;r.length?e=r[0].classList.contains(t.params.navigation.hiddenClass):o.length&&(e=o[0].classList.contains(t.params.navigation.hiddenClass)),a(!0===e?"navigationShow":"navigationHide"),[...r,...o].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const f=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),d()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),p(),l()},disable:f,update:l,init:p,destroy:d})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i="swiper-pagination";let o;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${i}-bullet`,bulletActiveClass:`${i}-bullet-active`,modifierClass:`${i}-`,currentClass:`${i}-current`,totalClass:`${i}-total`,hiddenClass:`${i}-hidden`,progressbarFillClass:`${i}-progressbar-fill`,progressbarOppositeClass:`${i}-progressbar-opposite`,clickableClass:`${i}-clickable`,lockClass:`${i}-lock`,horizontalClass:`${i}-horizontal`,verticalClass:`${i}-vertical`,paginationDisabledClass:`${i}-disabled`}}),t.pagination={el:null,bullets:[]};let s=0;const l=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function c(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function u(e,n){const{bulletActiveClass:r}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${r}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${r}-${n}-${n}`))}function p(e){const n=e.target.closest(Se(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const r=$(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===r)return;const e=t.realIndex,n=t.getSlideIndexByData(r),a=t.getSlideIndexByData(t.realIndex),i=r=>{const a=t.activeIndex;t.loopFix({direction:r,activeSlideIndex:n,slideTo:!1});a===t.activeIndex&&t.slideToLoop(e,0,!1,!0)};if(n>t.slides.length-t.loopedSlides)i(n>a?"next":"prev");else if(t.params.centeredSlides){const e="auto"===t.params.slidesPerView?t.slidesPerViewDynamic():Math.ceil(parseFloat(t.params.slidesPerView,10));n<Math.floor(e/2)&&i("prev")}t.slideToLoop(r)}else t.slideTo(r)}function d(){const e=t.rtl,n=t.params.pagination;if(c())return;let r,i,p=t.pagination.el;p=l(p);const d=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,f=t.params.loop?Math.ceil(d/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(i=t.previousRealIndex||0,r=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(r=t.snapIndex,i=t.previousSnapIndex):(i=t.previousIndex||0,r=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let l,c,d;if(n.dynamicBullets&&(o=Z(a[0],t.isHorizontal()?"width":"height",!0),p.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=o*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==i&&(s+=r-(i||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),l=Math.max(r-s,0),c=l+(Math.min(a.length,n.dynamicMainBullets)-1),d=(c+l)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),p.length>1)a.forEach((e=>{const a=$(e);a===r?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(a>=l&&a<=c&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),a===l&&u(e,"prev"),a===c&&u(e,"next"))}));else{const e=a[r];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")})),n.dynamicBullets){const e=a[l],t=a[c];for(let r=l;r<=c;r+=1)a[r]&&a[r].classList.add(...`${n.bulletActiveClass}-main`.split(" "));u(e,"prev"),u(t,"next")}}if(n.dynamicBullets){const r=Math.min(a.length,n.dynamicMainBullets+4),i=(o*r-o)/2-d*o,s=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?s:"top"]=`${i}px`}))}}p.forEach(((e,i)=>{if("fraction"===n.type&&(e.querySelectorAll(Se(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(r+1)})),e.querySelectorAll(Se(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(f)}))),"progressbar"===n.type){let a;a=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const i=(r+1)/f;let o=1,s=1;"horizontal"===a?o=i:s=i,e.querySelectorAll(Se(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${o}) scaleY(${s})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(e.innerHTML=n.renderCustom(t,r+1,f),0===i&&a("paginationRender",e)):(0===i&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function f(){const e=t.params.pagination;if(c())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let r=t.pagination.el;r=l(r);let i="";if("bullets"===e.type){let r=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&r>n&&(r=n);for(let n=0;n<r;n+=1)e.renderBullet?i+=e.renderBullet.call(t,n,e.bulletClass):i+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(i=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(i=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],r.forEach((n=>{"custom"!==e.type&&(n.innerHTML=i||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(Se(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",r[0])}function h(){t.params.pagination=Ee(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.filter((e=>H(e,".swiper")[0]===t.el))[0])),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=l(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",p),t.enabled||n.classList.add(e.lockClass)})))}function m(){const e=t.params.pagination;if(c())return;let n=t.pagination.el;n&&(n=l(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",p))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}r("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=l(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),r("init",(()=>{!1===t.params.pagination.enabled?v():(h(),f(),d())})),r("activeIndexChange",(()=>{void 0===t.snapIndex&&d()})),r("snapIndexChange",(()=>{d()})),r("snapGridLengthChange",(()=>{f(),d()})),r("destroy",(()=>{m()})),r("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),r("lock unlock",(()=>{d()})),r("click",((e,n)=>{const r=n.target,i=l(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&i&&i.length>0&&!r.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&r===t.navigation.nextEl||t.navigation.prevEl&&r===t.navigation.prevEl))return;const e=i[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),i.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const v=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),m()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),f(),d()},disable:v,render:f,update:d,init:h,destroy:m})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i=x();let o,s,l,c,u=!1,p=null,d=null;function f(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:r,el:a}=e,i=t.params.scrollbar,o=t.params.loop?t.progressLoop:t.progress;let c=s,u=(l-s)*o;n?(u=-u,u>0?(c=s-u,u=0):-u+s>l&&(c=l+u)):u<0?(c=s+u,u=0):u+s>l&&(c=l-u),t.isHorizontal()?(r.style.transform=`translate3d(${u}px, 0, 0)`,r.style.width=`${c}px`):(r.style.transform=`translate3d(0px, ${u}px, 0)`,r.style.height=`${c}px`),i.hide&&(clearTimeout(p),a.style.opacity=1,p=setTimeout((()=>{a.style.opacity=0,a.style.transitionDuration="400ms"}),1e3))}function h(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:r}=e;n.style.width="",n.style.height="",l=t.isHorizontal()?r.offsetWidth:r.offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),s="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=`${s}px`:n.style.height=`${s}px`,r.style.display=c>=1?"none":"",t.params.scrollbar.hide&&(r.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function m(e){return t.isHorizontal()?e.clientX:e.clientY}function v(e){const{scrollbar:n,rtlTranslate:r}=t,{el:a}=n;let i;i=(m(e)-B(a)[t.isHorizontal()?"left":"top"]-(null!==o?o:s/2))/(l-s),i=Math.max(Math.min(i,1),0),r&&(i=1-i);const c=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*i;t.updateProgress(c),t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}function g(e){const n=t.params.scrollbar,{scrollbar:r,wrapperEl:i}=t,{el:s,dragEl:l}=r;u=!0,o=e.target===l?m(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.style.transitionDuration="100ms",l.style.transitionDuration="100ms",v(e),clearTimeout(d),s.style.transitionDuration="0ms",n.hide&&(s.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),a("scrollbarDragStart",e)}function y(e){const{scrollbar:n,wrapperEl:r}=t,{el:i,dragEl:o}=n;u&&(e.preventDefault?e.preventDefault():e.returnValue=!1,v(e),r.style.transitionDuration="0ms",i.style.transitionDuration="0ms",o.style.transitionDuration="0ms",a("scrollbarDragMove",e))}function b(e){const n=t.params.scrollbar,{scrollbar:r,wrapperEl:i}=t,{el:o}=r;u&&(u=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",i.style.transitionDuration=""),n.hide&&(clearTimeout(d),d=T((()=>{o.style.opacity=0,o.style.transitionDuration="400ms"}),1e3)),a("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function w(e){const{scrollbar:n,params:r}=t,a=n.el;if(!a)return;const o=a,s=!!r.passiveListeners&&{passive:!1,capture:!1},l=!!r.passiveListeners&&{passive:!0,capture:!1};if(!o)return;const c="on"===e?"addEventListener":"removeEventListener";o[c]("pointerdown",g,s),i[c]("pointermove",y,s),i[c]("pointerup",b,l)}function k(){const{scrollbar:e,el:n}=t;t.params.scrollbar=Ee(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const r=t.params.scrollbar;if(!r.el)return;let a,o;"string"==typeof r.el&&t.isElement&&(a=t.el.querySelector(r.el)),a||"string"!=typeof r.el?a||(a=r.el):a=i.querySelectorAll(r.el),t.params.uniqueNavElements&&"string"==typeof r.el&&a.length>1&&1===n.querySelectorAll(r.el).length&&(a=n.querySelector(r.el)),a.length>0&&(a=a[0]),a.classList.add(t.isHorizontal()?r.horizontalClass:r.verticalClass),a&&(o=a.querySelector(`.${t.params.scrollbar.dragClass}`),o||(o=j("div",t.params.scrollbar.dragClass),a.append(o))),Object.assign(e,{el:a,dragEl:o}),r.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&w("on"),a&&a.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}function _(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&w("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},r("init",(()=>{!1===t.params.scrollbar.enabled?E():(k(),h(),f())})),r("update resize observerUpdate lock unlock",(()=>{h()})),r("setTranslate",(()=>{f()})),r("setTransition",((e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(n)})),r("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)})),r("destroy",(()=>{_()}));const E=()=>{t.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),_()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),k(),h(),f()},disable:E,updateSize:h,setTranslate:f,init:k,destroy:_})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({parallax:{enabled:!1}});const a="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",i=(e,n)=>{const{rtl:r}=t,a=r?-1:1,i=e.getAttribute("data-swiper-parallax")||"0";let o=e.getAttribute("data-swiper-parallax-x"),s=e.getAttribute("data-swiper-parallax-y");const l=e.getAttribute("data-swiper-parallax-scale"),c=e.getAttribute("data-swiper-parallax-opacity"),u=e.getAttribute("data-swiper-parallax-rotate");if(o||s?(o=o||"0",s=s||"0"):t.isHorizontal()?(o=i,s="0"):(s=i,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*n*a+"%":o*n*a+"px",s=s.indexOf("%")>=0?parseInt(s,10)*n+"%":s*n+"px",null!=c){const t=c-(c-1)*(1-Math.abs(n));e.style.opacity=t}let p=`translate3d(${o}, ${s}, 0px)`;if(null!=l){p+=` scale(${l-(l-1)*(1-Math.abs(n))})`}if(u&&null!=u){p+=` rotate(${u*n*-1}deg)`}e.style.transform=p},o=()=>{const{el:e,slides:n,progress:r,snapGrid:o,isElement:s}=t,l=R(e,a);t.isElement&&l.push(...R(t.hostEl,a)),l.forEach((e=>{i(e,r)})),n.forEach(((e,n)=>{let s=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(s+=Math.ceil(n/2)-r*(o.length-1)),s=Math.min(Math.max(s,-1),1),e.querySelectorAll(`${a}, [data-swiper-parallax-rotate]`).forEach((e=>{i(e,s)}))}))};r("beforeInit",(()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),r("init",(()=>{t.params.parallax.enabled&&o()})),r("setTranslate",(()=>{t.params.parallax.enabled&&o()})),r("setTransition",((e,n)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{el:n,hostEl:r}=t,i=[...n.querySelectorAll(a)];t.isElement&&i.push(...r.querySelectorAll(a)),i.forEach((t=>{let n=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&&(n=0),t.style.transitionDuration=`${n}ms`}))}(n)}))},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const i=M();n({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let o,s,l=1,c=!1;const u=[],p={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},d={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},f={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let h=1;function m(){if(u.length<2)return 1;const e=u[0].pageX,t=u[0].pageY,n=u[1].pageX,r=u[1].pageY;return Math.sqrt((n-e)**2+(r-t)**2)}function v(e){const n=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(n)||t.slides.filter((t=>t.contains(e.target))).length>0}function g(e){if("mouse"===e.pointerType&&u.splice(0,u.length),!v(e))return;const n=t.params.zoom;if(o=!1,s=!1,u.push(e),!(u.length<2)){if(o=!0,p.scaleStart=m(),!p.slideEl){p.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),p.slideEl||(p.slideEl=t.slides[t.activeIndex]);let r=p.slideEl.querySelector(`.${n.containerClass}`);if(r&&(r=r.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=r,p.imageWrapEl=r?H(p.imageEl,`.${n.containerClass}`)[0]:void 0,!p.imageWrapEl)return void(p.imageEl=void 0);p.maxRatio=p.imageWrapEl.getAttribute("data-swiper-zoom")||n.maxRatio}if(p.imageEl){const[e,t]=function(){if(u.length<2)return{x:null,y:null};const e=p.imageEl.getBoundingClientRect();return[(u[0].pageX+(u[1].pageX-u[0].pageX)/2-e.x-i.scrollX)/l,(u[0].pageY+(u[1].pageY-u[0].pageY)/2-e.y-i.scrollY)/l]}();p.originX=e,p.originY=t,p.imageEl.style.transitionDuration="0ms"}c=!0}}function y(e){if(!v(e))return;const n=t.params.zoom,r=t.zoom,a=u.findIndex((t=>t.pointerId===e.pointerId));a>=0&&(u[a]=e),u.length<2||(s=!0,p.scaleMove=m(),p.imageEl&&(r.scale=p.scaleMove/p.scaleStart*l,r.scale>p.maxRatio&&(r.scale=p.maxRatio-1+(r.scale-p.maxRatio+1)**.5),r.scale<n.minRatio&&(r.scale=n.minRatio+1-(n.minRatio-r.scale+1)**.5),p.imageEl.style.transform=`translate3d(0,0,0) scale(${r.scale})`))}function b(e){if(!v(e))return;if("mouse"===e.pointerType&&"pointerout"===e.type)return;const n=t.params.zoom,r=t.zoom,a=u.findIndex((t=>t.pointerId===e.pointerId));a>=0&&u.splice(a,1),o&&s&&(o=!1,s=!1,p.imageEl&&(r.scale=Math.max(Math.min(r.scale,p.maxRatio),n.minRatio),p.imageEl.style.transitionDuration=`${t.params.speed}ms`,p.imageEl.style.transform=`translate3d(0,0,0) scale(${r.scale})`,l=r.scale,c=!1,r.scale>1&&p.slideEl?p.slideEl.classList.add(`${n.zoomedSlideClass}`):r.scale<=1&&p.slideEl&&p.slideEl.classList.remove(`${n.zoomedSlideClass}`),1===r.scale&&(p.originX=0,p.originY=0,p.slideEl=void 0)))}function w(e){if(!v(e)||!function(e){const n=`.${t.params.zoom.containerClass}`;return!!e.target.matches(n)||[...t.hostEl.querySelectorAll(n)].filter((t=>t.contains(e.target))).length>0}(e))return;const n=t.zoom;if(!p.imageEl)return;if(!d.isTouched||!p.slideEl)return;d.isMoved||(d.width=p.imageEl.offsetWidth,d.height=p.imageEl.offsetHeight,d.startX=A(p.imageWrapEl,"x")||0,d.startY=A(p.imageWrapEl,"y")||0,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight,p.imageWrapEl.style.transitionDuration="0ms");const r=d.width*n.scale,a=d.height*n.scale;if(r<p.slideWidth&&a<p.slideHeight)return;d.minX=Math.min(p.slideWidth/2-r/2,0),d.maxX=-d.minX,d.minY=Math.min(p.slideHeight/2-a/2,0),d.maxY=-d.minY,d.touchesCurrent.x=u.length>0?u[0].pageX:e.pageX,d.touchesCurrent.y=u.length>0?u[0].pageY:e.pageY;if(Math.max(Math.abs(d.touchesCurrent.x-d.touchesStart.x),Math.abs(d.touchesCurrent.y-d.touchesStart.y))>5&&(t.allowClick=!1),!d.isMoved&&!c){if(t.isHorizontal()&&(Math.floor(d.minX)===Math.floor(d.startX)&&d.touchesCurrent.x<d.touchesStart.x||Math.floor(d.maxX)===Math.floor(d.startX)&&d.touchesCurrent.x>d.touchesStart.x))return void(d.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(d.minY)===Math.floor(d.startY)&&d.touchesCurrent.y<d.touchesStart.y||Math.floor(d.maxY)===Math.floor(d.startY)&&d.touchesCurrent.y>d.touchesStart.y))return void(d.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),d.isMoved=!0;const i=(n.scale-l)/(p.maxRatio-t.params.zoom.minRatio),{originX:o,originY:s}=p;d.currentX=d.touchesCurrent.x-d.touchesStart.x+d.startX+i*(d.width-2*o),d.currentY=d.touchesCurrent.y-d.touchesStart.y+d.startY+i*(d.height-2*s),d.currentX<d.minX&&(d.currentX=d.minX+1-(d.minX-d.currentX+1)**.8),d.currentX>d.maxX&&(d.currentX=d.maxX-1+(d.currentX-d.maxX+1)**.8),d.currentY<d.minY&&(d.currentY=d.minY+1-(d.minY-d.currentY+1)**.8),d.currentY>d.maxY&&(d.currentY=d.maxY-1+(d.currentY-d.maxY+1)**.8),f.prevPositionX||(f.prevPositionX=d.touchesCurrent.x),f.prevPositionY||(f.prevPositionY=d.touchesCurrent.y),f.prevTime||(f.prevTime=Date.now()),f.x=(d.touchesCurrent.x-f.prevPositionX)/(Date.now()-f.prevTime)/2,f.y=(d.touchesCurrent.y-f.prevPositionY)/(Date.now()-f.prevTime)/2,Math.abs(d.touchesCurrent.x-f.prevPositionX)<2&&(f.x=0),Math.abs(d.touchesCurrent.y-f.prevPositionY)<2&&(f.y=0),f.prevPositionX=d.touchesCurrent.x,f.prevPositionY=d.touchesCurrent.y,f.prevTime=Date.now(),p.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}function k(){const e=t.zoom;p.slideEl&&t.activeIndex!==t.slides.indexOf(p.slideEl)&&(p.imageEl&&(p.imageEl.style.transform="translate3d(0,0,0) scale(1)"),p.imageWrapEl&&(p.imageWrapEl.style.transform="translate3d(0,0,0)"),p.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,l=1,p.slideEl=void 0,p.imageEl=void 0,p.imageWrapEl=void 0,p.originX=0,p.originY=0)}function _(e){const n=t.zoom,r=t.params.zoom;if(!p.slideEl){e&&e.target&&(p.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),p.slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.slideEl=R(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:p.slideEl=t.slides[t.activeIndex]);let n=p.slideEl.querySelector(`.${r.containerClass}`);n&&(n=n.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=n,p.imageWrapEl=n?H(p.imageEl,`.${r.containerClass}`)[0]:void 0}if(!p.imageEl||!p.imageWrapEl)return;let a,o,s,c,u,f,h,m,v,g,y,b,w,k,_,E,S,x;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),p.slideEl.classList.add(`${r.zoomedSlideClass}`),void 0===d.touchesStart.x&&e?(a=e.pageX,o=e.pageY):(a=d.touchesStart.x,o=d.touchesStart.y);const C="number"==typeof e?e:null;1===l&&C&&(a=void 0,o=void 0),n.scale=C||p.imageWrapEl.getAttribute("data-swiper-zoom")||r.maxRatio,l=C||p.imageWrapEl.getAttribute("data-swiper-zoom")||r.maxRatio,!e||1===l&&C?(h=0,m=0):(S=p.slideEl.offsetWidth,x=p.slideEl.offsetHeight,s=B(p.slideEl).left+i.scrollX,c=B(p.slideEl).top+i.scrollY,u=s+S/2-a,f=c+x/2-o,v=p.imageEl.offsetWidth,g=p.imageEl.offsetHeight,y=v*n.scale,b=g*n.scale,w=Math.min(S/2-y/2,0),k=Math.min(x/2-b/2,0),_=-w,E=-k,h=u*n.scale,m=f*n.scale,h<w&&(h=w),h>_&&(h=_),m<k&&(m=k),m>E&&(m=E)),C&&1===n.scale&&(p.originX=0,p.originY=0),p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform=`translate3d(${h}px, ${m}px,0)`,p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform=`translate3d(0,0,0) scale(${n.scale})`}function E(){const e=t.zoom,n=t.params.zoom;if(!p.slideEl){t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.slideEl=R(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:p.slideEl=t.slides[t.activeIndex];let e=p.slideEl.querySelector(`.${n.containerClass}`);e&&(e=e.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=e,p.imageWrapEl=e?H(p.imageEl,`.${n.containerClass}`)[0]:void 0}p.imageEl&&p.imageWrapEl&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,l=1,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform="translate3d(0,0,0)",p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform="translate3d(0,0,0) scale(1)",p.slideEl.classList.remove(`${n.zoomedSlideClass}`),p.slideEl=void 0,p.originX=0,p.originY=0)}function S(e){const n=t.zoom;n.scale&&1!==n.scale?E():_(e)}function x(){return{passiveListener:!!t.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function C(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:n,activeListenerWithCapture:r}=x();t.wrapperEl.addEventListener("pointerdown",g,n),t.wrapperEl.addEventListener("pointermove",y,r),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.addEventListener(e,b,n)})),t.wrapperEl.addEventListener("pointermove",w,r)}function T(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:n,activeListenerWithCapture:r}=x();t.wrapperEl.removeEventListener("pointerdown",g,n),t.wrapperEl.removeEventListener("pointermove",y,r),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.removeEventListener(e,b,n)})),t.wrapperEl.removeEventListener("pointermove",w,r)}Object.defineProperty(t.zoom,"scale",{get:()=>h,set(e){if(h!==e){const t=p.imageEl,n=p.slideEl;a("zoomChange",e,t,n)}h=e}}),r("init",(()=>{t.params.zoom.enabled&&C()})),r("destroy",(()=>{T()})),r("touchStart",((e,n)=>{t.zoom.enabled&&function(e){const n=t.device;if(!p.imageEl)return;if(d.isTouched)return;n.android&&e.cancelable&&e.preventDefault(),d.isTouched=!0;const r=u.length>0?u[0]:e;d.touchesStart.x=r.pageX,d.touchesStart.y=r.pageY}(n)})),r("touchEnd",((e,n)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!p.imageEl)return;if(!d.isTouched||!d.isMoved)return d.isTouched=!1,void(d.isMoved=!1);d.isTouched=!1,d.isMoved=!1;let n=300,r=300;const a=f.x*n,i=d.currentX+a,o=f.y*r,s=d.currentY+o;0!==f.x&&(n=Math.abs((i-d.currentX)/f.x)),0!==f.y&&(r=Math.abs((s-d.currentY)/f.y));const l=Math.max(n,r);d.currentX=i,d.currentY=s;const c=d.width*e.scale,u=d.height*e.scale;d.minX=Math.min(p.slideWidth/2-c/2,0),d.maxX=-d.minX,d.minY=Math.min(p.slideHeight/2-u/2,0),d.maxY=-d.minY,d.currentX=Math.max(Math.min(d.currentX,d.maxX),d.minX),d.currentY=Math.max(Math.min(d.currentY,d.maxY),d.minY),p.imageWrapEl.style.transitionDuration=`${l}ms`,p.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}()})),r("doubleTap",((e,n)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&S(n)})),r("transitionEnd",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&k()})),r("slideChange",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&k()})),Object.assign(t.zoom,{enable:C,disable:T,in:_,out:E,toggle:S})},function(e){let{swiper:t,extendParams:n,on:r}=e;function a(e,t){const n=function(){let e,t,n;return(r,a)=>{for(t=-1,e=r.length;e-t>1;)n=e+t>>1,r[n]<=a?t=n:e=n;return e}}();let r,a;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(a=n(this.x,e),r=a-1,(e-this.x[r])*(this.y[a]-this.y[r])/(this.x[a]-this.x[r])+this.y[r]):0},this}function i(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}n({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},r("beforeInit",(()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){const e=document.querySelector(t.params.controller.control);if(e&&e.swiper)t.controller.control=e.swiper;else if(e){const n=r=>{t.controller.control=r.detail[0],t.update(),e.removeEventListener("init",n)};e.addEventListener("init",n)}}else t.controller.control=t.params.controller.control})),r("update",(()=>{i()})),r("resize",(()=>{i()})),r("observerUpdate",(()=>{i()})),r("setTranslate",((e,n,r)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(n,r)})),r("setTransition",((e,n,r)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(n,r)})),Object.assign(t.controller,{setTranslate:function(e,n){const r=t.controller.control;let i,o;const s=t.constructor;function l(e){if(e.destroyed)return;const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline=t.params.loop?new a(t.slidesGrid,e.slidesGrid):new a(t.snapGrid,e.snapGrid)}(e),o=-t.controller.spline.interpolate(-n)),o&&"container"!==t.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(i)&&Number.isFinite(i)||(i=1),o=(n-t.minTranslate())*i+e.minTranslate()),t.params.controller.inverse&&(o=e.maxTranslate()-o),e.updateProgress(o),e.setTranslate(o,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(let t=0;t<r.length;t+=1)r[t]!==n&&r[t]instanceof s&&l(r[t]);else r instanceof s&&n!==r&&l(r)},setTransition:function(e,n){const r=t.constructor,a=t.controller.control;let i;function o(n){n.destroyed||(n.setTransition(e,t),0!==e&&(n.transitionStart(),n.params.autoHeight&&T((()=>{n.updateAutoHeight()})),q(n.wrapperEl,(()=>{a&&n.transitionEnd()}))))}if(Array.isArray(a))for(i=0;i<a.length;i+=1)a[i]!==n&&a[i]instanceof r&&o(a[i]);else a instanceof r&&n!==a&&o(a)}})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let a=null;function i(e){const t=a;0!==t.length&&(t.innerHTML="",t.innerHTML=e)}const o=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function s(e){(e=o(e)).forEach((e=>{e.setAttribute("tabIndex","0")}))}function l(e){(e=o(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function c(e,t){(e=o(e)).forEach((e=>{e.setAttribute("role",t)}))}function u(e,t){(e=o(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function p(e,t){(e=o(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function d(e){(e=o(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function f(e){(e=o(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function h(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,r=e.target;t.pagination&&t.pagination.el&&(r===t.pagination.el||t.pagination.el.contains(e.target))&&!e.target.matches(Se(t.params.pagination.bulletClass))||(t.navigation&&t.navigation.nextEl&&r===t.navigation.nextEl&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?i(n.lastSlideMessage):i(n.nextSlideMessage)),t.navigation&&t.navigation.prevEl&&r===t.navigation.prevEl&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?i(n.firstSlideMessage):i(n.prevSlideMessage)),t.pagination&&r.matches(Se(t.params.pagination.bulletClass))&&r.click())}function m(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function v(){return m()&&t.params.pagination.clickable}const g=(e,t,n)=>{s(e),"BUTTON"!==e.tagName&&(c(e,"button"),e.addEventListener("keydown",h)),p(e,n),function(e,t){(e=o(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},y=()=>{t.a11y.clicked=!0},b=()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},w=e=>{if(t.a11y.clicked)return;const n=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!n||!t.slides.includes(n))return;const r=t.slides.indexOf(n)===t.activeIndex,a=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);r||a||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(n),0))},k=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&u(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&c(t.slides,e.slideRole);const n=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((r,a)=>{const i=t.params.loop?parseInt(r.getAttribute("data-swiper-slide-index"),10):a;p(r,e.slideLabelMessage.replace(/\{\{index\}\}/,i+1).replace(/\{\{slidesLength\}\}/,n))}))},_=()=>{const e=t.params.a11y;t.el.append(a);const n=t.el;e.containerRoleDescriptionMessage&&u(n,e.containerRoleDescriptionMessage),e.containerMessage&&p(n,e.containerMessage);const r=t.wrapperEl,i=e.id||r.getAttribute("id")||`swiper-wrapper-${s=16,void 0===s&&(s=16),"x".repeat(s).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var s;const l=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var c;c=i,o(r).forEach((e=>{e.setAttribute("id",c)})),function(e,t){(e=o(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(r,l),k();let{nextEl:d,prevEl:f}=t.navigation?t.navigation:{};if(d=o(d),f=o(f),d&&d.forEach((t=>g(t,i,e.nextSlideMessage))),f&&f.forEach((t=>g(t,i,e.prevSlideMessage))),v()){(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.addEventListener("keydown",h)}))}t.el.addEventListener("focus",w,!0),t.el.addEventListener("pointerdown",y,!0),t.el.addEventListener("pointerup",b,!0)};r("beforeInit",(()=>{a=j("span",t.params.a11y.notificationClass),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true")})),r("afterInit",(()=>{t.params.a11y.enabled&&_()})),r("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&k()})),r("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:n}=t.navigation;n&&(t.isBeginning?(d(n),l(n)):(f(n),s(n))),e&&(t.isEnd?(d(e),l(e)):(f(e),s(e)))}()})),r("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;m()&&t.pagination.bullets.forEach((n=>{t.params.pagination.clickable&&(s(n),t.params.pagination.renderBullet||(c(n,"button"),p(n,e.paginationBulletMessage.replace(/\{\{index\}\}/,$(n)+1)))),n.matches(Se(t.params.pagination.bulletActiveClass))?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}))}()})),r("destroy",(()=>{t.params.a11y.enabled&&function(){a&&a.remove();let{nextEl:e,prevEl:n}=t.navigation?t.navigation:{};e=o(e),n=o(n),e&&e.forEach((e=>e.removeEventListener("keydown",h))),n&&n.forEach((e=>e.removeEventListener("keydown",h))),v()&&(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.removeEventListener("keydown",h)}));t.el.removeEventListener("focus",w,!0),t.el.removeEventListener("pointerdown",y,!0),t.el.removeEventListener("pointerup",b,!0)}()}))},function(e){let{swiper:t,extendParams:n,on:r}=e;n({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let a=!1,i={};const o=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),s=e=>{const t=M();let n;n=e?new URL(e):t.location;const r=n.pathname.slice(1).split("/").filter((e=>""!==e)),a=r.length;return{key:r[a-2],value:r[a-1]}},l=(e,n)=>{const r=M();if(!a||!t.params.history.enabled)return;let i;i=t.params.url?new URL(t.params.url):r.location;const s=t.slides[n];let l=o(s.getAttribute("data-history"));if(t.params.history.root.length>0){let n=t.params.history.root;"/"===n[n.length-1]&&(n=n.slice(0,n.length-1)),l=`${n}/${e?`${e}/`:""}${l}`}else i.pathname.includes(e)||(l=`${e?`${e}/`:""}${l}`);t.params.history.keepQuery&&(l+=i.search);const c=r.history.state;c&&c.value===l||(t.params.history.replaceState?r.history.replaceState({value:l},null,l):r.history.pushState({value:l},null,l))},c=(e,n,r)=>{if(n)for(let a=0,i=t.slides.length;a<i;a+=1){const i=t.slides[a];if(o(i.getAttribute("data-history"))===n){const n=t.getSlideIndex(i);t.slideTo(n,e,r)}}else t.slideTo(0,e,r)},u=()=>{i=s(t.params.url),c(t.params.speed,i.value,!1)};r("init",(()=>{t.params.history.enabled&&(()=>{const e=M();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);a=!0,i=s(t.params.url),i.key||i.value?(c(0,i.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",u)):t.params.history.replaceState||e.addEventListener("popstate",u)}})()})),r("destroy",(()=>{t.params.history.enabled&&(()=>{const e=M();t.params.history.replaceState||e.removeEventListener("popstate",u)})()})),r("transitionEnd _freeModeNoMomentumRelease",(()=>{a&&l(t.params.history.key,t.activeIndex)})),r("slideChange",(()=>{a&&t.params.cssMode&&l(t.params.history.key,t.activeIndex)}))},function(e){let{swiper:t,extendParams:n,emit:r,on:a}=e,i=!1;const o=x(),s=M();n({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,n){if(t.virtual&&t.params.virtual.enabled){const e=t.slides.filter((e=>e.getAttribute("data-hash")===n))[0];if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex(R(t.slidesEl,`.${t.params.slideClass}[data-hash="${n}"], swiper-slide[data-hash="${n}"]`)[0])}}});const l=()=>{r("hashChange");const e=o.location.hash.replace("#",""),n=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex];if(e!==(n?n.getAttribute("data-hash"):"")){const n=t.params.hashNavigation.getSlideIndex(t,e);if(void 0===n||Number.isNaN(n))return;t.slideTo(n)}},c=()=>{if(!i||!t.params.hashNavigation.enabled)return;const e=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex],n=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&&s.history&&s.history.replaceState?(s.history.replaceState(null,null,`#${n}`||""),r("hashSet")):(o.location.hash=n||"",r("hashSet"))};a("init",(()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;i=!0;const e=o.location.hash.replace("#","");if(e){const n=0,r=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(r||0,n,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&&s.addEventListener("hashchange",l)})()})),a("destroy",(()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&s.removeEventListener("hashchange",l)})),a("transitionEnd _freeModeNoMomentumRelease",(()=>{i&&c()})),a("slideChange",(()=>{i&&t.params.cssMode&&c()}))},function(e){let t,n,{swiper:r,extendParams:a,on:i,emit:o,params:s}=e;r.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,u,p,d,f,h,m=s&&s.autoplay?s.autoplay.delay:3e3,v=s&&s.autoplay?s.autoplay.delay:3e3,g=(new Date).getTime;function y(e){r&&!r.destroyed&&r.wrapperEl&&e.target===r.wrapperEl&&(r.wrapperEl.removeEventListener("transitionend",y),S())}const b=()=>{if(r.destroyed||!r.autoplay.running)return;r.autoplay.paused?c=!0:c&&(v=l,c=!1);const e=r.autoplay.paused?l:g+v-(new Date).getTime();r.autoplay.timeLeft=e,o("autoplayTimeLeft",e,e/m),n=requestAnimationFrame((()=>{b()}))},w=e=>{if(r.destroyed||!r.autoplay.running)return;cancelAnimationFrame(n),b();let a=void 0===e?r.params.autoplay.delay:e;m=r.params.autoplay.delay,v=r.params.autoplay.delay;const i=(()=>{let e;if(e=r.virtual&&r.params.virtual.enabled?r.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:r.slides[r.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(i)&&i>0&&void 0===e&&(a=i,m=i,v=i),l=a;const s=r.params.speed,c=()=>{r&&!r.destroyed&&(r.params.autoplay.reverseDirection?!r.isBeginning||r.params.loop||r.params.rewind?(r.slidePrev(s,!0,!0),o("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(r.slides.length-1,s,!0,!0),o("autoplay")):!r.isEnd||r.params.loop||r.params.rewind?(r.slideNext(s,!0,!0),o("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(0,s,!0,!0),o("autoplay")),r.params.cssMode&&(g=(new Date).getTime(),requestAnimationFrame((()=>{w()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{c()}),a)):requestAnimationFrame((()=>{c()})),a},k=()=>{r.autoplay.running=!0,w(),o("autoplayStart")},_=()=>{r.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),o("autoplayStop")},E=(e,n)=>{if(r.destroyed||!r.autoplay.running)return;clearTimeout(t),e||(h=!0);const a=()=>{o("autoplayPause"),r.params.autoplay.waitForTransition?r.wrapperEl.addEventListener("transitionend",y):S()};if(r.autoplay.paused=!0,n)return f&&(l=r.params.autoplay.delay),f=!1,void a();const i=l||r.params.autoplay.delay;l=i-((new Date).getTime()-g),r.isEnd&&l<0&&!r.params.loop||(l<0&&(l=0),a())},S=()=>{r.isEnd&&l<0&&!r.params.loop||r.destroyed||!r.autoplay.running||(g=(new Date).getTime(),h?(h=!1,w(l)):w(),r.autoplay.paused=!1,o("autoplayResume"))},C=()=>{if(r.destroyed||!r.autoplay.running)return;const e=x();"hidden"===e.visibilityState&&(h=!0,E(!0)),"visible"===e.visibilityState&&S()},M=e=>{"mouse"===e.pointerType&&(h=!0,r.animating||r.autoplay.paused||E(!0))},T=e=>{"mouse"===e.pointerType&&r.autoplay.paused&&S()};i("init",(()=>{r.params.autoplay.enabled&&(r.params.autoplay.pauseOnMouseEnter&&(r.el.addEventListener("pointerenter",M),r.el.addEventListener("pointerleave",T)),x().addEventListener("visibilitychange",C),g=(new Date).getTime(),k())})),i("destroy",(()=>{r.el.removeEventListener("pointerenter",M),r.el.removeEventListener("pointerleave",T),x().removeEventListener("visibilitychange",C),r.autoplay.running&&_()})),i("beforeTransitionStart",((e,t,n)=>{!r.destroyed&&r.autoplay.running&&(n||!r.params.autoplay.disableOnInteraction?E(!0,!0):_())})),i("sliderFirstMove",(()=>{!r.destroyed&&r.autoplay.running&&(r.params.autoplay.disableOnInteraction?_():(u=!0,p=!1,h=!1,d=setTimeout((()=>{h=!0,p=!0,E(!0)}),200)))})),i("touchEnd",(()=>{if(!r.destroyed&&r.autoplay.running&&u){if(clearTimeout(d),clearTimeout(t),r.params.autoplay.disableOnInteraction)return p=!1,void(u=!1);p&&r.params.cssMode&&S(),p=!1,u=!1}})),i("slideChange",(()=>{!r.destroyed&&r.autoplay.running&&(f=!0)})),Object.assign(r.autoplay,{start:k,stop:_,pause:E,resume:S})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let a=!1,i=!1;function o(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const n=e.clickedIndex,r=e.clickedSlide;if(r&&r.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==n)return;let a;a=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):n,t.params.loop?t.slideToLoop(a):t.slideTo(a)}function s(){const{thumbs:e}=t.params;if(a)return!1;a=!0;const n=t.constructor;if(e.swiper instanceof n)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(O(e.swiper)){const r=Object.assign({},e.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new n(r),i=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",o),!0}function l(e){const n=t.thumbs.swiper;if(!n||n.destroyed)return;const r="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView;let a=1;const i=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(a=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(a=1),a=Math.floor(a),n.slides.forEach((e=>e.classList.remove(i))),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(let l=0;l<a;l+=1)R(n.slidesEl,`[data-swiper-slide-index="${t.realIndex+l}"]`).forEach((e=>{e.classList.add(i)}));else for(let l=0;l<a;l+=1)n.slides[t.realIndex+l]&&n.slides[t.realIndex+l].classList.add(i);const o=t.params.thumbs.autoScrollOffset,s=o&&!n.params.loop;if(t.realIndex!==n.realIndex||s){const a=n.activeIndex;let i,l;if(n.params.loop){const e=n.slides.filter((e=>e.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];i=n.slides.indexOf(e),l=t.activeIndex>t.previousIndex?"next":"prev"}else i=t.realIndex,l=i>t.previousIndex?"next":"prev";s&&(i+="next"===l?o:-1*o),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(i)<0&&(n.params.centeredSlides?i=i>a?i-Math.floor(r/2)+1:i+Math.floor(r/2)-1:i>a&&n.params.slidesPerGroup,n.slideTo(i,e?0:void 0))}}t.thumbs={swiper:null},r("beforeInit",(()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const n=x(),r=()=>{const r="string"==typeof e.swiper?n.querySelector(e.swiper):e.swiper;if(r&&r.swiper)e.swiper=r.swiper,s(),l(!0);else if(r){const n=a=>{e.swiper=a.detail[0],r.removeEventListener("init",n),s(),l(!0),e.swiper.update(),t.update()};r.addEventListener("init",n)}return r},a=()=>{if(t.destroyed)return;r()||requestAnimationFrame(a)};requestAnimationFrame(a)}else s(),l(!0)})),r("slideChange update resize observerUpdate",(()=>{l()})),r("setTransition",((e,n)=>{const r=t.thumbs.swiper;r&&!r.destroyed&&r.setTransition(n)})),r("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&i&&e.destroy()})),Object.assign(t.thumbs,{init:s,update:l})},function(e){let{swiper:t,extendParams:n,emit:r,once:a}=e;n({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){if(t.params.cssMode)return;const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){if(t.params.cssMode)return;const{touchEventsData:e,touches:n}=t;0===e.velocities.length&&e.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:P()})},onTouchEnd:function(e){let{currentPos:n}=e;if(t.params.cssMode)return;const{params:i,wrapperEl:o,rtlTranslate:s,snapGrid:l,touchEventsData:c}=t,u=P()-c.touchStartTime;if(n<-t.minTranslate())t.slideTo(t.activeIndex);else if(n>-t.maxTranslate())t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1);else{if(i.freeMode.momentum){if(c.velocities.length>1){const e=c.velocities.pop(),n=c.velocities.pop(),r=e.position-n.position,a=e.time-n.time;t.velocity=r/a,t.velocity/=2,Math.abs(t.velocity)<i.freeMode.minimumVelocity&&(t.velocity=0),(a>150||P()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*i.freeMode.momentumRatio;const n=t.velocity*e;let u=t.translate+n;s&&(u=-u);let p,d=!1;const f=20*Math.abs(t.velocity)*i.freeMode.momentumBounceRatio;let h;if(u<t.maxTranslate())i.freeMode.momentumBounce?(u+t.maxTranslate()<-f&&(u=t.maxTranslate()-f),p=t.maxTranslate(),d=!0,c.allowMomentumBounce=!0):u=t.maxTranslate(),i.loop&&i.centeredSlides&&(h=!0);else if(u>t.minTranslate())i.freeMode.momentumBounce?(u-t.minTranslate()>f&&(u=t.minTranslate()+f),p=t.minTranslate(),d=!0,c.allowMomentumBounce=!0):u=t.minTranslate(),i.loop&&i.centeredSlides&&(h=!0);else if(i.freeMode.sticky){let e;for(let t=0;t<l.length;t+=1)if(l[t]>-u){e=t;break}u=Math.abs(l[e]-u)<Math.abs(l[e-1]-u)||"next"===t.swipeDirection?l[e]:l[e-1],u=-u}if(h&&a("transitionEnd",(()=>{t.loopFix()})),0!==t.velocity){if(e=s?Math.abs((-u-t.translate)/t.velocity):Math.abs((u-t.translate)/t.velocity),i.freeMode.sticky){const n=Math.abs((s?-u:u)-t.translate),r=t.slidesSizesGrid[t.activeIndex];e=n<r?i.speed:n<2*r?1.5*i.speed:2.5*i.speed}}else if(i.freeMode.sticky)return void t.slideToClosest();i.freeMode.momentumBounce&&d?(t.updateProgress(p),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating=!0,q(o,(()=>{t&&!t.destroyed&&c.allowMomentumBounce&&(r("momentumBounce"),t.setTransition(i.speed),setTimeout((()=>{t.setTranslate(p),q(o,(()=>{t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(r("_freeModeNoMomentumRelease"),t.updateProgress(u),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,q(o,(()=>{t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(u),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(i.freeMode.sticky)return void t.slideToClosest();i.freeMode&&r("_freeModeNoMomentumRelease")}(!i.freeMode.momentum||u>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,n,r,a,{swiper:i,extendParams:o,on:s}=e;o({grid:{rows:1,fill:"column"}});const l=()=>{let e=i.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*i.size:"string"==typeof e&&(e=parseFloat(e)),e};s("init",(()=>{a=i.params.grid&&i.params.grid.rows>1})),s("update",(()=>{const{params:e,el:t}=i,n=e.grid&&e.grid.rows>1;a&&!n?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),r=1,i.emitContainerClasses()):!a&&n&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),i.emitContainerClasses()),a=n})),i.grid={initSlides:e=>{const{slidesPerView:a}=i.params,{rows:o,fill:s}=i.params.grid;r=Math.floor(e/o),t=Math.floor(e/o)===e/o?e:Math.ceil(e/o)*o,"auto"!==a&&"row"===s&&(t=Math.max(t,a*o)),n=t/o},updateSlide:(e,a,o,s)=>{const{slidesPerGroup:c}=i.params,u=l(),{rows:p,fill:d}=i.params.grid;let f,h,m;if("row"===d&&c>1){const n=Math.floor(e/(c*p)),r=e-p*c*n,i=0===n?c:Math.min(Math.ceil((o-n*p*c)/p),c);m=Math.floor(r/i),h=r-m*i+n*c,f=h+m*t/p,a.style.order=f}else"column"===d?(h=Math.floor(e/p),m=e-h*p,(h>r||h===r&&m===p-1)&&(m+=1,m>=p&&(m=0,h+=1))):(m=Math.floor(e/n),h=e-m*n);a.row=m,a.column=h,a.style[s("margin-top")]=0!==m?u&&`${u}px`:""},updateWrapperSize:(e,n,r)=>{const{centeredSlides:a,roundLengths:o}=i.params,s=l(),{rows:c}=i.params.grid;if(i.virtualSize=(e+s)*t,i.virtualSize=Math.ceil(i.virtualSize/c)-s,i.wrapperEl.style[r("width")]=`${i.virtualSize+s}px`,a){const e=[];for(let t=0;t<n.length;t+=1){let r=n[t];o&&(r=Math.floor(r)),n[t]<i.virtualSize+n[0]&&e.push(r)}n.splice(0,n.length),n.push(...e)}}}},function(e){let{swiper:t}=e;Object.assign(t,{appendSlide:xe.bind(t),prependSlide:Ce.bind(t),addSlide:Me.bind(t),removeSlide:Te.bind(t),removeAllSlides:Pe.bind(t)})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({fadeEffect:{crossFade:!1}}),Ae({effect:"fade",swiper:t,on:r,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let n=0;n<e.length;n+=1){const e=t.slides[n];let r=-e.swiperSlideOffset;t.params.virtualTranslate||(r-=t.translate);let a=0;t.isHorizontal()||(a=r,r=0);const i=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),o=Oe(0,e);o.style.opacity=i,o.style.transform=`translate3d(${r}px, ${a}px, 0px)`}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`})),Ie({swiper:t,duration:e,transformElements:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const a=(e,t,n)=>{let r=n?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),a=n?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");r||(r=j("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"left":"top")).split(" ")),e.append(r)),a||(a=j("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"right":"bottom")).split(" ")),e.append(a)),r&&(r.style.opacity=Math.max(-t,0)),a&&(a.style.opacity=Math.max(t,0))};Ae({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{el:e,wrapperEl:n,slides:r,width:i,height:o,rtlTranslate:s,size:l,browser:c}=t,u=t.params.cubeEffect,p=t.isHorizontal(),d=t.virtual&&t.params.virtual.enabled;let f,h=0;u.shadow&&(p?(f=t.wrapperEl.querySelector(".swiper-cube-shadow"),f||(f=j("div","swiper-cube-shadow"),t.wrapperEl.append(f)),f.style.height=`${i}px`):(f=e.querySelector(".swiper-cube-shadow"),f||(f=j("div","swiper-cube-shadow"),e.append(f))));for(let t=0;t<r.length;t+=1){const e=r[t];let n=t;d&&(n=parseInt(e.getAttribute("data-swiper-slide-index"),10));let i=90*n,o=Math.floor(i/360);s&&(i=-i,o=Math.floor(-i/360));const c=Math.max(Math.min(e.progress,1),-1);let f=0,m=0,v=0;n%4==0?(f=4*-o*l,v=0):(n-1)%4==0?(f=0,v=4*-o*l):(n-2)%4==0?(f=l+4*o*l,v=l):(n-3)%4==0&&(f=-l,v=3*l+4*l*o),s&&(f=-f),p||(m=f,f=0);const g=`rotateX(${p?0:-i}deg) rotateY(${p?i:0}deg) translate3d(${f}px, ${m}px, ${v}px)`;c<=1&&c>-1&&(h=90*n+90*c,s&&(h=90*-n-90*c)),e.style.transform=g,u.slideShadows&&a(e,c,p)}if(n.style.transformOrigin=`50% 50% -${l/2}px`,n.style["-webkit-transform-origin"]=`50% 50% -${l/2}px`,u.shadow)if(p)f.style.transform=`translate3d(0px, ${i/2+u.shadowOffset}px, ${-i/2}px) rotateX(90deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(h)-90*Math.floor(Math.abs(h)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=u.shadowScale,r=u.shadowScale/t,a=u.shadowOffset;f.style.transform=`scale3d(${n}, 1, ${r}) translate3d(0px, ${o/2+a}px, ${-o/2/r}px) rotateX(-90deg)`}const m=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-l/2:0;n.style.transform=`translate3d(0px,0,${m}px) rotateX(${t.isHorizontal()?0:h}deg) rotateY(${t.isHorizontal()?-h:0}deg)`,n.style.setProperty("--swiper-cube-translate-z",`${m}px`)},setTransition:e=>{const{el:n,slides:r}=t;if(r.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=n.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const n=Math.max(Math.min(t.progress,1),-1);a(t,n,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0}});const a=(e,n)=>{let r=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),a=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");r||(r=Ne("flip",e,t.isHorizontal()?"left":"top")),a||(a=Ne("flip",e,t.isHorizontal()?"right":"bottom")),r&&(r.style.opacity=Math.max(-n,0)),a&&(a.style.opacity=Math.max(n,0))};Ae({effect:"flip",swiper:t,on:r,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,r=t.params.flipEffect;for(let i=0;i<e.length;i+=1){const o=e[i];let s=o.progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(o.progress,1),-1));const l=o.swiperSlideOffset;let c=-180*s,u=0,p=t.params.cssMode?-l-t.translate:-l,d=0;t.isHorizontal()?n&&(c=-c):(d=p,p=0,u=-c,c=0),o.style.zIndex=-Math.abs(Math.round(s))+e.length,r.slideShadows&&a(o,s);const f=`translate3d(${p}px, ${d}px, 0px) rotateX(${u}deg) rotateY(${c}deg)`;Oe(0,o).style.transform=f}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let n=e.progress;t.params.flipEffect.limitRotation&&(n=Math.max(Math.min(e.progress,1),-1)),a(e,n)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Ae({effect:"coverflow",swiper:t,on:r,setTranslate:()=>{const{width:e,height:n,slides:r,slidesSizesGrid:a}=t,i=t.params.coverflowEffect,o=t.isHorizontal(),s=t.translate,l=o?e/2-s:n/2-s,c=o?i.rotate:-i.rotate,u=i.depth;for(let t=0,p=r.length;t<p;t+=1){const e=r[t],n=a[t],s=(l-e.swiperSlideOffset-n/2)/n,p="function"==typeof i.modifier?i.modifier(s):s*i.modifier;let d=o?c*p:0,f=o?0:c*p,h=-u*Math.abs(p),m=i.stretch;"string"==typeof m&&-1!==m.indexOf("%")&&(m=parseFloat(i.stretch)/100*n);let v=o?0:m*p,g=o?m*p:0,y=1-(1-i.scale)*Math.abs(p);Math.abs(g)<.001&&(g=0),Math.abs(v)<.001&&(v=0),Math.abs(h)<.001&&(h=0),Math.abs(d)<.001&&(d=0),Math.abs(f)<.001&&(f=0),Math.abs(y)<.001&&(y=0);const b=`translate3d(${g}px,${v}px,${h}px) rotateX(${f}deg) rotateY(${d}deg) scale(${y})`;if(Oe(0,e).style.transform=b,e.style.zIndex=1-Math.abs(Math.round(p)),i.slideShadows){let t=o?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),n=o?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");t||(t=Ne("coverflow",e,o?"left":"top")),n||(n=Ne("coverflow",e,o?"right":"bottom")),t&&(t.style.opacity=p>0?p:0),n&&(n.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>L(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const a=e=>"string"==typeof e?e:`${e}px`;Ae({effect:"creative",swiper:t,on:r,setTranslate:()=>{const{slides:e,wrapperEl:n,slidesSizesGrid:r}=t,i=t.params.creativeEffect,{progressMultiplier:o}=i,s=t.params.centeredSlides;if(s){const e=r[0]/2-t.params.slidesOffsetBefore||0;n.style.transform=`translateX(calc(50% - ${e}px))`}for(let l=0;l<e.length;l+=1){const n=e[l],r=n.progress,c=Math.min(Math.max(n.progress,-i.limitProgress),i.limitProgress);let u=c;s||(u=Math.min(Math.max(n.originalProgress,-i.limitProgress),i.limitProgress));const p=n.swiperSlideOffset,d=[t.params.cssMode?-p-t.translate:-p,0,0],f=[0,0,0];let h=!1;t.isHorizontal()||(d[1]=d[0],d[0]=0);let m={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};c<0?(m=i.next,h=!0):c>0&&(m=i.prev,h=!0),d.forEach(((e,t)=>{d[t]=`calc(${e}px + (${a(m.translate[t])} * ${Math.abs(c*o)}))`})),f.forEach(((e,t)=>{f[t]=m.rotate[t]*Math.abs(c*o)})),n.style.zIndex=-Math.abs(Math.round(r))+e.length;const v=d.join(", "),g=`rotateX(${f[0]}deg) rotateY(${f[1]}deg) rotateZ(${f[2]}deg)`,y=u<0?`scale(${1+(1-m.scale)*u*o})`:`scale(${1-(1-m.scale)*u*o})`,b=u<0?1+(1-m.opacity)*u*o:1-(1-m.opacity)*u*o,w=`translate3d(${v}) ${g} ${y}`;if(h&&m.shadow||!h){let e=n.querySelector(".swiper-slide-shadow");if(!e&&m.shadow&&(e=Ne("creative",n)),e){const t=i.shadowPerProgress?c*(1/i.limitProgress):c;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const k=Oe(0,n);k.style.transform=w,k.style.opacity=b,m.origin&&(k.style.transformOrigin=m.origin)}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Ae({effect:"cards",swiper:t,on:r,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:r}=t,a=t.params.cardsEffect,{startTranslate:i,isTouched:o}=t.touchEventsData,s=r?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],u=c.progress,p=Math.min(Math.max(u,-4),4);let d=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(d-=e[0].swiperSlideOffset);let f=t.params.cssMode?-d-t.translate:-d,h=0;const m=-100*Math.abs(p);let v=1,g=-a.perSlideRotate*p,y=a.perSlideOffset-.75*Math.abs(p);const b=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,w=(b===n||b===n-1)&&p>0&&p<1&&(o||t.params.cssMode)&&s<i,k=(b===n||b===n+1)&&p<0&&p>-1&&(o||t.params.cssMode)&&s>i;if(w||k){const e=(1-Math.abs((Math.abs(p)-.5)/.5))**.5;g+=-28*p*e,v+=-.5*e,y+=96*e,h=-25*e*Math.abs(p)+"%"}if(f=p<0?`calc(${f}px ${r?"-":"+"} (${y*Math.abs(p)}%))`:p>0?`calc(${f}px ${r?"-":"+"} (-${y*Math.abs(p)}%))`:`${f}px`,!t.isHorizontal()){const e=h;h=f,f=e}const _=p<0?""+(1+(1-v)*p):""+(1-(1-v)*p),E=`\n translate3d(${f}, ${h}, ${m}px)\n rotateZ(${a.rotate?r?-g:g:0}deg)\n scale(${_})\n `;if(a.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=Ne("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(p)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(u))+e.length;Oe(0,c).style.transform=E}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];_e.use(De);var __=i.__,ze="wp-block-newspack-blocks-carousel__autoplay-playing";function Le(e,t){Array.prototype.forEach.call(e,t)}function Re(e){e&&(e.setAttribute("aria-hidden","false"),Le(e.querySelectorAll("a"),(function(e){return e.removeAttribute("tabindex")})))}function je(e){e&&(e.setAttribute("aria-hidden","true"),Le(e.querySelectorAll("a"),(function(e){return e.setAttribute("tabindex","-1")})))}var Be=n(2089),Fe=n(1149),$e=i.__,He=function(e){(0,l.Z)(n,e);var t=(0,c.Z)(n);function n(e){var a;return(0,o.Z)(this,n),(a=t.call(this,e)).btnPlayRef=(0,r.createRef)(),a.btnPauseRef=(0,r.createRef)(),a.btnNextRef=(0,r.createRef)(),a.btnPrevRef=(0,r.createRef)(),a.carouselRef=(0,r.createRef)(),a.paginationRef=(0,r.createRef)(),a.state={swiperInitialized:!1},a}return(0,s.Z)(n,[{key:"componentDidMount",value:function(){this.initializeSwiper(0),this.props.triggerReflow()}},{key:"componentDidUpdate",value:function(e){if(!(0<this.carouselRef.current.offsetWidth&&0<this.carouselRef.current.offsetHeight))return!1;if(!this.state.swiperInitialized)return this.initializeSwiper(0);(0,Fe.Ou)(e,this.props)&&this.props.triggerReflow();var t=this.props,n=t.attributes,r=t.latestPosts;if(!(0,u.isEqual)(e.latestPosts,r)||!(0,u.isEqual)(e.attributes,n)){var a=0;this.swiperInstance&&(r&&this.swiperInstance.realIndex<r.length&&(a=this.swiperInstance.realIndex),this.setState({swiperInitialized:!1}),this.swiperInstance.destroy(!0,!0)),this.initializeSwiper(a)}}},{key:"componentWillUnmount",value:function(){this.props.triggerReflow()}},{key:"initializeSwiper",value:function(e){var t=this.props.latestPosts;if(t&&t.length){var n=this.props.attributes,r=n.aspectRatio,a=n.autoplay,o=n.delay,s=n.slidesPerView,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0<e.container.offsetWidth&&0<e.container.offsetHeight))return!1;var n=new _e(e.container,{a11y:!1,autoplay:!!t.autoplay&&{delay:t.delay,disableOnInteraction:!1},effect:"slide",grabCursor:!0,init:!1,initialSlide:t.initialSlide||0,loop:!0,navigation:{nextEl:e.next,prevEl:e.prev},pagination:{bulletElement:"button",clickable:!0,el:e.pagination,type:"bullets",renderBullet:function(e,t){return'<button class="'.concat(t,'"><span>').concat((0,i.sprintf)(__("Slide %s","newspack-blocks"),e+1),"</span></button>")}},watchSlidesProgress:t.slidesPerView>1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,slidesPerView:t.slidesPerView,spaceBetween:16,touchStartPreventDefault:!1,breakpoints:{320:{slidesPerView:1},782:{slidesPerView:t.slidesPerView>1?2:1},1168:{slidesPerView:t.slidesPerView}},on:{init:function(){Le(this.wrapperEl.querySelectorAll(".swiper-slide"),(function(e){return je(e)})),r.call(this),Re(this.slides[this.activeIndex])},slideChange:function(){var e,t=this.slides[this.activeIndex];if(je(this.slides[this.previousIndex]),Re(t),null===(e=this.autoplay)||void 0===e||!e.running){var n,r,a=t.querySelector("img"),o=!!a&&(null==a?void 0:a.alt),s=(0,i.sprintf)(__("Slide %1$s of %2$s","newspack-blocks"),this.realIndex+1,(null===(n=this.pagination)||void 0===n||null===(r=n.bullets)||void 0===r?void 0:r.length)||0);(0,w.speak)((0,k.escapeHTML)("".concat(t.innerText,",\n\t\t\t\t\t\t\t").concat(o?(0,i.sprintf)(__("Image: %s, ","newspack-blocks"),o):"","\n\t\t\t\t\t\t\t").concat(s)),"assertive")}}}});function r(){var e=t.aspectRatio;Array.from(this.slides).forEach((function(t){t.style.height="".concat(t.clientWidth*e,"px")}))}if(n.on("imagesReady",r),n.on("resize",r),t.autoplay){var a=function(){n.autoplay.stop(),e.play.focus()},o=function(){n.autoplay.start(),e.pause.focus()};n.on("init",(function(){e.play.addEventListener("click",o),e.pause.addEventListener("click",a)})),n.on("autoplayStart",(function(){e.block.classList.add(ze),(0,w.speak)(__("Playing","newspack-blocks"),"assertive")})),n.on("autoplayStop",(function(){e.block.classList.remove(ze),(0,w.speak)(__("Paused","newspack-blocks"),"assertive")})),n.on("beforeDestroy",(function(){e.play.removeEventListener("click",o),e.pause.removeEventListener("click",a)}))}return n.init(),n}({block:this.carouselRef.current,container:this.carouselRef.current,next:this.btnNextRef.current,prev:this.btnPrevRef.current,play:this.btnPlayRef.current,pause:this.btnPauseRef.current,pagination:this.paginationRef.current},{aspectRatio:r,autoplay:a,delay:1e3*o,initialSlide:e,slidesPerView:s<=t.length?s:t.length});l&&(this.swiperInstance=l,this.setState({swiperInitialized:!0}))}}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,i=e.setAttributes,o=e.latestPosts,s=e.isUIDisabled,l=t.aspectRatio,c=t.authors,u=t.autoplay,p=t.categories,m=t.includeSubcategories,v=t.customTaxonomies,w=t.delay,k=t.hideControls,_=t.imageFit,E=t.postsToShow,S=t.postType,x=t.showCategory,C=t.showDate,M=t.showAuthor,T=t.showAvatar,P=t.showTitle,A=t.slidesPerView,O=t.specificMode,I=t.specificPosts,N=t.tags,D=d()(n,"wp-block-newspack-blocks-carousel","wpnbpc","slides-per-view-"+A,"swiper",{"wp-block-newspack-blocks-carousel__autoplay-playing":u,"newspack-block--disabled":s,"hide-controls":k}),z=(0,h.__experimentalGetSettings)().formats.date,L=o&&!o.length,R=o&&1===o.length,j=o?Math.min(E,o.length):E,B=[{value:1,label:$e("Square","newspack-blocks"),shortName:$e("1:1","newspack-blocks")},{value:.75,label:$e("4:3","newspack-blocks"),shortName:$e("4:3","newspack-blocks")},{value:.5625,label:$e("16:9","newspack-blocks"),shortName:$e("16:9","newspack-blocks")},{value:4/3,label:$e("3:4","newspack-blocks"),shortName:$e("3:4","newspack-blocks")},{value:16/9,label:$e("9:16","newspack-blocks"),shortName:$e("9:16","newspack-blocks")}];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:D,ref:this.carouselRef},L&&(0,r.createElement)(a.Placeholder,{className:"component-placeholder__align-center"},(0,r.createElement)("div",{style:{margin:"auto"}},$e("Sorry, no posts were found."))),(!this.state.swiperInitialized||!o)&&(0,r.createElement)(a.Placeholder,{icon:(0,r.createElement)(a.Spinner,null),className:"component-placeholder__align-center"}),o&&(0,r.createElement)(r.Fragment,null,u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{ref:this.btnPauseRef}),(0,r.createElement)("button",{ref:this.btnPlayRef})),(0,r.createElement)("div",{className:"swiper-wrapper"},o.map((function(e){return(0,r.createElement)("article",{className:"post-has-image swiper-slide ".concat(e.post_type," ").concat(e.newspack_article_classes||""),key:e.id},(0,Be.fC)(e),(0,r.createElement)("figure",{className:"post-thumbnail"},(0,r.createElement)("a",{href:"#",rel:"bookmark"},e.newspack_featured_image_src?(0,r.createElement)("img",{className:"image-fit-".concat(_),src:e.newspack_featured_image_src.large,alt:""}):(0,r.createElement)("div",{className:"wp-block-newspack-blocks-carousel__placeholder"}))),(e.newspack_post_sponsors||x||P||M||C)&&(0,r.createElement)("div",{className:"entry-wrapper"},(e.newspack_post_sponsors||x&&0<e.newspack_category_info.length)&&(0,r.createElement)("div",{className:"cat-links"+(e.newspack_post_sponsors?" sponsor-label":"")},e.newspack_post_sponsors&&(0,r.createElement)("span",{className:"flag"},e.newspack_post_sponsors[0].flag),x&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_categories)&&(0,r.createElement)(r.RawHTML,null,(0,g.decodeEntities)(e.newspack_category_info))),P&&(0,r.createElement)("h3",{className:"entry-title"},(0,r.createElement)("a",{href:"#"},(0,g.decodeEntities)(e.title.rendered.trim()))),(0,r.createElement)("div",{className:"entry-meta"},e.newspack_post_sponsors&&(0,r.createElement)("span",{className:"entry-sponsors ".concat(e.newspack_sponsors_show_author?"plus-author":"")},(0,Be.b2)(e.newspack_post_sponsors),(0,Be.Q$)(e.newspack_post_sponsors)),M&&T&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_author)&&(0,Be.lW)(e.newspack_author_info),M&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_author)&&(0,Be.FX)(e.newspack_author_info),C&&(0,r.createElement)("time",{className:"entry-date published",key:"pub-date"},(0,h.dateI18n)(z,e.date)))))}))),!L&&!R&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{className:"swiper-button-prev",ref:this.btnPrevRef}),(0,r.createElement)("button",{className:"swiper-button-next",ref:this.btnNextRef}),(0,r.createElement)("div",{className:"swiper-pagination swiper-pagination-bullets",ref:this.paginationRef})))),(0,r.createElement)(f.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:$e("Display Settings"),initialOpen:!0},E&&(0,r.createElement)(y.Z,{numberOfItems:E,onNumberOfItemsChange:function(e){return i({postsToShow:e||1})},authors:c,onAuthorsChange:function(e){return i({authors:e})},categories:p,onCategoriesChange:function(e){return i({categories:e})},includeSubcategories:m,onIncludeSubcategoriesChange:function(e){return i({includeSubcategories:e})},tags:N,onTagsChange:function(e){return i({tags:e})},onCustomTaxonomiesChange:function(e){return i({customTaxonomies:e})},customTaxonomies:v,specificMode:O,onSpecificModeChange:function(e){return i({specificMode:e})},specificPosts:I,onSpecificPostsChange:function(e){return i({specificPosts:e})},postType:S})),(0,r.createElement)(a.PanelBody,{title:$e("Slideshow Settings"),initialOpen:!0},(0,r.createElement)(a.BaseControl,{label:$e("Slide Aspect Ratio","newspack-blocks"),help:$e("All slides will share the same aspect ratio, for consistency.","newspack-popups"),id:"newspack-blocks__aspect-ratio-control"},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ButtonGroup,{id:"newspack-blocks__aspect-ratio-control-buttons","aria-label":$e("Slide Aspect Ratio","newspack-blocks")},B.map((function(e){var t=l===e.value;return(0,r.createElement)(a.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return i({aspectRatio:e.value})}},e.shortName)}))))),(0,r.createElement)(a.BaseControl,{label:$e("Image Fit","newspack-blocks"),help:$e("cover"===_?"The image will fill the entire slide and will be cropped if necessary.":"The image will be resized to fit inside the slide without being cropped.","newspack-popups"),id:"newspack-blocks__blocks__image-fit-control"},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ButtonGroup,{id:"newspack-blocks__image-fit-buttons","aria-label":$e("Image Fit","newspack-blocks")},(0,r.createElement)(a.Button,{isPrimary:"cover"===_,"aria-pressed":"cover"===_,"aria-label":$e("Cover","newspack-blocks"),onClick:function(){return i({imageFit:"cover"})}},$e("Cover","newspack-blocks")),(0,r.createElement)(a.Button,{isPrimary:"contain"===_,"aria-pressed":"contain"===_,"aria-label":$e("Contain","newspack-blocks"),onClick:function(){return i({imageFit:"contain"})}},$e("Contain","newspack-blocks"))))),(0,r.createElement)(a.ToggleControl,{label:$e("Hide Controls"),help:$e("Hide the slideshow UI. Useful when used with Autoplay."),checked:k,onChange:function(e){i({hideControls:e})}}),(0,r.createElement)(a.ToggleControl,{label:$e("Autoplay"),help:$e("Autoplay between slides"),checked:u,onChange:function(e){i({autoplay:e})}}),u&&(0,r.createElement)(a.RangeControl,{label:$e("Delay between transitions (in seconds)"),value:w,onChange:function(e){i({delay:e})},min:1,max:20}),o&&1<o.length&&(0,r.createElement)(a.RangeControl,{label:$e("Number of slides to show at once"),value:A<=o.length?A:o.length,onChange:function(e){i({slidesPerView:e})},min:1,max:O?Math.min(6,o.length):Math.min(6,j)})),(0,r.createElement)(a.PanelBody,{title:$e("Article Meta Settings","newspack-blocks")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Title","newspack-blocks"),checked:P,onChange:function(){return i({showTitle:!P})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Date","newspack-blocks"),checked:C,onChange:function(){return i({showDate:!C})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Category","newspack-blocks"),checked:x,onChange:function(){return i({showCategory:!x})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Author","newspack-blocks"),checked:M,onChange:function(){return i({showAuthor:!M})}})),M&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Author Avatar","newspack-blocks"),checked:T,onChange:function(){return i({showAvatar:!T})}}))),(0,r.createElement)(b.L,{attributes:t,setAttributes:i}),(0,r.createElement)(b.H,{attributes:t,setAttributes:i})))}}]),n}(r.Component);const qe=(0,v.compose)([(0,m.withSelect)(Fe.b9),(0,m.withDispatch)(Fe.eL)])(He);var Ze=i.__,Ve="carousel",Ue={title:Ze("Post Carousel"),icon:{src:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"M7 18V6a2 2 0 012-2h6a2 2 0 012 2v12a2 2 0 01-2 2H9a2 2 0 01-2-2zM8.5 6v12a.5.5 0 00.5.5h6a.5.5 0 00.5-.5V6a.5.5 0 00-.5-.5H9a.5.5 0 00-.5.5z",fillRule:"evenodd"}),(0,r.createElement)(a.Path,{d:"M4 18.5v-13h1.5v13zM18.5 5.5v13H20v-13z"})),foreground:"#36f"},category:"newspack",keywords:[Ze("posts"),Ze("slideshow"),Ze("carousel")],description:Ze("A carousel of posts."),attributes:{className:{type:"string"},imageFit:{type:"string",default:"cover"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:5},postsToShow:{type:"integer",default:3},authors:{type:"array"},categories:{type:"array"},includeSubcategories:{type:"boolean",default:!0},tags:{type:"array"},customTaxonomies:{type:"array"},showDate:{type:"boolean",default:!0},showAuthor:{type:"boolean",default:!0},showAvatar:{type:"boolean",default:!0},showCategory:{type:"boolean",default:!1},showTitle:{type:"boolean",default:!0},postType:{type:"array",default:["post"],items:{type:"string"}},specificMode:{type:"boolean",default:!1},specificPosts:{type:"array",default:[],items:{type:"integer"}},slidesPerView:{type:"number",default:1},hideControls:{type:"boolean",default:!1},aspectRatio:{type:"number",default:.75},includedPostStatuses:{type:"array",default:["publish"],items:{type:"string"}}},supports:{html:!1,align:["center","wide","full"]},edit:qe,save:function(){return null}}},6573:(e,t,n)=>{"use strict";var r=n(2694),a=n(4981),i=n(1413),o=n(9307),s=n(1984),l=n(444);const c=(0,o.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));var u=n(9062),p=n(7462),d=n(4942),f=n(3324),h=n(181);var m=n(4184),v=n.n(m),g=n(2819),y=n(5736),b=n(2175),w=n(5609),k=n(6989),_=n.n(k),E=n(5189),__=y.__;function S(e){var t,n=[],r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,h.Z)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(e.attributes);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push(a.name+": "+a.option)}}catch(i){r.e(i)}finally{r.f()}return n.join(", ")}function x(e){var t,n,r,a,i,o,s;return{isNYP:null==e||null===(t=e.meta_data)||void 0===t?void 0:t.some((function(e){return"_nyp"===e.key&&"yes"===e.value})),suggestedPrice:null==e||null===(n=e.meta_data)||void 0===n||null===(r=n.find((function(e){return"_suggested_price"===e.key})))||void 0===r?void 0:r.value,minPrice:null==e||null===(a=e.meta_data)||void 0===a||null===(i=a.find((function(e){return"_min_price"===e.key})))||void 0===i?void 0:i.value,maxPrice:null==e||null===(o=e.meta_data)||void 0===o||null===(s=o.find((function(e){return"_maximum_price"===e.key})))||void 0===s?void 0:s.value}}function C(e){var t=e.selectedWidth,n=e.setAttributes;return(0,o.createElement)(w.PanelBody,{title:__("Width settings","newspack-blocks")},(0,o.createElement)(w.ButtonGroup,{"aria-label":__("Button width","newspack-blocks")},[25,50,75,100].map((function(e){return(0,o.createElement)(w.Button,{key:e,size:"small",variant:e===t?"primary":void 0,onClick:function(){var r;n({width:t===(r=e)?void 0:r})}},e,"%")}))))}function M(e){var t=(0,o.useState)(!1),n=(0,f.Z)(t,2),r=n[0],a=n[1],i=(0,o.useState)({}),s=(0,f.Z)(i,2),l=s[0],c=s[1],u=(0,o.useState)(!1),p=(0,f.Z)(u,2),h=p[0],m=p[1],v=(0,o.useState)(!1),y=(0,f.Z)(v,2),b=y[0],k=y[1];(0,o.useEffect)((function(){k(!1),e.value?(a(!0),_()({path:"/wc/v2/products/".concat(e.value)}).then((function(t){c((0,d.Z)({},t.id,"".concat(t.id,": ").concat(t.name))),m(t),e.onProduct(t)})).finally((function(){return a(!1)}))):m(!1)}),[e.value]);var E=(0,g.debounce)((function(e){return a(!0),_()({path:"/wc/v2/products?search=".concat(encodeURIComponent(e))}).then((function(e){var t={};e.forEach((function(e){t[e.id]="".concat(e.id,": ").concat(e.name)})),c(t)})).finally((function(){return a(!1)}))}),200);return e.value&&!h&&r?(0,o.createElement)(w.Spinner,null):(0,o.createElement)("div",{className:"newspack-checkout-button__product-field"},h&&!b?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(w.BaseControl,{className:"newspack-checkout-button__product-field__selected",help:__("Click to change the selected product","newspack-blocks")},(0,o.createElement)(w.Button,{isSecondary:!0,onClick:function(){return k(!0)},"aria-label":__("Change the selected product","newspack-blocks")},h.name)),e.children):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"newspack-checkout-button__product-field__tokenfield"},(0,o.createElement)(w.FormTokenField,{placeholder:e.placeholder||__("Type to search for a product…","newspack-blocks"),label:__("Select a product","newspack-blocks"),maxLength:1,onChange:function(t){var n=t[0],r=(0,g.invert)(l)[n];k(!1),e.onChange(r)},onInputChange:function(e){e.length>2?(a(!0),E(e)):a(!1)},suggestions:Object.values(l)}),r&&(0,o.createElement)(w.Spinner,null)),h&&(0,o.createElement)(w.Button,{isSecondary:!0,onClick:function(){return k(!1)}},__("Cancel","newspack-blocks"))))}const T=function(e){var t,n,r,a=e.attributes,s=e.setAttributes,l=e.className,c=a.placeholder,h=a.style,m=a.text,g=a.product,y=a.price,k=a.variation,T=a.width,P=(0,o.useState)({}),A=(0,f.Z)(P,2),O=A[0],I=A[1],N=(0,o.useState)([]),D=(0,f.Z)(N,2),z=D[0],L=D[1],R=(0,o.useState)(!1),j=(0,f.Z)(R,2),B=j[0],F=j[1];(0,o.useEffect)((function(){k?_()({path:"/wc/v2/products/".concat(g,"/variations/").concat(k)}).then((function(e){return F(x(e))})).catch((function(){return F({})})):F(x(O))}),[k]),(0,o.useEffect)((function(){!y&&null!=B&&B.suggestedPrice&&s({price:B.suggestedPrice})}),[B]);var $=(0,b.__experimentalUseBorderProps)(a),H=(0,b.__experimentalUseColorProps)(a),q=(0,b.__experimentalGetSpacingClassesAndStyles)(a),Z=(0,b.useBlockProps)();return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",(0,p.Z)({},Z,{className:v()(Z.className,(t={},(0,d.Z)(t,"wp-block-button",!0),(0,d.Z)(t,"has-custom-font-size",Z.style.fontSize),(0,d.Z)(t,"has-custom-width wp-block-button__width-".concat(T),T),t))}),(0,o.createElement)(b.RichText,{"aria-label":__("Button text"),placeholder:c||__("Add text…"),value:m,onChange:function(e){s({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:v()(l,"wp-block-button__link","wp-block-newspack-blocks-checkout-button__button",H.className,$.className,{"no-border-radius":0===(null==h||null===(n=h.border)||void 0===n?void 0:n.radius)}),style:(0,i.Z)((0,i.Z)((0,i.Z)({},$.style),H.style),q.style),identifier:"text"})),(0,o.createElement)(b.InspectorControls,null,(0,o.createElement)(w.PanelBody,{title:__("Product","newspack-blocks")},(0,o.createElement)(M,{value:g,price:y,onChange:function(e){return s({product:e,variation:"",price:""})},onProduct:function(e){var t;I(e),null!=e&&null!==(t=e.variations)&&void 0!==t&&t.length?(s({is_variable:!0}),_()({path:"/wc/v2/products/".concat(e.id,"/variations?per_page=100")}).then((function(e){return L(e)})).catch((function(){return L([])}))):(s({is_variable:!1}),L([])),k||F(x(e))}},(null==O||null===(r=O.variations)||void 0===r?void 0:r.length)>0&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(w.CheckboxControl,{label:__("Allow the reader to select the variation before checkout.","newspack-blocks"),checked:!k,onChange:function(e){return s({variation:e?"":z[0].id.toString(),price:""})}}),z.length?(0,o.createElement)(w.SelectControl,{label:__("Variation","newspack-blocks"),help:__("Select the product variation to be added to cart.","newspack-blocks"),value:k,disabled:!k,options:[{label:"--",value:""}].concat((0,u.Z)(z.map((function(e){return{label:S(e),value:e.id}})))),onChange:function(e){return s({variation:e.toString(),price:""})}}):(0,o.createElement)(w.Spinner,null)))),(0,o.createElement)(w.PanelBody,{title:__("After purchase","newspack-blocks")},(0,o.createElement)(E.Z,{setAttributes:s,attributes:a})),(null==B?void 0:B.isNYP)&&(0,o.createElement)(w.PanelBody,{title:__("Name Your Price","newspack-blocks")},(0,o.createElement)("p",null,__('This product has "Name Your Price" toggled on. You can set the custom price for this checkout.',"newspack-blocks")),(0,o.createElement)("p",null,(0,o.createElement)("strong",null,__("Suggested price:","newspack-blocks"))," ",B.suggestedPrice||0,B.minPrice&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("br",null),(0,o.createElement)("strong",null,__("Minimum price:","newspack-blocks"))," ",B.minPrice),B.maxPrice&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("br",null),(0,o.createElement)("strong",null,__("Maximum price:","newspack-blocks"))," ",B.maxPrice)),(0,o.createElement)(w.TextControl,{type:"number",label:__("Custom Price","newspack-blocks"),placeholder:B.suggestedPrice,value:y,min:parseFloat(B.minPrice)||null,max:parseFloat(B.maxPrice)||null,onChange:function(e){return s({price:e})}}))),(0,o.createElement)(b.InspectorControls,null,(0,o.createElement)(C,{selectedWidth:T,setAttributes:s})))},P=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"newspack-blocks/checkout-button","title":"Checkout Button","category":"newspack","description":"Modal checkout button for WooCommerce products.","keywords":["woocommerce","product","checkout","button"],"textdomain":"newspack-blocks","attributes":{"product":{"type":"string"},"variation":{"type":"string"},"is_variable":{"type":"boolean","default":false},"price":{"type":"string"},"text":{"type":"string"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"align":["center","wide"],"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"newspack-checkout-button-editor","style":"newspack-checkout-block-button"}');var A=P.name,O=(0,i.Z)((0,i.Z)({},P),{},{icon:{src:(0,o.createElement)(s.Z,{icon:c}),foreground:"#36f"},edit:T,save:function(e){var t,n,r,a,s=e.attributes,l=e.className,c=s.textAlign,u=s.fontSize,p=s.style,f=s.text,h=s.product,m=s.price,g=s.variation,y=s.is_variable,w=s.width;if(!f||!h)return null;var k=(0,b.__experimentalGetBorderClassesAndStyles)(s),_=(0,b.__experimentalGetColorClassesAndStyles)(s),E=(0,b.__experimentalGetSpacingClassesAndStyles)(s),S=v()("wp-block-button__link",_.className,k.className,(n={},(0,d.Z)(n,"has-text-align-".concat(c),c),(0,d.Z)(n,"no-border-radius",0===(null==p||null===(t=p.border)||void 0===t?void 0:t.radius)),n)),x=(0,i.Z)((0,i.Z)((0,i.Z)({},k.style),_.style),E.style),C=v()(l,(a={},(0,d.Z)(a,"has-custom-font-size",u||(null==p||null===(r=p.typography)||void 0===r?void 0:r.fontSize)),(0,d.Z)(a,"has-custom-width wp-block-button__width-".concat(w),w),a));return(0,o.createElement)("div",b.useBlockProps.save({className:C}),(0,o.createElement)("form",null,(0,o.createElement)(b.RichText.Content,{tagName:"button",className:S,style:x,value:f}),(0,o.createElement)("input",{type:"hidden",name:"product_id",value:h}),(0,o.createElement)("input",{type:"hidden",name:"newspack_checkout",value:"1"}),m&&(0,o.createElement)("input",{type:"hidden",name:"price",value:m}),g&&(0,o.createElement)("input",{type:"hidden",name:"variation_id",value:g}),y&&(0,o.createElement)("input",{type:"hidden",name:"is_variable",value:"1"}),s.afterSuccessBehavior&&(0,o.createElement)("input",{type:"hidden",name:"after_success_behavior",value:s.afterSuccessBehavior}),s.afterSuccessButtonLabel&&(0,o.createElement)("input",{type:"hidden",name:"after_success_button_label",value:s.afterSuccessButtonLabel}),s.afterSuccessBehavior&&(0,o.createElement)("input",{type:"hidden",name:"after_success_url",value:s.afterSuccessURL||""})))}});(0,a.registerBlockType)(A,O),(0,r.addFilter)("blockEditor.useSetting.before","newspack-blocks/add-border-radius-support",(function(e,t,n,r){return"border.radius"===t&&"newspack-blocks/checkout-button"===r||e}))},1167:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),i=n(5609),o=n(5736),s=n(444);const l=(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));var c=n(4942),u=n(7462),p=n(1413),d=n(3324),f=n(4184),h=n.n(f),m=n(989),v=n(6989),g=n.n(v),y=n(2175),b=n(2819),w=function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return"#"+t+t+n+n+r+r})).substring(1).match(/.{2}/g);return null===t?[0,0,0]:t.map((function(e){return parseInt(e,16)}))},k=function(e){var t="#000000";if(void 0===e)return t;var n=w(e),r=w(t),a=.2126*Math.pow(n[0]/255,2.2)+.7152*Math.pow(n[1]/255,2.2)+.0722*Math.pow(n[2]/255,2.2),i=.2126*Math.pow(r[0]/255,2.2)+.7152*Math.pow(r[1]/255,2.2)+.0722*Math.pow(r[2]/255,2.2);return(a>i?(a+.05)/(i+.05):(i+.05)/(a+.05))>5?t:"#ffffff"},_=function(e,t,n){var r="month"===e?1:12;return[t[0]*r,t[1]*r,t[2]*r,n*r]},E=n(9062),__=o.__,S={once:__("One-time","newspack-blocks"),month:__("Monthly","newspack-blocks"),year:__("Annually","newspack-blocks")},x=Object.keys(S),C=[{label:__("Frequency","newspack-blocks"),key:"frequency"},{label:__("Tiers","newspack-blocks"),key:"tiers"}],M=o.__;const T=function(e){var t=e.amounts,n=e.availableFrequencies,r=e.attributes,i=(0,a.useState)(n[0]),o=(0,d.Z)(i,2),s=o[0],l=o[1],u=t[s].slice(0,3);(0,a.useEffect)((function(){l(n[0])}),[n.length]);var f=function(t,n){return function(a){var i=(0,E.Z)(r.tiersBasedOptions);i[t]=(0,p.Z)((0,p.Z)({},i[t]),{},(0,c.Z)({},n,a)),e.setAttributes({tiersBasedOptions:i})}},m=r.tiersBasedOptions.some((function(e){return Boolean(e.recommendLabel)}));return(0,a.createElement)("form",{className:"wpbnbd__tiers",onSubmit:function(e){return e.preventDefault()}},(0,a.createElement)("div",{className:"wpbnbd__tiers__selection"},n.map((function(e){var t=s===e;return(0,a.createElement)("button",{key:e,className:h()("wpbnbd__button",{"wpbnbd__button--active":t}),onClick:function(){return l(e)}},S[e])}))),(0,a.createElement)("div",{className:"wpbnbd__tiers__options"},u.map((function(t,n){var i=r.tiersBasedOptions[n].recommendLabel||"";return(0,a.createElement)("div",{key:n,className:h()("wpbnbd__tiers__tier",{"wpbnbd__tiers__tier--recommended":i.length})},(0,a.createElement)("div",{className:"wpbnbd__tiers__top"},(0,a.createElement)("h2",{className:"wpbnbd__tiers__heading"},(0,a.createElement)(y.RichText,{onChange:f(n,"heading"),placeholder:M("Heading…","newspack-blocks"),value:r.tiersBasedOptions[n].heading,tagName:"span"})),(0,a.createElement)("h3",{className:"wpbnbd__tiers__recommend-label",style:{opacity:i?1:.5}},(0,a.createElement)(y.RichText,{onChange:f(n,"recommendLabel"),placeholder:M("…","newspack-blocks"),value:i,tagName:"span"}))),(0,a.createElement)("div",{className:"wpbnbd__tiers__amount"},(0,a.createElement)("h3",{className:"wpbnbd__tiers__amount__number"},e.settings.currencySymbol,(0,a.createElement)("span",null,t)),(0,a.createElement)("span",{className:"wpbnbd__tiers__amount__frequency"}," ",function(e){switch(e){case"once":return M("once","newspack-blocks");case"month":return M("per month","newspack-blocks");case"year":return M("per year","newspack-blocks")}}(s))),(0,a.createElement)("div",{className:"submit-button",style:(0,p.Z)({appearance:"button",borderColor:r.buttonColor},m&&!i?{backgroundColor:"transparent",color:r.buttonColor}:{backgroundColor:r.buttonColor,color:k(r.buttonColor)})},(0,a.createElement)(y.RichText,{onChange:f(n,"buttonText"),placeholder:M("Button text…","newspack-blocks"),value:r.tiersBasedOptions[n].buttonText,tagName:"span"})),(0,a.createElement)("div",{className:"wpbnbd__tiers__description"},(0,a.createElement)(y.RichText,{onChange:f(n,"description"),placeholder:M("Description…","newspack-blocks"),value:r.tiersBasedOptions[n].description,tagName:"span"})))}))))};const P=function(e){var t=e.frequencySlug,n=e.tierIndex,r=e.id,i=e.label,o=e.attributes,s=e.settings,l=e.amounts,u=e.setAttributes,d=e.setSettings,f=e.disabled,h=e.ignoreMinimumAmount,m=l[t][n],v=s.minimumDonation&&!h?Math.max(m,s.minimumDonation):m;return(0,a.createElement)("span",{key:"".concat(t,"-").concat(n)},i&&(0,a.createElement)("label",{htmlFor:r},i),(0,a.createElement)("input",{type:"number",min:h?void 0:o.minimumDonation,onChange:function(e){return function(e){var t=e.value,r=e.frequency,a=o.manual?o:s;a.amounts[r][n]=parseFloat(t);var i={amounts:(0,p.Z)((0,c.Z)({},r,a.amounts[r]),a.amounts)};o.manual?u(i):d(i)}({value:e.target.value,frequency:t})},value:v,id:r,disabled:f}))},A=(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),O=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var I=n(3904),N=n(9630),D=o.__,z="newspack-blocks-additional-fields-editor",L=[["label",D("Label","newspack-blocks")],["name",D("Name","newspack-blocks"),D("Name of the field which will be sent to the payment procesor and other third parties. Field names must be unique.","newspack-blocks")]],R=function(e){var t=e.onEdit,n=e.onRemove,r=(0,a.useState)(!1),o=(0,d.Z)(r,2),s=o[0],l=o[1],c=function(){return l(!s)};return(0,a.createElement)("div",null,(0,a.createElement)(i.Button,{onClick:c,icon:A,label:D("Options","newspack-blocks")}),s&&(0,a.createElement)(m.J2,{position:"bottom left",onFocusOutside:c,onKeyDown:function(e){return N.ESCAPE===e.keyCode&&c},className:"".concat(z,"__options-popover")},(0,a.createElement)(i.MenuItem,{onClick:t,isLink:!0},D("Edit","newspack-blocks")),(0,a.createElement)(i.MenuItem,{isDestructive:!0,onClick:function(){n(),c()},isLink:!0},D("Remove","newspack-blocks"))))},j=function(e){var t=e.attributes,n=e.setAttributes,r=e.field,o=e.closeEditor,s=e.updateField;return(0,a.createElement)(a.Fragment,null,L.map((function(e){var n,o=(0,d.Z)(e,3),l=o[0],u=o[1],p=o[2],f=function(e){if("name"===e){var n=0===t.additionalFields.filter((function(e,t){var n=e.name;return t!==r.fieldIndex&&n===r.name})).length;return n?"":D("Name already exists.","newspack-blocks")}}(l);return(0,a.createElement)("div",{key:l},(0,a.createElement)(i.TextControl,{label:u,placeholder:u,value:r[l],onChange:s(l),className:h()((n={},(0,c.Z)(n,"".concat(z,"__field-edited--name"),"name"===l),(0,c.Z)(n,"".concat(z,"__field-edited--invalid"),f),n))}),f&&(0,a.createElement)("div",{className:"".concat(z,"__field-edited__validation-message")},f),p&&(0,a.createElement)("div",{className:"".concat(z,"__field-edited__help")},p))})),(0,a.createElement)(i.ToggleControl,{label:D("Required","newspack-blocks"),checked:r.isRequired,onChange:s("isRequired")}),(0,a.createElement)("div",{className:"".concat(z,"__field-edited__width")},(0,a.createElement)("div",null,D("Field width:","newspack-blocks")),(0,a.createElement)(i.ButtonGroup,null,[100,66.66,50,33.33].map((function(e){return(0,a.createElement)(i.Button,{key:e,onClick:function(){return s("width")(e)},isPrimary:r.width===e},Math.round(e),"%")})))),(0,a.createElement)("div",{className:"".concat(z,"__edit-buttons")},(0,a.createElement)(i.Button,{isLink:!0,onClick:o},D("Cancel","newspack-blocks")),!r.isNew&&(0,a.createElement)(i.Button,{variant:"secondary",isDestructive:!0,onClick:function(){n({additionalFields:t.additionalFields.filter((function(e){return e.name!==r.name}))}),o()}},D("Remove","newspack-blocks")),(0,a.createElement)(i.Button,{isPrimary:!0,onClick:function(){var e=(0,b.omit)(r,["isNew","fieldIndex"]);n({additionalFields:r.isNew?[].concat((0,E.Z)(t.additionalFields),[e]):t.additionalFields.map((function(t,n){return r.fieldIndex===n?e:t}))}),o()}},r.isNew?D("Save","newspack-blocks"):D("Update","newspack-blocks"))))};const B=function(e){var t=e.attributes,n=e.setAttributes,r=(0,a.useState)(null),o=(0,d.Z)(r,2),s=o[0],l=o[1],u=function(e,r){return function(){var a=t.additionalFields.filter((function(t,n){return n!==e}));n({additionalFields:[].concat((0,E.Z)(a.slice(0,r)),[t.additionalFields[e]],(0,E.Z)(a.slice(r)))})}};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,D("Collect additional data from donors by defining custom form fields.","newspack-blocks")),(0,a.createElement)("div",{className:z},t.additionalFields.map((function(e,r){return(0,a.createElement)("div",{key:r,className:"".concat(z,"__field")},(0,a.createElement)("div",{className:"".concat(z,"__field__left-section")},(0,a.createElement)("div",null,(0,a.createElement)(i.Button,{onClick:u(r,r-1),icon:O,label:D("Move up","newspack-blocks"),disabled:0===r}),(0,a.createElement)(i.Button,{onClick:u(r,r+1),icon:I.Z,label:D("Move down","newspack-blocks"),disabled:r===t.additionalFields.length-1})),(0,a.createElement)("span",null,e.label)),(0,a.createElement)(R,{onEdit:function(){return l((0,p.Z)((0,p.Z)({},e),{},{fieldIndex:r}))},onRemove:function(){return n({additionalFields:t.additionalFields.filter((function(e,t){return t!==r}))})}}))})),(0,a.createElement)(i.Button,{variant:"secondary",onClick:function(){var e={type:"text",name:"field-".concat(Math.random().toString(36).substring(2,7)),label:"Field ".concat(t.additionalFields.length),isRequired:!1,width:100,isNew:!0};l(e)}},D("Add data field","newspack-blocks"))),s&&(0,a.createElement)(m.u_,{className:"".concat(z,"__modal"),title:s.isNew?D("Add data field","newspack-blocks"):D("Edit data field","newspack-blocks"),onRequestClose:function(){return l(null)}},(0,a.createElement)(j,{field:s,setAttributes:n,attributes:t,closeEditor:function(){return l(null)},updateField:function(e){return function(t){l((0,p.Z)((0,p.Z)({},s),{},(0,c.Z)({},e,t)))}}})))};var F=o.__,$=[{label:F("Donate","newspack-blocks"),value:"donate"},{label:F("Pay","newspack-blocks"),value:"default"},{label:F("Book","newspack-blocks"),value:"book"},{label:F("Buy","newspack-blocks"),value:"buy"}];const H=function(e){var t,n=(0,a.useMemo)((function(){return Math.random().toString(16).slice(2)}),[]),r=e.attributes,o=e.settings,s=e.amounts,l=e.availableFrequencies,c=e.setAttributes,p=(0,a.useRef)(null);(0,a.useEffect)((function(){if(p.current&&(!Object.fromEntries(new FormData(p.current)).donation_frequency&&p.current.elements)){var e=p.current.elements[0];e instanceof HTMLInputElement&&e.click()}-1===l.indexOf(r.defaultFrequency)&&c({defaultFrequency:l[0]})}),[r.disabledFrequencies]),(0,a.useEffect)((function(){if(p.current){var e=p.current.querySelector('[name="donation_frequency"][value="'.concat(r.defaultFrequency,'"]'));e instanceof HTMLInputElement&&e.click()}}),[r.defaultFrequency]);var f=null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.is_rendering_stripe_payment_form,m=(0,a.useState)(r.defaultFrequency),v=(0,d.Z)(m,2),g=v[0],b=v[1],w=function(e){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"radio",value:e,id:"newspack-donate-".concat(e,"-").concat(n),name:"donation_frequency",checked:e===g,onChange:function(e){return b(e.target.value)}}),(0,a.createElement)("label",{htmlFor:"newspack-donate-"+e+"-"+n},S[e]))},_=function(e){return(0,a.createElement)("button",{key:e,role:"tab",className:h()("wpbnbd__button freq-label",{"wpbnbd__button--active":e===g}),id:"tab-newspack-donate-".concat(e,"-").concat(n),onClick:function(t){t.preventDefault(),b(e)}},S[e])},E=function(){return(0,a.createElement)("div",{className:"submit-button",style:{backgroundColor:r.buttonColor,color:k(r.buttonColor)}},f?(0,a.createElement)(y.RichText,{onChange:function(e){return c({buttonWithCCText:e})},placeholder:F("Button text…","newspack-blocks"),value:r.buttonWithCCText,tagName:"span"}):(0,a.createElement)(y.RichText,{onChange:function(e){return c({buttonText:e})},placeholder:F("Button text…","newspack-blocks"),value:r.buttonText,tagName:"span"}))},x=$.find((function(e){return e.value===r.paymentRequestType})),C=x?x.value:"donate";return(0,a.createElement)("form",{ref:p},e.isTiered?(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__options"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies"},(0,a.createElement)("div",{className:"tab-container"},l.map(_)),l.map((function(e){return(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",key:e},w(e),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__tiers tiers"},s[e].map((function(t,r){var i=3===r,s="newspack-tier-".concat(e,"-").concat(n,"-").concat(i?"other":r);return(0,a.createElement)("div",{className:h()("wp-block-newspack-blocks-donate__tier","wp-block-newspack-blocks-donate__tier--".concat(i?"other":"frequency")),key:r},(0,a.createElement)("input",{type:"radio",value:i?"other":t,className:i?"other-input":"frequency-input",id:s,name:"donation_value_".concat(e),defaultChecked:1===r}),(0,a.createElement)("label",{className:"tier-select-label tier-label",htmlFor:s},i?F("Other","newspack-blocks"):o.currencySymbol+t.toFixed(2).replace(/\.?0*$/,"")),i?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("label",{className:"odl",htmlFor:s+"-other-input"},F("Donation amount","newspack-blocks")),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input"},(0,a.createElement)("span",{className:"currency"},o.currencySymbol),(0,a.createElement)("input",{type:"number",readOnly:!0}))):null)}))))})))):(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__options"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies"},(0,a.createElement)("div",{className:"tab-container"},l.map(_)),l.map((function(t){return(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",key:t},w(t),(0,a.createElement)("div",{className:"input-container"},(0,a.createElement)("label",{className:"donate-label",htmlFor:"newspack-"+t+"-"+n+"-untiered-input"},F("Donation amount","newspack-blocks")),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input"},(0,a.createElement)("span",{className:"currency"},o.currencySymbol),(0,a.createElement)(P,(0,u.Z)({},e,{frequencySlug:t,tierIndex:3,id:"newspack-".concat(t,"-").concat(n,"-untiered-input")})))))})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",{className:"wp-block-newspack-blocks-donate__thanks thanks"},(0,a.createElement)(y.RichText,{onChange:function(e){return c({thanksText:e})},placeholder:F("Thank you text…","newspack-blocks"),value:r.thanksText,tagName:"span"})),f?(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__stripe stripe-payment"},(0,a.createElement)("div",{className:"stripe-payment__inputs"},(0,a.createElement)("input",{className:"stripe-payment__element stripe-payment__card",type:"text",placeholder:F("Card number","newspack-blocks")}),(0,a.createElement)("div",{className:"stripe-payment__row stripe-payment__row--flex"},(0,a.createElement)("input",{required:!0,placeholder:"Email",type:"email",name:"email"}),(0,a.createElement)("input",{required:!0,placeholder:"Full Name",type:"text",name:"full_name"})),(0,a.createElement)("div",{className:"stripe-payment__row stripe-payment__row--additional-fields"},r.additionalFields.map((function(e,t){return(0,a.createElement)("input",{key:t,type:"text",name:e.name,placeholder:e.label,style:{width:"calc(".concat(e.width,"% - 0.5rem)")}})})))),(0,a.createElement)("div",{className:"stripe-payment__row stripe-payment__row--flex stripe-payment__footer"},(0,a.createElement)("div",{className:"stripe-payment__methods"},(0,a.createElement)("div",{className:"stripe-payment__request-button"},(0,a.createElement)(i.SelectControl,{options:$,value:C,onChange:function(e){return c({paymentRequestType:e})}}),F("with Apple/Google Pay","newspack-blocks")),E()))):E()))};var q=n(5189),Z=o.__,V=[Z("Low-tier","newspack-blocks"),Z("Mid-tier","newspack-blocks"),Z("High-tier","newspack-blocks")];const U=function(e){var t=e.attributes,n=e.setAttributes,r=e.className,s=(0,a.useState)(!0),l=(0,d.Z)(s,2),f=l[0],v=l[1],w=(0,a.useState)(""),k=(0,d.Z)(w,2),E=k[0],M=k[1],A=m.PT.useObjectState({amounts:{},currencySymbol:"$",tiered:!1,disabledFrequencies:{},minimumDonation:5,platform:""}),O=(0,d.Z)(A,2),I=O[0],N=O[1];if((0,a.useEffect)((function(){g()({path:"/newspack/v1/wizard/newspack-reader-revenue-wizard/donations"}).then((function(e){if(N({amounts:e.amounts,currencySymbol:e.currencySymbol,tiered:e.tiered,disabledFrequencies:e.disabledFrequencies,minimumDonation:e.minimumDonation,platform:e.platform}),(0,b.isEmpty)(t.disabledFrequencies)&&n({disabledFrequencies:e.disabledFrequencies}),(0,b.isEmpty)(t.minimumDonation)&&n({minimumDonation:e.minimumDonation}),(0,b.isEmpty)(t.amounts)&&t.suggestedAmounts&&t.suggestedAmounts.length){var r=t.suggestedAmountUntiered||e.amounts.month[3];n({suggestedAmounts:void 0,suggestedAmountUntiered:void 0,amounts:{once:_("once",t.suggestedAmounts,r),month:_("month",t.suggestedAmounts,r),year:_("year",t.suggestedAmounts,r)}})}else n({amounts:(0,p.Z)((0,p.Z)({},e.amounts),t.amounts)})})).catch(M).finally((function(){return v(!1)}))}),[]),E.length)return(0,a.createElement)(i.Placeholder,{icon:"warning",label:Z("Error","newspack-blocks"),instructions:E},(0,a.createElement)(i.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},Z("Go to donation settings to troubleshoot.","newspack-blocks")));if("other"===I.platform)return(0,a.createElement)(i.Placeholder,{icon:"warning",label:Z("The Donate block will not be rendered.","newspack-blocks"),instructions:Z('The Reader Revenue platform is set to "other".',"newspack-blocks")},(0,a.createElement)(i.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},Z("Go to donation settings to update the platform.","newspack-blocks")));if(f)return(0,a.createElement)(i.Placeholder,{icon:(0,a.createElement)(i.Spinner,null),className:"component-placeholder__align-center"});var D=t.manual?t.tiered:I.tiered,z=D&&"tiers"===t.layoutOption,L=t.manual?t.amounts:I.amounts,R=x.filter((function(e){return t.manual?!t.disabledFrequencies[e]:!I.disabledFrequencies[e]}));-1===r.indexOf("is-style")&&(r+=" is-style-default");var j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return h()(e,r,"wpbnbd","wpbnbd--".concat(z?"tiers-based":"frequency-based"),"wpbnbd--platform-".concat(I.platform),"wpbnbd-frequencies--".concat(R.length))},F=t.manual?t.minimumDonation:I.minimumDonation,$=(0,p.Z)({},L);Object.keys(L).forEach((function(e){var t=L[e].map((function(e){return Math.max(e,F)}));$[e]=t}));var U={attributes:t,amounts:L,availableFrequencies:R,settings:I,setAttributes:n,setSettings:N},G=function(){return(0,a.createElement)("p",{className:"components-frequency-donations__error"},(0,o.sprintf)(Z("Warning: suggested donations should be at least the minimum donation amount (%1$s%2$d).","newspack-blocks"),I.currencySymbol,F))};return(0,a.createElement)(a.Fragment,null,z?(0,a.createElement)("div",{className:j()},(0,a.createElement)(T,(0,u.Z)({},U,{amounts:$}))):(0,a.createElement)("div",{className:j([D?"tiered":"untiered"])},(0,a.createElement)(H,(0,u.Z)({isTiered:D},U,{amounts:$}))),(0,a.createElement)(y.InspectorControls,null,(0,a.createElement)(i.PanelBody,{title:Z("Layout","newspack-blocks")},(0,a.createElement)("div",{className:"newspack-blocks-donate__layout-selector"},C.map((function(e){var t=e.label,r=e.key,o="tiers"===r?z:!z;return(0,a.createElement)(i.Button,{key:r,variant:o?"primary":"secondary",isPressed:o,onClick:function(){return n({layoutOption:r})},"aria-current":o,disabled:"tiers"===r&&!D},t)}))),!D&&(0,a.createElement)(i.Notice,{isDismissible:!1,className:"newspack-blocks-donate__notice"},Z("Tiers layout is disabled if the block is set to render untiered.","newspack-blocks")),!z&&(0,a.createElement)(i.SelectControl,{label:Z("Default Tab","newspack-blocks"),value:t.defaultFrequency,options:R.map((function(e){return{label:S[e],value:e}})),onChange:function(e){return n({defaultFrequency:e})}})),(0,a.createElement)(i.PanelBody,{title:Z("Suggested Donations","newspack-blocks")},(0,a.createElement)(i.ToggleControl,{checked:Boolean(t.manual),onChange:function(){return n({manual:!t.manual})},label:Z("Configure manually","newspack-blocks")}),t.manual?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.ToggleControl,{checked:Boolean(t.tiered),onChange:function(){return n({tiered:!t.tiered})},label:Z("Tiered","newspack-blocks")}),t.tiered?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-frequency-donations"},x.map((function(e){var r=t.disabledFrequencies[e],o=Object.values((0,b.pick)(t.disabledFrequencies,x)).filter(Boolean).length,s=x.length-o==1;return(0,a.createElement)(a.Fragment,{key:e},(0,a.createElement)(i.CheckboxControl,{label:S[e],checked:!r,disabled:!r&&s,onChange:function(){n({disabledFrequencies:(0,p.Z)((0,p.Z)({},t.disabledFrequencies),{},(0,c.Z)({},e,!r))})}}),!r&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs"},L[e].reduce((function(e,t){return t<F||e}),!1)&&G(),L[e].map((function(t,n){return 3===n?null:(0,a.createElement)(P,(0,u.Z)({ignoreMinimumAmount:!0},U,{key:"amount-".concat(e,"-").concat(n),frequencySlug:e,tierIndex:n,label:V[n],id:"".concat(e,"-").concat(n,"-amount"),disabled:z&&3===n}))}))))})))):(0,a.createElement)("div",{className:"components-frequency-donations"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs"},x.reduce((function(e,n){return L[n][3]<t.minimumDonation||e}),!1)&&G(),x.map((function(e){return(0,a.createElement)(P,(0,u.Z)({ignoreMinimumAmount:!0},U,{key:e,frequencySlug:e,tierIndex:3,label:S[e],id:"".concat(e,"-",3,"-amount")}))})))),(0,a.createElement)(i.TextControl,{className:"components-frequency-donations__minimum-donation",type:"number",label:Z("Minimum donation","newspack-blocks"),min:1,onChange:function(e){return n({minimumDonation:e})},value:t.minimumDonation})):(0,a.createElement)("p",null,Z("The Donate Block allows you to collect donations from readers. The fields are automatically defined based on your donation settings.","newspack-blocks"),(0,a.createElement)("br",null),(0,a.createElement)("br",null),(0,a.createElement)(i.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},Z("Edit donation settings","newspack-blocks")))),(0,a.createElement)(i.PanelBody,{title:Z("Styling","newspack-blocks"),initialOpen:!1},(0,a.createElement)(y.ColorPaletteControl,{value:t.buttonColor,onChange:function(e){return n({buttonColor:e})},label:Z("Button Color","newspack-blocks")})),"stripe"===I.platform&&(0,a.createElement)(i.PanelBody,{title:Z("Additional data fields","newspack-blocks"),initialOpen:!1},(0,a.createElement)(B,{attributes:t,setAttributes:n})),(0,a.createElement)(i.PanelBody,{title:Z("Campaign","newspack-blocks"),initialOpen:!1},(0,a.createElement)(i.TextControl,{label:Z("Campaign ID","newspack-blocks"),value:t.campaign||"",onChange:function(e){return n({campaign:e})}})),window.newspack_blocks_data.supports_recaptcha&&(0,a.createElement)(i.PanelBody,{title:Z("Spam protection","newspack")},(0,a.createElement)("p",null,(0,o.sprintf)(Z("reCAPTCHA v3 is currently %s.","newspack"),window.newspack_blocks_data.has_recaptcha?Z("enabled","newspack"):Z("disabled","newspack"))),!window.newspack_blocks_data.has_recaptcha&&(0,a.createElement)("p",null,Z("It's highly recommended that you enable reCAPTCHA v3 protection to prevent spambots from using this form!","newspack")),(0,a.createElement)("p",null,(0,a.createElement)("a",{href:window.newspack_blocks_data.recaptcha_url},Z("Configure your reCAPTCHA settings.","newspack")))),(0,a.createElement)(i.PanelBody,{title:Z("After purchase","newspack-blocks")},(0,a.createElement)(q.Z,{setAttributes:n,attributes:t}))))},G=JSON.parse('{"u2":"donate","W3":"newspack","Y4":{"className":{"type":"string"},"manual":{"type":"boolean"},"tiered":{"type":"boolean","default":true},"amounts":{"type":"object","default":{}},"disabledFrequencies":{"type":"object","default":{}},"thanksText":{"type":"string","default":"Your contribution is appreciated."},"buttonText":{"type":"string","default":"Donate Now"},"buttonWithCCText":{"type":"string","default":"Donate with card"},"paymentRequestType":{"type":"string","default":"donate"},"defaultFrequency":{"type":"string","default":"month"},"campaign":{"type":"string"},"buttonColor":{"type":"string","default":"#dd3333"},"suggestedAmounts":{"type":"array"},"suggestedAmountUntiered":{"type":"number"},"minimumDonation":{"type":"number"},"layoutOption":{"type":"string","default":"frequency"},"useModalCheckout":{"type":"boolean","default":true},"tiersBasedOptions":{"type":"array","default":[{"heading":"Small","description":"","buttonText":"Select","recommendLabel":""},{"heading":"Medium","description":"","buttonText":"Select","recommendLabel":"BEST VALUE"},{"heading":"Large","description":"","buttonText":"Select","recommendLabel":""}]},"additionalFields":{"type":"array","default":[]},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"}},"be":{"html":false,"align":false}}');var W=o.__,Y=G.u2,X=G.Y4,K=G.W3,Q=G.be,J={title:W("Donate","newspack-blocks"),icon:{src:l,foreground:"#36f"},category:K,keywords:[W("donate","newspack-blocks"),W("memberships","newspack-blocks"),W("subscriptions","newspack-blocks")],description:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,W("Manually place a donation block on any post or page on your site.","newspack-blocks")),(0,a.createElement)(i.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/donate-block/"},W("Support reference","newspack-blocks"))),attributes:X,supports:Q,edit:U,save:function(){return null}};(0,r.registerBlockStyle)("newspack-blocks/donate",{name:"alternate",label:W("Alternate","newapack-blocks")}),(0,r.registerBlockStyle)("newspack-blocks/donate",{name:"minimal",label:W("Minimal","newapack-blocks")}),(0,r.registerBlockType)("newspack-blocks/".concat(Y),J)},1341:(e,t,n)=>{"use strict";var r=n(4981),a=n(6989),i=n.n(a),o=n(9307),s=n(5609),l=n(2694),c=n(5736),u=n(5048),p=n(3144),d=n(7326),f=n(136),h=n(8347),m=n(4942),v=n(6967),g=n(1149),y=n(2089),b=n(96),w=n(4184),k=n.n(w),_=n(9771),E=n(2175),S=n(9818),x=n(4333),C=n(2629),M=n(1984),T=n(444);const P=(0,o.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(T.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),A=(0,o.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(T.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),O=(0,o.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(T.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));var I=n(8341),N=n(4239);const D=(0,o.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(T.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),z=(0,o.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(T.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var L,__=c.__;"object"==typeof window&&window.newspack_blocks_data&&window.newspack_blocks_data.post_subtitle&&(L=!0);var R=(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{clipRule:"evenodd",d:"M18.714 7.5H5.286a.786.786 0 00-.786.786v7.428c0 .434.352.786.786.786h13.428a.786.786 0 00.786-.786V8.286a.786.786 0 00-.786-.786zM5.286 6A2.286 2.286 0 003 8.286v7.428A2.286 2.286 0 005.286 18h13.428A2.286 2.286 0 0021 15.714V8.286A2.286 2.286 0 0018.714 6H5.286z",fillRule:"evenodd"})),j=(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{clipRule:"evenodd",d:"M15.714 4.5H8.286a.786.786 0 00-.786.786v13.428c0 .434.352.786.786.786h7.428a.786.786 0 00.786-.786V5.286a.786.786 0 00-.786-.786zM8.286 3A2.286 2.286 0 006 5.286v13.428A2.286 2.286 0 008.286 21h7.428A2.286 2.286 0 0018 18.714V5.286A2.286 2.286 0 0015.714 3H8.286z",fillRule:"evenodd"})),B=(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{clipRule:"evenodd",d:"M18.714 4.5H5.286a.786.786 0 00-.786.786v13.428c0 .434.352.786.786.786h13.428a.786.786 0 00.786-.786V5.286a.786.786 0 00-.786-.786zM5.286 3A2.286 2.286 0 003 5.286v13.428A2.286 2.286 0 005.286 21h13.428A2.286 2.286 0 0021 18.714V5.286A2.286 2.286 0 0018.714 3H5.286z",fillRule:"evenodd"})),F=function(e){(0,f.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;(0,u.Z)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),(0,m.Z)((0,d.Z)(e),"renderPost",(function(t){var n=e.props,r=n.attributes,a=n.isUIDisabled,i=r.showImage,s=r.imageShape,l=r.mediaPosition,c=r.minHeight,u=r.showCaption,p=r.showExcerpt,d=r.showReadMore,f=r.readMoreLabel,h=r.showSubtitle,m=r.showAuthor,v=r.showAvatar,g=r.showDate,b=r.showCategory,w=r.sectionHeader,S={minHeight:"behind"===l&&i&&t.newspack_featured_image_src&&c+"vh",paddingTop:"behind"===l&&i&&t.newspack_featured_image_src&&c/5+"vh"},x=k()({"post-has-image":t.newspack_featured_image_src,"newspack-block--disabled":a},t.newspack_article_classes),M=e.titleForPost(t),T=(0,_.__experimentalGetSettings)().formats.date;return(0,o.createElement)("article",{className:x,key:t.id,style:S},(0,y.fC)(t),i&&t.newspack_featured_image_src&&(0,o.createElement)("figure",{className:"post-thumbnail",key:"thumbnail"},(0,o.createElement)("a",{href:"#"},"landscape"===s&&(0,o.createElement)("img",{src:t.newspack_featured_image_src.landscape,alt:""}),"portrait"===s&&(0,o.createElement)("img",{src:t.newspack_featured_image_src.portrait,alt:""}),"square"===s&&(0,o.createElement)("img",{src:t.newspack_featured_image_src.square,alt:""}),"uncropped"===s&&(0,o.createElement)("img",{src:t.newspack_featured_image_src.uncropped,alt:""})),u&&""!==t.newspack_featured_image_caption&&(0,o.createElement)("figcaption",null,t.newspack_featured_image_caption)),(0,o.createElement)("div",{className:"entry-wrapper"},(t.newspack_post_sponsors||b&&0<t.newspack_category_info.length)&&(0,o.createElement)("div",{className:"cat-links"+(t.newspack_post_sponsors?" sponsor-label":"")},t.newspack_post_sponsors&&(0,o.createElement)("span",{className:"flag"},t.newspack_post_sponsors[0].flag),b&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_categories)&&(0,o.createElement)(o.RawHTML,null,(0,C.decodeEntities)(t.newspack_category_info))),E.RichText.isEmpty(w)?(0,o.createElement)("h2",{className:"entry-title",key:"title"},(0,o.createElement)("a",{href:"#"},M)):(0,o.createElement)("h3",{className:"entry-title",key:"title"},(0,o.createElement)("a",{href:"#"},M)),L&&h&&(0,o.createElement)(o.RawHTML,{key:"subtitle",className:"newspack-post-subtitle newspack-post-subtitle--in-homepage-block"},t.meta.newspack_post_subtitle||""),p&&(0,o.createElement)(o.RawHTML,{key:"excerpt",className:"excerpt-contain"},t.excerpt.rendered),d&&t.post_link&&(0,o.createElement)("a",{href:"#",key:"readmore",className:"more-link"},f),(0,o.createElement)("div",{className:"entry-meta"},t.newspack_post_sponsors&&(0,o.createElement)("span",{className:"entry-sponsors ".concat(t.newspack_sponsors_show_author?"plus-author":"")},(0,y.b2)(t.newspack_post_sponsors),(0,y.Q$)(t.newspack_post_sponsors)),m&&!t.newspack_listings_hide_author&&v&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_author)&&(0,y.lW)(t.newspack_author_info),m&&!t.newspack_listings_hide_author&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_author)&&(0,y.FX)(t.newspack_author_info),g&&!t.newspack_listings_hide_publish_date&&(0,o.createElement)("time",{className:"entry-date published",key:"pub-date"},(0,_.dateI18n)(T,t.date)))))})),(0,m.Z)((0,d.Z)(e),"titleForPost",(function(e){return e.title?"string"==typeof e.title?(0,C.decodeEntities)(e.title.trim()):"object"==typeof e.title&&e.title.rendered?(0,C.decodeEntities)(e.title.rendered.trim()):void 0:""})),(0,m.Z)((0,d.Z)(e),"renderInspectorControls",(function(){var t=e.props,n=t.attributes,r=t.setAttributes,a=t.textColor,i=t.setTextColor,l=n.authors,c=n.specificPosts,u=n.postsToShow,p=n.categories,d=n.includeSubcategories,f=n.customTaxonomies,h=n.columns,y=n.colGap,w=n.postType,k=n.showImage,_=n.showCaption,S=n.imageScale,x=n.mobileStack,C=n.minHeight,M=n.moreButton,T=n.showExcerpt,P=n.showReadMore,A=n.readMoreLabel,O=n.excerptLength,I=n.showSubtitle,N=n.typeScale,D=n.showDate,z=n.showAuthor,R=n.showAvatar,j=n.showCategory,B=n.postLayout,F=n.mediaPosition,$=n.specificMode,H=n.tags,q=n.tagExclusions,Z=n.categoryExclusions,V=[{value:1,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:2,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:3,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:4,label:__("Extra Large","newspack-blocks"),shortName:__("XL","newspack-blocks")}],U=[{value:1,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:2,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:3,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")}],G=function(e){return function(t){return r((0,m.Z)({},e,t))}};return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.PanelBody,{title:__("Display Settings","newspack-blocks"),initialOpen:!0},(0,o.createElement)(v.Z,{numberOfItems:u,onNumberOfItemsChange:function(e){return r({postsToShow:e||1})},specificMode:$,onSpecificModeChange:G("specificMode"),specificPosts:c,onSpecificPostsChange:G("specificPosts"),authors:l,onAuthorsChange:G("authors"),categories:p,onCategoriesChange:G("categories"),includeSubcategories:d,onIncludeSubcategoriesChange:G("includeSubcategories"),tags:H,onTagsChange:G("tags"),onCustomTaxonomiesChange:G("customTaxonomies"),customTaxonomies:f,tagExclusions:q,onTagExclusionsChange:G("tagExclusions"),categoryExclusions:Z,onCategoryExclusionsChange:G("categoryExclusions"),postType:w}),"grid"===B&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.RangeControl,{label:__("Columns","newspack-blocks"),value:h,onChange:G("columns"),min:2,max:6,required:!0}),(0,o.createElement)(s.BaseControl,{label:__("Columns Gap","newspack-blocks"),id:"newspackcolumns-col-gap"},(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ButtonGroup,{id:"newspackcolumns-col-gap","aria-label":__("Columns Gap","newspack-blocks")},U.map((function(e){var t=y===e.value;return(0,o.createElement)(s.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return r({colGap:e.value})}},e.shortName)})))))),!$&&(0,g.pM)()?(0,o.createElement)("i",null,__('This blog is private, therefore the "Load more posts" feature is not active.',"newspack-blocks")):!$&&(0,o.createElement)(s.ToggleControl,{label:__('Show "Load more posts" Button',"newspack-blocks"),checked:M,onChange:function(){return r({moreButton:!M})}}),(0,o.createElement)(s.ToggleControl,{label:__("Allow duplicate stories","newspack-blocks"),help:__("If checked, this block will be excluded from the page's de-duplication logic. Duplicate stories may appear.","newspack-blocks"),checked:!n.deduplicate,onChange:function(e){return r({deduplicate:!e})},className:"newspack-blocks-deduplication-toggle"})),(0,o.createElement)(s.PanelBody,{title:__("Featured Image Settings","newspack-blocks")},(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Featured Image","newspack-blocks"),checked:k,onChange:function(){return r({showImage:!k})}})),k&&(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Featured Image Caption","newspack-blocks"),checked:_,onChange:function(){return r({showCaption:!_})}})),k&&"top"!==F&&"behind"!==F&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Stack on mobile","newspack-blocks"),checked:x,onChange:function(){return r({mobileStack:!x})}})),(0,o.createElement)(s.BaseControl,{label:__("Featured Image Size","newspack-blocks"),id:"newspackfeatured-image-size"},(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ButtonGroup,{id:"newspackfeatured-image-size","aria-label":__("Featured Image Size","newspack-blocks")},V.map((function(e){var t=S===e.value;return(0,o.createElement)(s.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return r({imageScale:e.value})}},e.shortName)})))))),k&&"behind"===F&&(0,o.createElement)(s.RangeControl,{label:__("Minimum height","newspack-blocks"),help:__("Sets a minimum height for the block, using a percentage of the screen's current height.","newspack-blocks"),value:C,onChange:function(e){return r({minHeight:e})},min:0,max:100,required:!0})),(0,o.createElement)(s.PanelBody,{title:__("Post Control Settings","newspack-blocks")},L&&(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Subtitle","newspack-blocks"),checked:I,onChange:function(){return r({showSubtitle:!I})}})),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Excerpt","newspack-blocks"),checked:T,onChange:function(){return r({showExcerpt:!T})}})),T&&(0,o.createElement)(s.RangeControl,{label:__("Max number of words in excerpt","newspack-blocks"),value:O,onChange:function(e){return r({excerptLength:e})},min:10,max:100}),(0,o.createElement)(s.ToggleControl,{label:__('Add a "Read More" link',"newspack-blocks"),checked:P,onChange:function(){return r({showReadMore:!P})}}),P&&(0,o.createElement)(s.TextControl,{label:__('"Read More" link text',"newspack-blocks"),value:A,placeholder:A,onChange:function(e){return r({readMoreLabel:e})}}),(0,o.createElement)(s.RangeControl,{className:"type-scale-slider",label:__("Type Scale","newspack-blocks"),value:N,onChange:function(e){return r({typeScale:e})},min:1,max:10,required:!0})),(0,o.createElement)(E.PanelColorSettings,{title:__("Color Settings","newspack-blocks"),initialOpen:!0,colorSettings:[{value:a.color,onChange:i,label:__("Text Color","newspack-blocks")}]}),(0,o.createElement)(s.PanelBody,{title:__("Post Meta Settings","newspack-blocks")},(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Date","newspack-blocks"),checked:D,onChange:function(){return r({showDate:!D})}})),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Category","newspack-blocks"),checked:j,onChange:function(){return r({showCategory:!j})}})),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Author","newspack-blocks"),checked:z,onChange:function(){return r({showAuthor:!z})}})),z&&(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(s.ToggleControl,{label:__("Show Author Avatar","newspack-blocks"),checked:R,onChange:function(){return r({showAvatar:!R})}}))),(0,o.createElement)(b.L,{attributes:n,setAttributes:r}),(0,o.createElement)(b.H,{attributes:n,setAttributes:r}))})),e}return(0,p.Z)(n,[{key:"componentDidMount",value:function(){this.props.triggerReflow()}},{key:"componentDidUpdate",value:function(e){(0,g.Ou)(e,this.props)&&this.props.triggerReflow()}},{key:"componentWillUnmount",value:function(){this.props.triggerReflow()}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,a=n.className,i=n.setAttributes,l=n.isSelected,c=n.latestPosts,u=n.textColor,p=n.error,d=r.showImage,f=r.imageShape,h=r.postLayout,v=r.mediaPosition,y=r.moreButton,b=r.moreButtonText,w=r.columns,_=r.colGap,S=r.typeScale,x=r.imageScale,C=r.mobileStack,T=r.sectionHeader,L=r.showCaption,F=r.showCategory,$=r.specificMode,H=r.textAlign,q=k()(a,(e={"is-grid":"grid"===h,"show-image":d},(0,m.Z)(e,"columns-".concat(w),"grid"===h),(0,m.Z)(e,"colgap-".concat(_),"grid"===h),(0,m.Z)(e,"ts-".concat(S),"5"!==S),(0,m.Z)(e,"image-align".concat(v),d),(0,m.Z)(e,"is-".concat(x),"1"!==x&&d),(0,m.Z)(e,"mobile-stack",C),(0,m.Z)(e,"is-".concat(f),d),(0,m.Z)(e,"has-text-color",""!==u.color),(0,m.Z)(e,"show-caption",L),(0,m.Z)(e,"show-category",F),(0,m.Z)(e,"has-text-align-".concat(H),H),(0,m.Z)(e,"wpnbha",!0),e)),Z=[{icon:(0,o.createElement)(M.Z,{icon:P}),title:__("List View","newspack-blocks"),onClick:function(){return i({postLayout:"list"})},isActive:"list"===h},{icon:(0,o.createElement)(M.Z,{icon:A}),title:__("Grid View","newspack-blocks"),onClick:function(){return i({postLayout:"grid"})},isActive:"grid"===h}],V=[{icon:(0,o.createElement)(M.Z,{icon:O}),title:__("Show media on top","newspack-blocks"),isActive:"top"===v,onClick:function(){return i({mediaPosition:"top"})}},{icon:(0,o.createElement)(M.Z,{icon:I.Z}),title:__("Show media on left","newspack-blocks"),isActive:"left"===v,onClick:function(){return i({mediaPosition:"left"})}},{icon:(0,o.createElement)(M.Z,{icon:N.Z}),title:__("Show media on right","newspack-blocks"),isActive:"right"===v,onClick:function(){return i({mediaPosition:"right"})}},{icon:(0,o.createElement)(M.Z,{icon:D}),title:__("Show media behind","newspack-blocks"),isActive:"behind"===v,onClick:function(){return i({mediaPosition:"behind"})}}],U=[{icon:R,title:__("Landscape Image Shape","newspack-blocks"),isActive:"landscape"===f,onClick:function(){return i({imageShape:"landscape"})}},{icon:j,title:__("portrait Image Shape","newspack-blocks"),isActive:"portrait"===f,onClick:function(){return i({imageShape:"portrait"})}},{icon:B,title:__("Square Image Shape","newspack-blocks"),isActive:"square"===f,onClick:function(){return i({imageShape:"square"})}},{icon:(0,o.createElement)(M.Z,{icon:z}),title:__("Uncropped","newspack-blocks"),isActive:"uncropped"===f,onClick:function(){return i({imageShape:"uncropped"})}}];return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:q,style:{color:u.color}},(0,o.createElement)("div",null,c&&(!E.RichText.isEmpty(T)||l)&&(0,o.createElement)(E.RichText,{onChange:function(e){return i({sectionHeader:e})},placeholder:__("Write header…","newspack-blocks"),value:T,tagName:"h2",className:"article-section-title"}),c&&!c.length&&(0,o.createElement)(s.Placeholder,null,__("Sorry, no posts were found.","newspack-blocks")),!c&&!p&&(0,o.createElement)(s.Placeholder,{icon:(0,o.createElement)(s.Spinner,null),className:"component-placeholder__align-center"}),!c&&p&&(0,o.createElement)(s.Placeholder,{className:"component-placeholder__align-center newspack-block--error"},p),c&&c.map((function(e){return t.renderPost(e)})))),!$&&c&&y&&!(0,g.pM)()&&(0,o.createElement)("div",{className:"editor-styles-wrapper wpnbha__wp-block-button__wrapper"},(0,o.createElement)("div",{className:"wp-block-button"},(0,o.createElement)(E.RichText,{placeholder:__("Load more posts","newspack-blocks"),value:b,onChange:function(e){return i({moreButtonText:e})},className:"wp-block-button__link",allowedFormats:[]}))),(0,o.createElement)(E.BlockControls,null,(0,o.createElement)(s.Toolbar,null,(0,o.createElement)(E.AlignmentControl,{value:H,onChange:function(e){i({textAlign:e})}})),(0,o.createElement)(s.Toolbar,{controls:Z}),d&&(0,o.createElement)(s.Toolbar,{controls:V}),d&&(0,o.createElement)(s.Toolbar,{controls:U})),(0,o.createElement)(E.InspectorControls,null,this.renderInspectorControls()))}}]),n}(o.Component);const $=(0,x.compose)([(0,E.withColors)({textColor:"color"}),(0,S.withSelect)(g.b9),(0,S.withDispatch)(g.eL)])(F);var H=n(3357),q=c.__,_x=c._x,Z=H.u2,V=H.Y4,U=H.W3,G={title:q("Homepage Posts","newspack-blocks"),icon:{src:(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{d:"M6.5 14.25H11v-1.5H6.5zM14.5 11.25h-8v-1.5h8zM6.5 8.25h8v-1.5h-8z"}),(0,o.createElement)(s.Path,{clipRule:"evenodd",d:"M4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.272 3.728 18 4.625 18h11.75c.897 0 1.625-.728 1.625-1.625V4.625C18 3.728 17.272 3 16.375 3zm11.75 1.5H4.625a.125.125 0 00-.125.125v11.75c0 .069.056.125.125.125h11.75a.125.125 0 00.125-.125V4.625a.125.125 0 00-.125-.125z",fillRule:"evenodd"}),(0,o.createElement)(s.Path,{d:"M20.25 8v11c0 .69-.56 1.25-1.249 1.25H6v1.5h13.001A2.749 2.749 0 0021.75 19V8z"})),foreground:"#36f"},attributes:V,category:U,keywords:[q("posts","newspack-blocks"),q("articles","newspack-blocks"),q("latest","newspack-blocks")],description:q("A block for displaying homepage posts.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"borders",label:_x("Borders","block style","newspack-blocks")}],supports:{html:!1,align:["wide","full"],default:""},edit:$,save:function(){return null},transforms:{from:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.displayPostContent,n=e.displayPostDate,a=e.postLayout,i=e.columns,o=e.postsToShow,s=e.categories;return(0,r.createBlock)((0,l.applyFilters)("blocks.transforms_from_name","newspack-blocks/homepage-articles"),{showExcerpt:t,showDate:n,postLayout:a,columns:i,postsToShow:o,showAuthor:!1,categories:s?[s]:[]})}}],to:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.showExcerpt,n=e.showDate,a=e.postLayout,i=e.columns,o=e.postsToShow,s=e.categories;return(0,r.createBlock)("core/latest-posts",{displayPostContent:t,displayPostDate:n,postLayout:a,columns:i,postsToShow:o,categories:s[0]||""})}}]}},W=n(632),Y=n(3145),X="newspack-blocks/".concat(Z);(0,r.registerBlockType)(X,G),(0,Y.f)([X,"newspack-blocks/".concat(W.u2)]),i()({path:"/newspack-blocks/v1/homepage-articles-css"}).then((function(e){var t=document.createElement("style");t.innerHTML=e,t.id="newspack-blocks-homepage-articles-styles",document.head.appendChild(t)}))},3145:(e,t,n)=>{"use strict";n.d(t,{$:()=>vt,f:()=>Mt});var r=n(9062),a=n(1413);function i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function u(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(i(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(i(1));return n(u)(e,t)}if("function"!=typeof e)throw new Error(i(2));var a=e,s=t,p=[],d=p,f=!1;function h(){d===p&&(d=p.slice())}function m(){if(f)throw new Error(i(3));return s}function v(e){if("function"!=typeof e)throw new Error(i(4));if(f)throw new Error(i(5));var t=!0;return h(),d.push(e),function(){if(t){if(f)throw new Error(i(6));t=!1,h();var n=d.indexOf(e);d.splice(n,1),p=null}}}function g(e){if(!c(e))throw new Error(i(7));if(void 0===e.type)throw new Error(i(8));if(f)throw new Error(i(9));try{f=!0,s=a(s,e)}finally{f=!1}for(var t=p=d,n=0;n<t.length;n++){(0,t[n])()}return e}function y(e){if("function"!=typeof e)throw new Error(i(10));a=e,g({type:l.REPLACE})}function b(){var e,t=v;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(i(11));function n(){e.next&&e.next(m())}return n(),{unsubscribe:t(n)}}})[o]=function(){return this},e}return g({type:l.INIT}),(r={dispatch:g,subscribe:v,getState:m,replaceReducer:y})[o]=b,r}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var d=function(e){return"@@redux-saga/"+e},f=d("CANCEL_PROMISE"),h=d("CHANNEL_END"),m=d("IO"),v=d("MATCH"),g=d("MULTICAST"),y=d("SAGA_ACTION"),b=d("SELF_CANCELLATION"),w=d("TASK"),k=d("TASK_CANCEL"),_=d("TERMINATE"),E=d("LOCATION"),S=function(e){return null==e},x=function(e){return null!=e},C=function(e){return"function"==typeof e},M=function(e){return"string"==typeof e},T=Array.isArray,P=function(e){return e&&C(e.then)},A=function(e){return e&&C(e.next)&&C(e.throw)},O=function e(t){return t&&(M(t)||D(t)||C(t)||T(t)&&t.every(e))},I=function(e){return e&&C(e.take)&&C(e.close)},N=function(e){return C(e)&&e.hasOwnProperty("toString")},D=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},z=n(7462);const L=function(e,t){var n;void 0===t&&(t=!0);var r=new Promise((function(r){n=setTimeout(r,Math.min(2147483647,e),t)}));return r[f]=function(){clearTimeout(n)},r};var R=function(e){return function(){return e}}(!0),j=function(){};var B=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var F=function(e,t){(0,z.Z)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))};function $(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var H=function(e){throw e},q=function(e){return{value:e,done:!0}};function Z(e,t,n){void 0===t&&(t=H),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:q,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function V(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var U=function(e){return Array.apply(null,new Array(e))},G=function(e){return function(t){return e(Object.defineProperty(t,y,{value:!0}))}},W=function(e){return e===_},Y=function(e){return e===k},X=function(e){return W(e)||Y(e)};function K(e,t){var n=Object.keys(e),r=n.length;var a,i=0,o=T(e)?U(r):{},s={};return n.forEach((function(e){var n=function(n,s){a||(s||X(n)?(t.cancel(),t(n,s)):(o[e]=n,++i===r&&(a=!0,t(o))))};n.cancel=j,s[e]=n})),t.cancel=function(){a||(a=!0,n.forEach((function(e){return s[e].cancel()})))},s}function Q(e){return{name:e.name||"anonymous",location:J(e)}}function J(e){return e[E]}function ee(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,a=0,i=0,o=function(t){n[a]=t,a=(a+1)%e,r++},s=function(){if(0!=r){var t=n[i];return n[i]=null,r--,i=(i+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r<e)o(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[a]=s,i=a=(a+1)%e;break;case 4:c=2*e,n=l(),r=n.length,a=n.length,i=0,n.length=c,e=c,o(s)}},take:s,flush:l}}var te=function(e){return ee(e,4)},ne="TAKE",re="PUT",ae="CALL",ie="FORK",oe="CANCEL",se=function(e,t){var n;return(n={})[m]=!0,n.combinator=!1,n.type=e,n.payload=t,n};function le(e,t){return void 0===e&&(e="*"),O(e)?(x(t)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),se(ne,{pattern:e})):I(n=e)&&n[g]&&x(t)&&O(t)?se(ne,{channel:e,pattern:t}):I(e)?(x(t)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),se(ne,{channel:e})):void 0;var n}function ce(e,t){return S(t)&&(t=e,e=void 0),se(re,{channel:e,action:t})}function ue(e,t){var n,r=null;return C(e)?n=e:(T(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&M(n)&&C(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return se(ae,ue(e,n))}function de(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return se(ie,ue(e,n))}function fe(e){return void 0===e&&(e=b),se(oe,e)}var he=pe.bind(null,L),me=function(e){return{done:!0,value:e}},ve={};function ge(e){return I(e)?"channel":N(e)?String(e):C(e)?e.name:String(e)}function ye(e,t,n){var r,a,i,o=t;function s(t,n){if(o===ve)return me(t);if(n&&!a)throw o=ve,n;r&&r(t);var s=n?e[a](n):e[o]();return o=s.nextState,i=s.effect,r=s.stateUpdater,a=s.errorState,o===ve?me(t):i}return Z(s,(function(e){return s(null,e)}),n)}function be(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var i,o,s={done:!1,value:le(e)},l=function(e){return{done:!1,value:de.apply(void 0,[t].concat(r,[e]))}},c=function(e){return{done:!1,value:fe(e)}},u=function(e){return i=e},p=function(e){return o=e};return ye({q1:function(){return{nextState:"q2",effect:s,stateUpdater:p}},q2:function(){return i?{nextState:"q3",effect:c(i)}:{nextState:"q1",effect:l(o),stateUpdater:u}},q3:function(){return{nextState:"q1",effect:l(o),stateUpdater:u}}},"q1","takeLatest("+ge(e)+", "+t.name+")")}function we(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return de.apply(void 0,[be,e,t].concat(r))}var ke=n(3366);function _e(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}const Ee=_e;var Se=[],xe=0;function Ce(e){try{Pe(),e()}finally{Ae()}}function Me(e){Se.push(e),xe||(Pe(),Oe())}function Te(e){try{return Pe(),e()}finally{Oe()}}function Pe(){xe++}function Ae(){xe--}function Oe(){var e;for(Ae();!xe&&void 0!==(e=Se.shift());)Ce(e)}var Ie=function(e){return function(t){return e.some((function(e){return Re(e)(t)}))}},Ne=function(e){return function(t){return e(t)}},De=function(e){return function(t){return t.type===String(e)}},ze=function(e){return function(t){return t.type===e}},Le=function(){return R};function Re(e){var t="*"===e?Le:M(e)?De:T(e)?Ie:N(e)?De:C(e)?Ne:D(e)?ze:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var je={type:h},Be=function(e){return e&&e.type===h};function Fe(e){void 0===e&&(e=te());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(je):e.isEmpty()?(n.push(r),r.cancel=function(){$(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(je):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,a=e.length;r<a;r++){(0,e[r])(je)}}}}}function $e(){var e,t,n,r,a,i,o=(t=!1,r=n=[],a=function(){r===n&&(r=n.slice())},i=function(){t=!0;var e=n=r;r=[],e.forEach((function(e){e(je)}))},(e={})[g]=!0,e.put=function(e){if(!t)if(Be(e))i();else for(var a=n=r,o=0,s=a.length;o<s;o++){var l=a[o];l[v](e)&&(l.cancel(),l(e))}},e.take=function(e,n){var i,o;void 0===n&&(n=Le),t?e(je):(e[v]=n,a(),r.push(e),e.cancel=(i=function(){a(),$(r,e)},o=!1,function(){o||(o=!0,i())}))},e.close=i,e),s=o.put;return o.put=function(e){e[y]?s(e):Me((function(){s(e)}))},o}function He(e,t){var n=e[f];C(n)&&(t.cancel=n),e.then(t,(function(e){t(e,!0)}))}var qe,Ze=0,Ve=function(){return++Ze};function Ue(e){e.isRunning()&&e.cancel()}var Ge=((qe={}).TAKE=function(e,t,n){var r=t.channel,a=void 0===r?e.channel:r,i=t.pattern,o=t.maybe,s=function(e){e instanceof Error?n(e,!0):!Be(e)||o?n(e):n(_)};try{a.take(s,x(i)?Re(i):null)}catch(l){return void n(l,!0)}n.cancel=s.cancel},qe.PUT=function(e,t,n){var r=t.channel,a=t.action,i=t.resolve;Me((function(){var t;try{t=(r?r.put:e.dispatch)(a)}catch(o){return void n(o,!0)}i&&P(t)?He(t,n):n(t)}))},qe.ALL=function(e,t,n,r){var a=r.digestEffect,i=Ze,o=Object.keys(t);if(0!==o.length){var s=K(t,n);o.forEach((function(e){a(t[e],i,s[e],e)}))}else n(T(t)?[]:{})},qe.RACE=function(e,t,n,r){var a=r.digestEffect,i=Ze,o=Object.keys(t),s=T(t)?U(o.length):{},l={},c=!1;o.forEach((function(e){var t=function(t,r){c||(r||X(t)?(n.cancel(),n(t,r)):(n.cancel(),c=!0,s[e]=t,n(s)))};t.cancel=j,l[e]=t})),n.cancel=function(){c||(c=!0,o.forEach((function(e){return l[e].cancel()})))},o.forEach((function(e){c||a(t[e],i,l[e],e)}))},qe.CALL=function(e,t,n,r){var a=t.context,i=t.fn,o=t.args,s=r.task;try{var l=i.apply(a,o);if(P(l))return void He(l,n);if(A(l))return void rt(e,l,s.context,Ze,Q(i),!1,n);n(l)}catch(c){n(c,!0)}},qe.CPS=function(e,t,n){var r=t.context,a=t.fn,i=t.args;try{var o=function(e,t){S(e)?n(t):n(e,!0)};a.apply(r,i.concat(o)),o.cancel&&(n.cancel=o.cancel)}catch(s){n(s,!0)}},qe.FORK=function(e,t,n,r){var a=t.context,i=t.fn,o=t.args,s=t.detached,l=r.task,c=function(e){var t=e.context,n=e.fn,r=e.args;try{var a=n.apply(t,r);if(A(a))return a;var i=!1;return Z((function(e){return i?{value:e,done:!0}:(i=!0,{value:a,done:!P(a)})}))}catch(o){return Z((function(){throw o}))}}({context:a,fn:i,args:o}),u=function(e,t){return e.isSagaIterator?{name:e.meta.name}:Q(t)}(c,i);Te((function(){var t=rt(e,c,l.context,Ze,u,s,void 0);s?n(t):t.isRunning()?(l.queue.addTask(t),n(t)):t.isAborted()?l.queue.abort(t.error()):n(t)}))},qe.JOIN=function(e,t,n,r){var a=r.task,i=function(e,t){if(e.isRunning()){var n={task:a,cb:t};t.cancel=function(){e.isRunning()&&$(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(T(t)){if(0===t.length)return void n([]);var o=K(t,n);t.forEach((function(e,t){i(e,o[t])}))}else i(t,n)},qe.CANCEL=function(e,t,n,r){var a=r.task;t===b?Ue(a):T(t)?t.forEach(Ue):Ue(t),n()},qe.SELECT=function(e,t,n){var r=t.selector,a=t.args;try{n(r.apply(void 0,[e.getState()].concat(a)))}catch(i){n(i,!0)}},qe.ACTION_CHANNEL=function(e,t,n){var r=t.pattern,a=Fe(t.buffer),i=Re(r),o=function t(n){Be(n)||e.channel.take(t,i),a.put(n)},s=a.close;a.close=function(){o.cancel(),s()},e.channel.take(o,i),n(a)},qe.CANCELLED=function(e,t,n,r){n(r.task.isCancelled())},qe.FLUSH=function(e,t,n){t.flush(n)},qe.GET_CONTEXT=function(e,t,n,r){n(r.task.context[t])},qe.SET_CONTEXT=function(e,t,n,r){var a=r.task;F(a.context,t),n()},qe);function We(e,t){return e+"?"+t}function Ye(e){var t=e.name,n=e.location;return n?t+" "+We(n.fileName,n.lineNumber):t}function Xe(e){var t,n,r,a=(t=function(e){return e.cancelledTasks},n=e,(r=[]).concat.apply(r,n.map(t)));return a.length?["Tasks cancelled due to error:"].concat(a).join("\n"):""}var Ke=null,Qe=[],Je=function(e){e.crashedEffect=Ke,Qe.push(e)},et=function(){Ke=null,Qe.length=0},tt=function(){var e=Qe[0],t=Qe.slice(1),n=e.crashedEffect?function(e){var t=J(e);return t?t.code+" "+We(t.fileName,t.lineNumber):""}(e.crashedEffect):null;return["The above error occurred in task "+Ye(e.meta)+(n?" \n when executing effect "+n:"")].concat(t.map((function(e){return" created by "+Ye(e.meta)})),[Xe(Qe)]).join("\n")};function nt(e,t,n,r,a,i,o){var s;void 0===o&&(o=j);var l,c,u=0,p=null,d=[],f=Object.create(n),h=function(e,t,n){var r,a=[],i=!1;function o(e){t(),l(),n(e,!0)}function s(t){a.push(t),t.cont=function(s,l){i||($(a,t),t.cont=j,l?o(s):(t===e&&(r=s),a.length||(i=!0,n(r))))}}function l(){i||(i=!0,a.forEach((function(e){e.cont=j,e.cancel()})),a=[])}return s(e),{addTask:s,cancelAll:l,abort:o,getTasks:function(){return a}}}(t,(function(){d.push.apply(d,h.getTasks().map((function(e){return e.meta.name})))}),m);function m(t,n){if(n){if(u=2,Je({meta:a,cancelledTasks:d}),v.isRoot){var r=tt();et(),e.onError(t,{sagaStack:r})}c=t,p&&p.reject(t)}else t===k?u=1:1!==u&&(u=3),l=t,p&&p.resolve(t);v.cont(t,n),v.joiners.forEach((function(e){e.cb(t,n)})),v.joiners=null}var v=((s={})[w]=!0,s.id=r,s.meta=a,s.isRoot=i,s.context=f,s.joiners=[],s.queue=h,s.cancel=function(){0===u&&(u=1,h.cancelAll(),m(k,!1))},s.cont=o,s.end=m,s.setContext=function(e){F(f,e)},s.toPromise=function(){return p||(p=Ee(),2===u?p.reject(c):0!==u&&p.resolve(l)),p.promise},s.isRunning=function(){return 0===u},s.isCancelled=function(){return 1===u||0===u&&1===t.status},s.isAborted=function(){return 2===u},s.result=function(){return l},s.error=function(){return c},s);return v}function rt(e,t,n,r,a,i,o){var s=e.finalizeRunEffect((function(t,n,r){if(P(t))He(t,r);else if(A(t))rt(e,t,c.context,n,a,!1,r);else if(t&&t[m]){(0,Ge[t.type])(e,t.payload,r,u)}else r(t)}));p.cancel=j;var l={meta:a,cancel:function(){0===l.status&&(l.status=1,p(k))},status:0},c=nt(e,l,n,r,a,i,o),u={task:c,digestEffect:d};return o&&(o.cancel=c.cancel),p(),c;function p(e,n){try{var a;n?(a=t.throw(e),et()):Y(e)?(l.status=1,p.cancel(),a=C(t.return)?t.return(k):{done:!0,value:k}):a=W(e)?C(t.return)?t.return():{done:!0}:t.next(e),a.done?(1!==l.status&&(l.status=3),l.cont(a.value)):d(a.value,r,p)}catch(i){if(1===l.status)throw i;l.status=2,l.cont(i,!0)}}function d(t,n,r,a){void 0===a&&(a="");var i,o=Ve();function l(n,a){i||(i=!0,r.cancel=j,e.sagaMonitor&&(a?e.sagaMonitor.effectRejected(o,n):e.sagaMonitor.effectResolved(o,n)),a&&function(e){Ke=e}(t),r(n,a))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:o,parentEffectId:n,label:a,effect:t}),l.cancel=j,r.cancel=function(){i||(i=!0,l.cancel(),l.cancel=j,e.sagaMonitor&&e.sagaMonitor.effectCancelled(o))},s(t,o,l)}}function at(e,t){var n=e.channel,r=void 0===n?$e():n,a=e.dispatch,i=e.getState,o=e.context,s=void 0===o?{}:o,l=e.sagaMonitor,c=e.effectMiddlewares,u=e.onError,d=void 0===u?V:u;for(var f=arguments.length,h=new Array(f>2?f-2:0),m=2;m<f;m++)h[m-2]=arguments[m];var v=t.apply(void 0,h);var g,y=Ve();if(l&&(l.rootSagaStarted=l.rootSagaStarted||j,l.effectTriggered=l.effectTriggered||j,l.effectResolved=l.effectResolved||j,l.effectRejected=l.effectRejected||j,l.effectCancelled=l.effectCancelled||j,l.actionDispatched=l.actionDispatched||j,l.rootSagaStarted({effectId:y,saga:t,args:h})),c){var b=p.apply(void 0,c);g=function(e){return function(t,n,r){return b((function(t){return e(t,n,r)}))(t)}}}else g=B;var w={channel:r,dispatch:G(a),getState:i,sagaMonitor:l,onError:d,finalizeRunEffect:g};return Te((function(){var e=rt(w,v,s,y,Q(t),!0,void 0);return l&&l.effectResolved(y,e),e}))}const it=function(e){var t,n=void 0===e?{}:e,r=n.context,a=void 0===r?{}:r,i=n.channel,o=void 0===i?$e():i,s=n.sagaMonitor,l=(0,ke.Z)(n,["context","channel","sagaMonitor"]);function c(e){var n=e.getState,r=e.dispatch;return t=at.bind(null,(0,z.Z)({},l,{context:a,channel:o,dispatch:r,getState:n,sagaMonitor:s})),function(e){return function(t){s&&s.actionDispatched&&s.actionDispatched(t);var n=e(t);return o.put(t),n}}}return c.run=function(){return t.apply(void 0,arguments)},c.setContext=function(e){F(a,e)},c},ot=it;var st=n(2819),lt=n(9818),ct=n(6989),ut=n.n(ct),pt=n(6483),dt=n(3357),ft=n(1149),ht=regeneratorRuntime.mark(xt),mt=dt.u2,vt="newspack-blocks/".concat(mt),gt={postsByBlock:{},errorsByBlock:{}},yt={reflow:function(){kt.dispatch({type:"REFLOW"})}},bt={getPosts:function(e){var t=e.clientId;return kt.getState().postsByBlock[t]},getError:function(e){var t=e.clientId;return kt.getState().errorsByBlock[t]},isUIDisabled:function(){return kt.getState().isUIDisabled}},wt=ot(),kt=u((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DISABLE_UI":return(0,st.set)(e,"isUIDisabled",!0);case"ENABLE_UI":return(0,st.set)(e,"isUIDisabled",!1);case"UPDATE_BLOCK_POSTS":return(0,st.set)(e,["postsByBlock",t.clientId],t.posts);case"UPDATE_BLOCK_ERROR":return(0,st.set)(e,["errorsByBlock",t.clientId],t.error)}return e}),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(i(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(o)}));return r=p.apply(void 0,s)(n.dispatch),(0,a.Z)((0,a.Z)({},n),{},{dispatch:r})}}}(wt)),_t=(0,a.Z)({getSelectors:function(){return bt},getActions:function(){return yt}},kt),Et={},St=JSON.stringify;function xt(e){var t,n,r,i,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=St(e.postsQuery),n=window.newspack_blocks_data.posts_rest_url,void 0!==(r=Et[t])){s.next=9;break}return i=(0,pt.addQueryArgs)(n,(0,a.Z)((0,a.Z)({},e.postsQuery),{},{context:"edit"})),s.next=7,pe(ut(),{url:i});case 7:r=s.sent,Et[t]=r;case 9:return o=r.map((function(e){return e.id})),s.next=12,ce({type:"UPDATE_BLOCK_POSTS",clientId:e.clientId,posts:r});case 12:return s.abrupt("return",o);case 13:case"end":return s.stop()}}),ht)}function Ct(e){var t,n=(0,(0,lt.select)("core/block-editor").getBlock)(e);return null==n||null===(t=n.attributes)||void 0===t?void 0:t.deduplicate}var Mt=function(e){(0,lt.register)({name:vt,instantiate:function(){return _t}}),wt.run(function(e){var t=regeneratorRuntime.mark(n);function n(){var n,i,o,s,l,c,u,p,d,f,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,he(300);case 2:return n=(0,lt.select)("core/block-editor"),i=n.getBlocks,o=(0,lt.select)("core/editor"),s=o.getCurrentPostId,t.next=6,ce({type:"DISABLE_UI"});case 6:l=i().map((function(e){var t=(0,lt.select)("core/block-editor").getBlocks(e.clientId);return(0,a.Z)((0,a.Z)({},e),{},{innerBlocks:t})})),c=(0,ft.Pi)(l,e),u=c.reduce((function(e,t){var n=t.clientId,a=t.postsQuery;return Ct(n)&&a.include&&(e=[].concat((0,r.Z)(e),(0,r.Z)(a.include))),e}),[]),p=(0,ft.Oi)([].concat((0,r.Z)(u),[s()]));case 10:if(!c.length){t.next=28;break}return d=c.shift(),(f=Ct(d.clientId))&&(d.postsQuery.exclude=p),h=[],t.prev=15,t.next=18,pe(xt,d);case 18:h=t.sent,t.next=25;break;case 21:return t.prev=21,t.t0=t.catch(15),t.next=25,ce({type:"UPDATE_BLOCK_ERROR",clientId:d.clientId,error:t.t0.message});case 25:f&&(p=[].concat((0,r.Z)(p),(0,r.Z)(h))),t.next=10;break;case 28:return t.next=30,ce({type:"ENABLE_UI"});case 30:case"end":return t.stop()}}),t,null,[[15,21]])}return regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,we("REFLOW",n);case 2:case"end":return e.stop()}}),e)}))}(e))}},1149:(e,t,n)=>{"use strict";n.d(t,{pM:()=>o,Ou:()=>l,Oi:()=>c,Pi:()=>u,b9:()=>m,eL:()=>v});var r=n(2819),a=n(5736),i=n(3145),__=a.__,o=function(){return"object"==typeof window&&window.wpcomGutenberg&&-1===Number(window.wpcomGutenberg.blogPublic)},s=["postsToShow","authors","categories","includeSubcategories","excerptLength","tags","customTaxonomies","showExcerpt","specificPosts","specificMode","tagExclusions","categoryExclusions","postType","includedPostStatuses","deduplicate"],l=function(e,t){return!(0,r.isEqual)((0,r.pick)(e.attributes,s),(0,r.pick)(t.attributes,s))||!(0,r.isEqual)(e.topBlocksClientIdsInOrder,t.topBlocksClientIdsInOrder)},c=function(e){return e.map((function(e){return parseInt(e)})).filter((function(e){return e>0}))},u=function e(t,n){return t.flatMap((function(t){var a,i,o,l,u,p,d,f,h,m,v,g,y,b,w,k,_,E,S,x,C=[];if(n.indexOf(t.name)>=0){var M=(a=t.attributes,i=(0,r.pick)(a,s),o=i.postsToShow,l=i.authors,u=i.categories,p=i.includeSubcategories,d=i.excerptLength,f=i.postType,h=i.showExcerpt,m=i.tags,v=i.customTaxonomies,g=i.specificPosts,y=void 0===g?[]:g,b=i.specificMode,w=i.tagExclusions,k=i.categoryExclusions,_=i.includedPostStatuses,E=c(y),S=b&&E&&E.length,(x=(0,r.pickBy)(S?{include:E,postsToShow:y.length,postType:f}:{postsToShow:o,categories:u,includeSubcategories:p,authors:l,tags:m,tagExclusions:w,categoryExclusions:k,customTaxonomies:v,postType:f,includedPostStatuses:_},(function(e){return!(0,r.isUndefined)(e)}))).excerptLength=d,x.showExcerpt=h,x);C.push({postsQuery:M,clientId:t.clientId})}return C.concat(e(t.innerBlocks,n))}))},p=function e(t){return t.flatMap((function(t){var n=[];return n.push(t.clientId),n.concat(e(t.innerBlocks))}))},d=window.newspack_blocks_data.assets_path,f=function(e){var t=new Date;return t.setHours(12,0,0,0),{author:1,content:{rendered:"<p>"+__("The post content.","newspack-blocks")+"</p>"},date_gmt:t.toISOString(),excerpt:{rendered:"<p>"+__("The post excerpt.","newspack-blocks")+"</p>"},featured_media:"1",id:e,meta:{newspack_post_subtitle:__("Post Subtitle","newspack-blocks")},title:{rendered:__("Post Title","newspack-blocks")},newspack_article_classes:"type-post",newspack_author_info:[{display_name:__("Author Name","newspack-blocks"),avatar:'<div style="background: #36f;width: 40px;height: 40px;display: block;overflow: hidden;border-radius: 50%; max-width: 100%; max-height: 100%;"></div>',id:1,author_link:"/"}],newspack_category_info:__("Category","newspack-blocks"),newspack_featured_image_caption:__("Featured image caption","newspack-blocks"),newspack_featured_image_src:{large:"".concat(d,"/newspack-1024x536.jpg"),landscape:"".concat(d,"/newspack-800x600.jpg"),portrait:"".concat(d,"/newspack-600x800.jpg"),square:"".concat(d,"/newspack-800x800.jpg"),uncropped:"".concat(d,"/newspack-1024x536.jpg")},newspack_has_custom_excerpt:!1,newspack_post_sponsors:!1}},h=function(e){return(0,r.times)(e.postsToShow,f)},m=function(e,t){var n=t.clientId,r=t.attributes,a=(0,e("core/editor").getEditedPostAttribute)("blocks")||[],o=e("core/block-editor").getBlocks,s=p(a),l=o(),c=l.some((function(e){return"core/widget-area"===e.name})),u=0===s.length||s.indexOf(n)>=0||c,d=e(i.$),f=d.getPosts,m=d.getError;return{isEditorBlock:u,isUIDisabled:(0,d.isUIDisabled)(),error:m({clientId:n}),topBlocksClientIdsInOrder:l.map((function(e){return e.clientId})),latestPosts:u?f({clientId:n}):h(r)}},v=function(e,t){return{triggerReflow:t.isEditorBlock?e(i.$).reflow:function(){}}}},92:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),i=n(5609),o=n(5736),s=n(5861),l=n(3324),c=n(2175),u=n(1984),p=n(6989),d=n.n(p),f=n(444);const h=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(f.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));var m,v=n(4184),g=n.n(v),__=o.__,y=(null===(m=window.newspack_blocks_data)||void 0===m?void 0:m.iframe_accepted_file_mimes)||[],b=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return(0,a.createElement)(c.URLPopover,{onClose:o},(0,a.createElement)("form",{className:"wp-block-newspack-blocks-iframe__url-input-form",onSubmit:r},(0,a.createElement)("input",{className:"wp-block-newspack-blocks-iframe__url-input-form__url-input-field",type:"url","aria-label":__("URL"),placeholder:__("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(i.Button,{className:"wp-block-newspack-blocks-iframe__url-input-form__url-input-submit-button",icon:h,label:__("Apply"),type:"submit"})))};const w=function(e){var t=e.icon,n=e.label,r=e.src,o=e.onSelectURL,s=e.onSelectMedia,u=e.isUploadingArchive,p=e.archiveFolder,d=e.uploadIframeArchive,f=e.error,h=(0,a.useState)(!1),m=(0,l.Z)(h,2),v=m[0],w=m[1],k=(0,a.useState)(r),_=(0,l.Z)(k,2),E=_[0],S=_[1],x=function(e){S(e.target.value)},C=function(){w(!0)},M=function(){w(!1)},T=function(e){e.preventDefault(),E&&o&&(o(E),M())},P=function(e){s(e.id)};return(0,a.createElement)(i.Placeholder,{icon:(0,a.createElement)(c.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-newspack-blocks-iframe",instructions:__("Upload an asset folder (.zip), a document (PDF, Word, Excel sheet, or a PPT), pick one from your media library, or add one with a URL.","newspack-blocks")},f&&(0,a.createElement)(i.Notice,{status:"error",className:"wp-block-newspack-blocks-iframe-notice",isDismissible:!1},f),(0,a.createElement)("div",null,u?(0,a.createElement)(i.Spinner,null):(0,a.createElement)(i.FormFileUpload,{accept:y.join(","),onChange:function(e){var t=e.target.files;0<t.length&&d(t.item(0))},multiple:!1,render:function(e){var t,n,r=e.openFileDialog;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.Button,{isPrimary:!0,className:g()("wp-block-newspack-blocks-iframe__button","wp-block-newspack-blocks-iframe__upload-button"),onClick:r},__(p?"Update":"Upload","newspack-blocks")),(n=P,(0,a.createElement)(c.MediaUpload,{onSelect:n,allowedTypes:y,render:function(e){var t=e.open;return(0,a.createElement)(i.Button,{variant:"tertiary",onClick:t},__("Media Library","newspack-blocks"))}})),(t=""!==p,o&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-iframe__url-input-container"},(0,a.createElement)(i.Button,{isTertiary:!0,onClick:C,isPressed:v,variant:"tertiary"},__(t?"Update from URL":"Embed from URL","newspack-blocks")),v&&(0,a.createElement)(b,{src:E,onChange:x,onSubmit:T,onClose:M}))))}})))};var k=(0,a.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(i.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})),_=o.__,E=(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},(0,a.createElement)(i.Path,{d:"M12 18.8c-4.8 0-8.5-6.1-8.6-6.4l-.3-.4.2-.4c.2-.3 3.9-6.4 8.6-6.4 4.7 0 8.5 6.1 8.6 6.4l.2.4-.2.4c0 .2-3.7 6.4-8.5 6.4zM4.9 12c.9 1.3 3.8 5.2 7.1 5.2s6.3-4 7.1-5.2c-.9-1.3-3.8-5.3-7.1-5.3-3.3.1-6.3 4-7.1 5.3z"}),(0,a.createElement)(i.Path,{d:"M15 11.2c-.3.5-.8.8-1.4.8-.9 0-1.6-.7-1.6-1.6 0-.5.3-1 .7-1.3-.2 0-.5-.1-.7-.1-1.7 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.7 0 3.2-1.4 3.2-3.2 0-.3-.1-.7-.2-1z"}));const S=function(e){var t=e.attributes,n=e.setAttributes,r=_("Iframe","block title"),o=t.mode,p=t.src,f=t.archiveFolder,h=t.isFullScreen,m=t.height,v=t.width,g=(0,a.useState)(!0),y=(0,l.Z)(g,2),b=y[0],S=y[1],x=(0,a.useState)(),C=(0,l.Z)(x,2),M=C[0],T=C[1],P=(0,a.useState)(),A=(0,l.Z)(P,2),O=A[0],I=A[1],N=[{value:"px",label:"px"},{value:"%",label:"%"},{value:"em",label:"em"}],D=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),T(!0),e.prev=2,(r=new FormData).append("iframe_url",t),e.next=7,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-mode-from-url",method:"POST",body:r});case 7:a=e.sent,i=a.mode,n({mode:i,src:t}),S(!0),f&&R(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),I(e.t0.message||_("An error occured when uploading the iframe archive.","newspack-blocks"));case 17:T(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(_x){return e.apply(this,arguments)}}(),z=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),T(!0),e.prev=2,(r=new FormData).append("archive_folder",f),r.append("iframe_file",t),e.next=8,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-archive",method:"POST",body:r});case 8:a=e.sent,i=a.src,o=a.dir,s=a.mode,n({mode:s,src:i,archiveFolder:o}),S(!0),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),I(e.t0.message||_("An error occured when uploading the iframe archive.","newspack-blocks"));case 19:T(!1);case 20:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),T(!0),e.prev=2,(r=new FormData).append("media_id",t),e.next=7,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-archive-from-media",method:"POST",body:r});case 7:a=e.sent,i=a.src,o=a.dir,s=a.mode,n({mode:s,src:i,archiveFolder:o}),S(!0),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),I(e.t0.message||_("An error occured when setting the iframe from the archive media.","newspack-blocks"));case 18:T(!1);case 19:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){p&&f&&!p.includes(f)&&d()({path:"/newspack-blocks/v1/newspack-blocks-remove-iframe-archive",method:"DELETE",body:JSON.stringify({archive_folder:f})})},j=[{icon:(0,a.createElement)(u.Z,{icon:E}),title:_(b?"Hide iframe preview":"Show iframe preview","newspack-blocks"),onClick:function(){return S(!b)},isActive:b}];return(0,a.createElement)(a.Fragment,null,h&&(0,a.createElement)(i.Notice,{status:"warning",className:"wp-block-newspack-blocks-iframe-notice",isDismissible:!1},_("This block will take over the page content.","newspack-blocks")),p&&b?(0,a.createElement)("div",{className:"iframe-container"},(0,a.createElement)(i.FocusableIframe,{title:_("Newspack embedded iframe","newspack-blocks"),src:"document"===o?"https://docs.google.com/gview?embedded=true&url=".concat(encodeURIComponent(p)):p,style:{width:h?"100vw":v,height:h?"100vh":m,"max-width":"100%","max-height":"100%"}})):(0,a.createElement)(w,{icon:k,label:r,src:p,onSelectURL:D,onSelectMedia:L,isUploadingArchive:M,archiveFolder:f,uploadIframeArchive:z,error:O}),(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(i.Toolbar,{controls:p&&j})),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(i.PanelBody,{title:_("Iframe Settings","newspack-blocks"),initialOpen:!0},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.ToggleControl,{label:_("Fullscreen","newspack-blocks"),help:_("If enabled, the iframe will be full screen and hide all the post content.","newspack-blocks"),checked:h,onChange:function(e){return n({isFullScreen:e})},required:!0}),!h&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-iframe__unit-control"},(0,a.createElement)(i.__experimentalUnitControl,{label:_("Width","newspack-blocks"),onChange:function(e){return n({width:e})},value:v,units:N}),(0,a.createElement)(i.__experimentalUnitControl,{label:_("Height","newspack-blocks"),onChange:function(e){return n({height:e})},value:m,units:N}))))))},x=JSON.parse('{"u2":"iframe","W3":"newspack","Y4":{"className":{"type":"string","default":""},"src":{"type":"string","default":""},"archiveFolder":{"type":"string","default":""},"height":{"type":"string","default":"600px"},"width":{"type":"string","default":"100%"},"isFullScreen":{"type":"boolean","default":false},"mode":{"type":"string","default":"iframe"}}}');var C=o.__,M=x.u2,T=x.Y4,P=x.W3,A={title:C("Iframe","newspack-blocks"),icon:{src:k,foreground:"#36f"},category:P,keywords:[C("iframe","newspack-blocks"),C("project iframe","newspack-blocks")],description:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,C("Embed an iframe.","newspack-blocks")),(0,a.createElement)(i.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/iframe-block/"},C("Support reference","newspack-blocks"))),attributes:T,supports:{html:!1,align:["wide","full"]},edit:S,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(M),A)},9133:(e,t,n)=>{"use strict";n.d(t,{m:()=>u});var r,a=n(4942),i=n(9062),o=n(9307),s=n(5609),l=n(5736),__=l.__,c=(null===(r=window.newspack_blocks_data)||void 0===r?void 0:r.author_custom_fields)||[],u=function(e){var t=e.attributes,n=e.setAttributes,r=[{name:"Bio",label:__("Biographical info","newspack-blocks")},{name:"Social",label:__("Social links","newspack-blocks")},{name:"Email",label:__("Email address","newspack-blocks")},{name:"ArchiveLink",label:__("Link to author archive","newspack-blocks")}].concat((0,i.Z)(c));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,__("Display the following fields:","newspack-blocks")),r.map((function(e){var r="show".concat(e.name);return(0,o.createElement)(s.ToggleControl,{key:e.name,label:e.label,checked:Boolean(t[r]),onChange:function(){return n((0,a.Z)({},r,!t[r]))}})})))}},1378:(e,t,n)=>{"use strict";n.r(t);var r=n(4981),a=n(9307),i=n(5609),o=n(5736),s=n(5048),l=n(3144),c=n(7326),u=n(136),p=n(8347),d=n(4942),f=n(6989),h=n.n(f),m=n(2175),v=n(6483),g=n(2629),y=n(9429),__=o.__;const b=function(e){(0,u.Z)(n,e);var t=(0,p.Z)(n);function n(e){var r;return(0,s.Z)(this,n),r=t.call(this,e),(0,d.Z)((0,c.Z)(r),"fetchCategorySuggestions",(function(e){return h()({path:(0,v.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,d.Z)((0,c.Z)(r),"fetchSavedCategories",(function(e){return h()({path:(0,v.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),r.state={isLoading:!1,error:"",embed:"",interactive:!1},r}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.refreshPreview()}},{key:"componentDidUpdate",value:function(e){var t=this.props.attributes,n=t.categories,r=t.videosToShow,a=e.attributes,i=a.categories,o=a.videosToShow;n===i&&r===o||this.refreshPreview()}},{key:"refreshPreview",value:function(){var e=this,t=this.props.attributes,n=t.categories,r=t.videosToShow,a=(0,v.addQueryArgs)("/newspack-blocks/v1/video-playlist",{categories:n,videosToShow:r});this.setState({isLoading:!0},(function(){h()({path:a}).then((function(t){var n=t.html;e.setState({embed:n,isLoading:!1})})).catch((function(t){e.setState({isLoading:!1,error:t.message})}))}))}},{key:"renderPlaceholder",value:function(){var e=this.state,t=e.isLoading,n=e.error,r=e.embed;return t?(0,a.createElement)(i.Placeholder,{icon:(0,a.createElement)(i.Spinner,null),className:"component-placeholder__align-center"}):n.length?(0,a.createElement)(i.Placeholder,{icon:"warning",label:__("Error","newspack-blocks"),instructions:n}):r.length?null:(0,a.createElement)(i.Placeholder,{icon:"warning",label:__("Error","newspack-blocks"),instructions:__("No videos found","newspack-blocks")})}},{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=n.categories,s=n.videosToShow,l=this.state,c=l.embed,u=l.isLoading,p=l.interactive;return(0,a.createElement)(a.Fragment,null,(u||""===c)&&this.renderPlaceholder(),!(u||""===c)&&(0,a.createElement)("div",{className:"wpbnbvp-preview"},(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:c}}),!p&&(0,a.createElement)("div",{className:"wpbnbvp__overlay",onMouseUp:function(){return e.hideOverlay()}})),(0,a.createElement)(m.InspectorControls,null,(0,a.createElement)(i.PanelBody,{title:__("Settings","newspack-blocks"),initialOpen:!0},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.RangeControl,{className:"videosToShow",label:__("Videos","newspack-blocks"),help:__("The maximum number of videos to pull from posts.","newspack-blocks"),value:s,onChange:function(e){return r({videosToShow:e})},min:1,max:30,required:!0}),(0,a.createElement)(y.Z,{key:"categories",tokens:o||[],onChange:function(e){return r({categories:e})},fetchSuggestions:this.fetchCategorySuggestions,fetchSavedInfo:this.fetchSavedCategories,label:__("Categories","newspack-blocks")})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),n}(a.Component);var w=o.__,k={title:w("YouTube Video Playlist","newspack-blocks"),icon:{src:(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(i.Path,{d:"M13 10.5L8.833 8v5z"}),(0,a.createElement)(i.Path,{clipRule:"evenodd",d:"M4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.272 3.728 18 4.625 18h11.75c.897 0 1.625-.728 1.625-1.625V4.625C18 3.728 17.272 3 16.375 3zm11.75 1.5H4.625a.125.125 0 00-.125.125v11.75c0 .069.056.125.125.125h11.75a.125.125 0 00.125-.125V4.625a.125.125 0 00-.125-.125z",fillRule:"evenodd"}),(0,a.createElement)(i.Path,{d:"M20.25 8v11c0 .69-.56 1.25-1.249 1.25H6v1.5h13.001A2.749 2.749 0 0021.75 19V8z"})),foreground:"#36f"},category:"newspack",keywords:[w("video","newspack-blocks"),w("playlist","newspack-blocks"),w("youtube","newspack-blocks")],description:w("Embed a playlist of latest YouTube videos.","newspack-blocks"),attributes:{className:{type:"string"},categories:{type:"array",default:[]},videosToShow:{type:"integer",default:5}},supports:{html:!1,align:!0},edit:b,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat("youtube-video-playlist"),k)},9429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(9062),a=n(5048),i=n(3144),o=n(7326),s=n(136),l=n(8347),c=n(4942),u=n(9307),p=n(2819),d=n(5609);const f=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(e){var r;return(0,a.Z)(this,n),r=t.call(this,e),(0,c.Z)((0,o.Z)(r),"isFetchingInfoOnLoad",(function(){var e=r.props,t=e.tokens,n=e.fetchSavedInfo;return Boolean(t.length&&n)})),r.state={suggestions:[],validValues:{},loading:r.isFetchingInfoOnLoad()},r.debouncedUpdateSuggestions=(0,p.debounce)(r.updateSuggestions,500),r}return(0,i.Z)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,n=t.tokens;(0,t.fetchSavedInfo)(n).then((function(t){var n=e.state.validValues;t.forEach((function(e){n[e.value]=e.label})),e.setState({validValues:n,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,n){return t[n]?[].concat((0,r.Z)(e),[t[n]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(n){return t[n]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,n=this.props.fetchSuggestions;n&&this.setState({loading:!0},(function(){var r=n(e);r.then((function(e){if(t.suggestionsRequest===r){var n=t.state.validValues,a=[];e.forEach((function(e){var t=e.label.trim();a.indexOf(t)>=0&&(e.label="".concat(t," (").concat(e.value,")")),a.push(t),n[e.value]=t})),t.setState({suggestions:a,validValues:n,loading:!1})}})).catch((function(){t.suggestionsRequest===r&&t.setState({loading:!1})})),t.suggestionsRequest=r}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.help,r=t.label,a=void 0===r?"":r,i=this.state,o=i.suggestions,s=i.loading;return(0,u.createElement)("div",{className:"autocomplete-tokenfield"},(0,u.createElement)(d.FormTokenField,{value:this.getTokens(),suggestions:o,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:a}),s&&(0,u.createElement)(d.Spinner,null),n&&(0,u.createElement)("p",{className:"autocomplete-tokenfield__help"},n))}}]),n}(u.Component)},96:(e,t,n)=>{"use strict";n.d(t,{L:()=>c,H:()=>u});var r=n(9062),a=n(9307),i=n(5736),o=n(5609),s=n(9818),__=i.__,l=function(e){var t=e.options,n=e.values,i=e.onChange;return Array.isArray(t)?t.map((function(e){var t=e.name,s=e.slug;return(0,a.createElement)(o.PanelRow,{key:s},(0,a.createElement)(o.CheckboxControl,{label:t,checked:n.indexOf(s)>-1,onChange:function(e){var t=(0,r.Z)(new Set(n));e&&-1===t.indexOf(s)?t.push(s):!e&&t.indexOf(s)>-1&&t.splice(t.indexOf(s),1),i(t)}}))})):(0,a.createElement)(o.Spinner,null)},c=function(e){var t=e.attributes,n=e.setAttributes,r=(0,s.useSelect)((function(e){var t;return{availablePostTypes:null===(t=(0,e("core").getPostTypes)({per_page:-1}))||void 0===t?void 0:t.filter((function(e){return e.supports.newspack_blocks}))}})).availablePostTypes;return(0,a.createElement)(o.PanelBody,{title:__("Post Types","newspack-blocks")},(0,a.createElement)(l,{options:r,values:t.postType,onChange:function(e){return n({postType:e})}}))},u=function(e){var t=e.attributes,n=e.setAttributes;return(0,a.createElement)(o.PanelBody,{title:__("Additional Post Statuses","newspack-blocks")},(0,a.createElement)(o.PanelRow,null,(0,a.createElement)("i",null,__("Selection here has effect only for editors, regular users will only see published posts.","newspack-blocks"))),(0,a.createElement)(l,{values:t.includedPostStatuses,options:[{name:"Draft",slug:"draft"},{name:"Scheduled",slug:"future"}],onChange:function(e){return n({includedPostStatuses:e})}}))}},6967:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(9062),a=n(3144),i=n(5048),o=n(7326),s=n(136),l=n(8347),c=n(4942),u=n(9307),p=n(5736),d=n(5609),f=n(6989),h=n.n(f),m=n(6483),v=n(2629),g=n(9429),__=p.__,y=function(e){return(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")},b=function(e){return(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")},w=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(){var e;(0,i.Z)(this,n);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return e=t.call.apply(t,[this].concat(s)),(0,c.Z)((0,o.Z)(e),"state",{showAdvancedFilters:!1}),(0,c.Z)((0,o.Z)(e),"fetchPostSuggestions",(function(t){var n=e.props.postType,r=window.newspack_blocks_data.specific_posts_rest_url;return h()({url:(0,m.addQueryArgs)(r,{search:t,postsToShow:20,_fields:"id,title",type:"post",postType:n})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.title)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchSavedPosts",(function(t){var n=e.props.postType,r=window.newspack_blocks_data.posts_rest_url;return h()({url:(0,m.addQueryArgs)(r,{postsToShow:100,include:t.join(","),_fields:"id,title",postType:n})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.title.rendered)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchAuthorSuggestions",(function(e){var t=window.newspack_blocks_data.authors_rest_url;return h()({url:(0,m.addQueryArgs)(t,{search:e,per_page:20,fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no name)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchSavedAuthors",(function(e){var t=window.newspack_blocks_data.authors_rest_url;return h()({url:(0,m.addQueryArgs)(t,{per_page:100,include:e.join(","),fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no name)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchCategorySuggestions",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name,parent",orderby:"count",order:"desc"})}).then((function(e){return Promise.all(e.map((function(e){return e.parent>0?h()({path:(0,m.addQueryArgs)("/wp/v2/categories/".concat(e.parent),{_fields:"name"})}).then((function(t){return{value:e.id,label:"".concat(y(e)," – ").concat(y(t))}})):Promise.resolve({value:e.id,label:y(e)})})))}))})),(0,c.Z)((0,o.Z)(e),"fetchSavedCategories",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchTagSuggestions",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchSavedTags",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"fetchCustomTaxonomiesSuggestions",(function(e,t){return h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e),{search:t,per_page:20,_fields:"id,name,parent",orderby:"count",order:"desc"})}).then((function(t){return Promise.all(t.map((function(t){return t.parent>0?h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e,"/").concat(t.parent),{_fields:"name"})}).then((function(e){return{value:t.id,label:"".concat(b(t)," – ").concat(b(e))}})):Promise.resolve({value:t.id,label:b(t)})})))}))})),(0,c.Z)((0,o.Z)(e),"fetchSavedCustomTaxonomies",(function(e,t){return h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e),{per_page:100,_fields:"id,name",include:t.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,o.Z)(e),"render",(function(){var t,n=e.props,a=n.specificMode,i=n.onSpecificModeChange,o=n.specificPosts,s=n.onSpecificPostsChange,l=n.authors,c=n.onAuthorsChange,p=n.categories,f=n.onCategoriesChange,h=n.includeSubcategories,m=n.onIncludeSubcategoriesChange,v=n.tags,y=n.onTagsChange,b=n.customTaxonomies,w=n.onCustomTaxonomiesChange,k=n.tagExclusions,_=n.onTagExclusionsChange,E=n.categoryExclusions,S=n.onCategoryExclusionsChange,x=n.enableSpecific,C=e.state.showAdvancedFilters,M=null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.custom_taxonomies,T=function(e){var t=b.find((function(t){return t.slug===e}));return t?t.terms:[]};return(0,u.createElement)(u.Fragment,null,x&&(0,u.createElement)(d.ToggleControl,{checked:a,onChange:i,label:__("Choose Specific Posts","newspack-blocks")}),a?(0,u.createElement)(g.Z,{tokens:o||[],onChange:s,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:__("Posts","newspack-blocks"),help:__("Begin typing post title, click autocomplete result to select.","newspack-blocks")}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(d.QueryControls,e.props),c&&(0,u.createElement)(g.Z,{tokens:l||[],onChange:c,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:__("Authors","newspack-blocks")}),f&&(0,u.createElement)(g.Z,{tokens:p||[],onChange:f,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:__("Categories","newspack-blocks")}),m&&(0,u.createElement)(d.ToggleControl,{checked:h,onChange:m,label:__("Include subcategories ","newspack-blocks")}),y&&(0,u.createElement)(g.Z,{tokens:v||[],onChange:y,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:__("Tags","newspack-blocks")}),w&&M.map((function(t){return(0,u.createElement)(g.Z,{key:"".concat(b[t.slug],"-selector"),tokens:T(t.slug),onChange:function(e){!function(e,t){var n=b.filter((function(t){return t.slug!==e}));n=[].concat((0,r.Z)(n),[{slug:e,terms:t}]),w(n)}(t.slug,e)},fetchSuggestions:function(n){return e.fetchCustomTaxonomiesSuggestions(t.slug,n)},fetchSavedInfo:function(n){return e.fetchSavedCustomTaxonomies(t.slug,n)},label:t.label})})),_&&(0,u.createElement)("p",null,(0,u.createElement)(d.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!C})}},__(C?"Hide Advanced Filters":"Show Advanced Filters","newspack-blocks"))),C&&(0,u.createElement)(u.Fragment,null,_&&(0,u.createElement)(g.Z,{tokens:k||[],onChange:_,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:__("Excluded Tags","newspack-blocks")}),S&&(0,u.createElement)(g.Z,{tokens:E||[],onChange:S,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:__("Excluded Categories","newspack-blocks")}))))})),e}return(0,a.Z)(n)}(u.Component);w.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],customTaxonomies:[],tagExclusions:[]};const k=w},5189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9307),a=n(5736),i=n(5609),__=a.__;const o=function(e){var t=e.attributes,n=e.setAttributes;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.SelectControl,{label:__("Post-Checkout Button","newspack-blocks"),help:__("After a successful purchase, a button will be presented to finish the process.","newspack-blocks"),value:t.afterSuccessBehavior,options:[{label:__("Close the modal","newspack-blocks"),value:""},{label:__("Go to a custom URL","newspack-blocks"),value:"custom"},{label:__("Go to the previous page","newspack-blocks"),value:"referrer"}],onChange:function(e){n({afterSuccessBehavior:e.toString()})}}),(0,r.createElement)(i.TextControl,{label:__("Button Label","newspack-blocks"),value:t.afterSuccessButtonLabel||"",onChange:function(e){return n({afterSuccessButtonLabel:e})}}),"custom"===t.afterSuccessBehavior&&(0,r.createElement)(i.TextControl,{label:__("Custom URL","newspack-blocks"),placeholder:__("https://example.com","newspack-blocks"),value:t.afterSuccessURL||"",onChange:function(e){return n({afterSuccessURL:e})}}))}},6896:(e,t,n)=>{"use strict";var r=n(9062),a=n(9307),i=n(4981),o=n(5609),s=n(4184),l=n.n(s);const c=function(e){var t=e.size,n=void 0===t?24:t,r=e.className;return(0,a.createElement)(o.SVG,{className:l()("newspack-logo",r),width:n,height:n,viewBox:"0 0 32 32"},(0,a.createElement)(o.Path,{d:"M16 32c8.836 0 16-7.164 16-16S24.836 0 16 0 0 7.164 0 16s7.163 16 16 16z",fill:"#36F"}),(0,a.createElement)(o.Path,{d:"M22.988 16.622h-1.72l-1.103-1.124h2.823v1.124zm0-3.31H18.02l-1.102-1.124h6.071v1.124zm0-3.31h-8.217l-1.103-1.125h9.32v1.125zm0 13.12L9.012 8.878v4.749l.069.071h-.07v9.426h3.451v-5.98l5.867 5.98h4.66z",fill:"#fff"}))};(0,i.setCategories)([].concat((0,r.Z)((0,i.getCategories)().filter((function(e){return"newspack"!==e.slug}))),[{slug:"newspack",title:"Newspack",icon:(0,a.createElement)(c,null)}])),(0,i.registerBlockStyle)("core/columns",{name:"borders",label:"Borders"}),(0,i.registerBlockStyle)("core/columns",{name:"first-col-to-second",label:"Move first column to second"}),(0,i.registerBlockStyle)("core/columns",{name:"first-col-to-third",label:"Move first column to third"}),(0,n(2694).addFilter)("blocks.registerBlockType","newspack-blocks",(function(e,t){if("core/group"===t){var n=e.supports.align;-1===n.indexOf("left")&&n.push("left"),-1===n.indexOf("right")&&n.push("right")}return e})),(0,i.registerBlockStyle)("core/group",{name:"border",label:"Border"});const u=window.wp.domReady;var p=["jetpack/donations","jetpack/subscriptions"];n.n(u)()((function(){p.forEach((function(e){(0,i.getBlockType)(e)&&(0,i.unregisterBlockType)(e)}))}))},2089:(e,t,n)=>{"use strict";n.d(t,{lW:()=>o,FX:()=>s,b2:()=>l,Q$:()=>c,fC:()=>u});var r=n(9062),a=n(9307),i=n(5736),_x=i._x,__=i.__,o=function(e){return e.map((function(e){return(0,a.createElement)("span",{className:"avatar author-avatar",key:e.id},(0,a.createElement)("a",{className:"url fn n",href:e.author_link},(0,a.createElement)(a.RawHTML,null,e.avatar)))}))},s=function(e){return(0,a.createElement)("span",{className:"byline"},(0,a.createElement)("span",{className:"author-prefix"},_x("by","post author","newspack-blocks"))," ",e.reduce((function(t,n,i){return[].concat((0,r.Z)(t),[(0,a.createElement)("span",{className:"author vcard",key:n.id},(0,a.createElement)("a",{className:"url fn n",href:n.author_link},n.display_name)),i<e.length-2&&", ",e.length>1&&i===e.length-2&&_x(" and ","post author","newspack-blocks")])}),[]))},l=function(e){return(0,a.createElement)("span",{className:"sponsor-logos"},e.map((function(e){return(0,a.createElement)(a.Fragment,{key:e.id},e.src&&(0,a.createElement)("a",{href:e.sponsor_url},(0,a.createElement)("img",{src:e.src,width:e.img_width,height:e.img_height,alt:e.sponsor_name})))})))},c=function(e){return(0,a.createElement)("span",{className:"byline sponsor-byline"},e[0].byline_prefix," ",e.reduce((function(t,n,i){return[].concat((0,r.Z)(t),[(0,a.createElement)("span",{className:"author",key:n.id},(0,a.createElement)("a",{href:n.author_link},n.sponsor_name)),i<e.length-2&&", ",e.length>1&&i===e.length-2&&_x(" and ","post author","newspack-blocks")])}),[]))},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"publish"!==e.post_status?(0,a.createElement)("div",{className:"newspack-preview-label"},{draft:__("Draft","newspack-blocks"),future:__("Scheduled","newspack-blocks")}[e.post_status]):null}},9196:e=>{"use strict";e.exports=window.React},2819:e=>{"use strict";e.exports=window.lodash},6292:e=>{"use strict";e.exports=window.moment},6989:e=>{"use strict";e.exports=window.wp.apiFetch},2175:e=>{"use strict";e.exports=window.wp.blockEditor},4981:e=>{"use strict";e.exports=window.wp.blocks},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},9818:e=>{"use strict";e.exports=window.wp.data},9771:e=>{"use strict";e.exports=window.wp.date},9307:e=>{"use strict";e.exports=window.wp.element},2694:e=>{"use strict";e.exports=window.wp.hooks},2629:e=>{"use strict";e.exports=window.wp.htmlEntities},5736:e=>{"use strict";e.exports=window.wp.i18n},9630:e=>{"use strict";e.exports=window.wp.keycodes},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},4654:()=>{},907:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},3878:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},5057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(907);function a(e){if(Array.isArray(e))return(0,r.Z)(e)}},7326:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>r})},5861:(e,t,n)=>{"use strict";function r(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,l,"next",e)}function l(e){r(o,a,i,s,l,"throw",e)}s(void 0)}))}}n.d(t,{Z:()=>a})},5048:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},3144:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:()=>a})},8347:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function a(e){return a="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},a(e)}n.d(t,{Z:()=>s});var i=n(7326);function o(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return o(this,n)}}},4942:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9611);function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},9199:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:()=>r})},1902:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],_n=!0,o=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(s){o=!0,a=s}finally{try{_n||null==n.return||n.return()}finally{if(o)throw a}}return i}}n.d(t,{Z:()=>r})},5267:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},2786:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},1413:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(4942);function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},3366:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{Z:()=>r})},9611:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:()=>r})},3324:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3878),a=n(1902),i=n(181),o=n(5267);function s(e,t){return(0,r.Z)(e)||(0,a.Z)(e,t)||(0,i.Z)(e,t)||(0,o.Z)()}},9062:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5057),a=n(9199),i=n(181),o=n(2786);function s(e){return(0,r.Z)(e)||(0,a.Z)(e)||(0,i.Z)(e)||(0,o.Z)()}},181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(907);function a(e,t){if(e){if("string"==typeof e)return(0,r.Z)(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)?(0,r.Z)(e,t):void 0}}},3357:e=>{"use strict";e.exports=JSON.parse('{"u2":"homepage-articles","W3":"newspack","Y4":{"className":{"type":"string","default":""},"showExcerpt":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55},"showReadMore":{"type":"boolean","default":false},"readMoreLabel":{"type":"string","default":"Keep reading"},"showDate":{"type":"boolean","default":true},"showImage":{"type":"boolean","default":true},"showCaption":{"type":"boolean","default":false},"disableImageLazyLoad":{"type":"boolean","default":false},"fetchPriority":{"type":"string","default":""},"imageShape":{"type":"string","default":"landscape"},"minHeight":{"type":"integer","default":0},"moreButton":{"type":"boolean","default":false},"moreButtonText":{"type":"string","default":""},"showAuthor":{"type":"boolean","default":true},"showAvatar":{"type":"boolean","default":true},"showCategory":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"integer","default":3},"colGap":{"type":"integer","default":3},"postsToShow":{"type":"integer","default":3},"mediaPosition":{"type":"string","default":"top"},"authors":{"type":"array","default":[],"items":{"type":"integer"}},"categories":{"type":"array","default":[],"items":{"type":"integer"}},"includeSubcategories":{"type":"boolean","default":true},"tags":{"type":"array","default":[],"items":{"type":"integer"}},"customTaxonomies":{"type":"array","default":[],"items":{"type":"object","properties":{"slug":{"type":"string"},"terms":{"type":"array","items":{"type":"integer"}}}}},"tagExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"categoryExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"specificPosts":{"type":"array","default":[],"items":{"type":"integer"}},"typeScale":{"type":"integer","default":4},"imageScale":{"type":"integer","default":3},"mobileStack":{"type":"boolean","default":false},"sectionHeader":{"type":"string","default":""},"specificMode":{"type":"boolean","default":false},"textColor":{"type":"string","default":""},"customTextColor":{"type":"string","default":""},"singleMode":{"type":"boolean","default":false},"showSubtitle":{"type":"boolean","default":false},"postType":{"type":"array","default":["post"],"items":{"type":"string"}},"textAlign":{"type":"string","default":"left"},"includedPostStatuses":{"type":"array","default":["publish"],"items":{"type":"string"}},"deduplicate":{"type":"boolean","default":true}}}')}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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.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})},n(6896),n(7501),n(7362),n(5671),n(6573),n(1167),n(1341),n(92);var r=n(1378),a=window;for(var i in r)a[i]=r[i];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
|
|
36
|
+
*/n(7418);var r=n(9196),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),t.Fragment=o("react.fragment")}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},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)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:i.current}}t.jsx=c,t.jsxs=c},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},2490:(e,t,n)=>{"use strict";var r=n(210),a=n(2296),o=n(1044)(),i=n(7296),s=r("%TypeError%"),l=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(o?a(e,"length",t,!0,!0):a(e,"length",t)),e}},7478:(e,t,n)=>{"use strict";var r=n(210),a=n(1924),o=n(631),i=r("%TypeError%"),s=r("%WeakMap%",!0),l=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),p=a("WeakMap.prototype.has",!0),d=a("Map.prototype.get",!0),f=a("Map.prototype.set",!0),h=a("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+o(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return d(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(l){if(t)return h(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,a){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,a)):l?(t||(t=new l),f(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},7501:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),o=n(5736),i=n(1984),s=n(444);const l=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));var c=n(4942),u=n(9062),p=n(5861),d=n(885),f=n(6989),h=n.n(f),m=n(2175),v=n(5609),g=n(2629);const y=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));var b=n(8341),w=n(5573),k=n(4688),_=n(6483),E=n(8438),S=n(2009),x=n(9133),C=n(272),T=n(3967),M=n.n(T),__=o.__;const P=function(e){var t,n,r=e.attributes,s=e.clientId,f=e.setAttributes,T=(0,a.useState)(null),P=(0,d.Z)(T,2),A=P[0],O=P[1],I=(0,a.useState)(null),N=(0,d.Z)(I,2),z=N[0],D=N[1],L=(0,a.useState)(!1),R=(0,d.Z)(L,2),j=R[0],B=R[1],F=(0,a.useState)(0),$=(0,d.Z)(F,2),H=$[0],q=$[1],V=Boolean(null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.can_use_cap),Z=null===(n=window.newspack_blocks_data)||void 0===n?void 0:n.editable_roles,U=[],G=r.authorRoles,W=r.authorType,Y=r.columns,X=r.exclude,K=r.excludeEmpty,Q=r.layout,J=r.showAvatar,ee=r.showSeparators,te=r.separatorSections,ne=r.textSize,re=r.avatarAlignment,ae=r.avatarBorderRadius,oe=r.avatarSize,ie=r.avatarHideDefault,se="columns"===Q;(0,a.useEffect)((function(){le()}),[G,W,ie,X,K]);var le=function(){var e=(0,p.Z)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(null),B(!0),e.prev=2,t={author_type:W,author_roles:G,exclude:X.map((function(e){return{value:e.value,isGuest:e.isGuest}}))},K&&(t.exclude_empty=1),ie&&(t.avatar_hide_default=1),e.next=8,h()({path:(0,_.addQueryArgs)("/newspack-blocks/v1/author-list",t)});case 8:if(n=e.sent){e.next=11;break}throw __("Error fetching authors.","newspack-blocks");case 11:O(n),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),D(e.t0.message||e.t0||__("Error fetching authors.","newspack-blocks"));case 17:B(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),ce={};return Array.isArray(A)&&te&&A.forEach((function(e){var t=e.last_name.charAt(0).toUpperCase();ce.hasOwnProperty(t)||(ce[t]=[]),ce[t].push(e)})),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(m.InspectorControls,null,(0,a.createElement)(v.PanelBody,{title:__("Author List Settings","newspack-blocks")},V&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.RadioControl,{label:__("Author Type","newspack-blocks"),help:(0,o.sprintf)(__("%s will be displayed.","newspack-blocks"),"all"===W?__("Both guest authors and WP users","newspack-blocks"):(0,o.sprintf)(__("%s only","newspack-blocks"),__("guest-authors"===W?"Guest authors":"WP users","newspack-blocks"))),selected:W||"all",options:[{label:__("All authors","newspack-blocks"),value:"all"},{label:__("Guest authors","newspack-blocks"),value:"guest-authors"},{label:__("WP users","newspack-blocks"),value:"users"}],onChange:function(e){return f({authorType:e})}})),se&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.RangeControl,{label:__("Columns","newspack-blocks"),value:Y,onChange:function(e){return f({columns:e})},min:2,max:6,required:!0})),"guest-authors"!==W&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.BaseControl,{id:"newspack-blocks__author-list-roles",label:__("WP User Roles","newspack-blocks")},Z.map((function(e,t){return(0,a.createElement)(v.CheckboxControl,{checked:-1<G.indexOf(e),key:t,label:e,value:e,onChange:function(t){var n=t?[].concat((0,u.Z)(G),[e]):G.filter((function(t){return t!==e}));f({authorRoles:n})}})})))),(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Display alphabetical separators","newspack-blocks"),help:__("Chunk authors alphabetically.","newspack-blocks"),checked:ee,onChange:function(){return f({showSeparators:!ee})}})),se&&ee&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Group authors by alphabet","newspack-blocks"),help:__("Display each alphabetical chunk as a discrete section.","newspack-blocks"),checked:te,onChange:function(){return f({separatorSections:!te})}}))),(0,a.createElement)(v.PanelBody,{title:__("Author List Exclusions","newspack-block")},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Exclude authors with 0 posts","newspack-blocks"),help:(0,o.sprintf)(__("Authors with no published posts will be %s.","newspack-blocks"),__(K?"hidden":"displayed","newspack-blocks")),checked:K,onChange:function(){return f({excludeEmpty:!K})}})),(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(C.ah,{label:__("Search by author name","newspack-blocks"),help:__("Authors selected here will not be displayed.","newspack-blocks"),fetchSuggestions:(0,p.Z)(regeneratorRuntime.mark((function e(){var t,n,r,a,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:null,n=i.length>1&&void 0!==i[1]?i[1]:0,e.next=4,h()({parse:!1,path:(0,_.addQueryArgs)("/newspack-blocks/v1/authors",{search:t,offset:n,fields:"id,name"})});case 4:return r=e.sent,a=parseInt(r.headers.get("x-wp-total")||0),e.next=8,r.json();case 8:return o=e.sent,H||t||q(a),e.abrupt("return",o.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no name)","newspack-blocks"),isGuest:e.is_guest}})));case 11:case"end":return e.stop()}}),e)}))),maxItemsToSuggest:H,multiSelect:!0,onChange:function(e){return f({exclude:e})},postTypeLabel:__("author","newspack-blocks"),postTypeLabelPlural:__("authors","newspack-blocks"),selectedItems:X}))),(0,a.createElement)(v.PanelBody,{title:__("Author Profile Settings","newspack-blocks")},(0,a.createElement)(v.BaseControl,{label:__("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control"},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":__("Text Size","newspack-blocks")},E.dN.map((function(e){var t=ne===e.value;return(0,a.createElement)(v.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return f({textSize:e.value})}},e.shortName)}))))),(0,a.createElement)(x.m,{attributes:r,setAttributes:f})),(0,a.createElement)(v.PanelBody,{title:__("Avatar Settings","newspack-blocks")},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Display avatar","newspack-blocks"),checked:J,onChange:function(){return f({showAvatar:!J})}})),J&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ToggleControl,{label:__("Hide default avatar","newspack-blocks"),checked:ie,onChange:function(){return f({avatarHideDefault:!ie})}})),J&&(0,a.createElement)(v.BaseControl,{label:__("Avatar Size","newspack-blocks"),id:"newspack-blocks__avatar-size-control"},(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":__("Avatar Size","newspack-blocks")},E.E4.map((function(e){var t=oe===e.value;return(0,a.createElement)(v.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return f({avatarSize:e.value})}},e.shortName)}))))),J&&(0,a.createElement)(v.PanelRow,null,(0,a.createElement)(v.__experimentalUnitControl,{label:__("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:E.Dl,value:ae,onChange:function(e){return f({avatarBorderRadius:0>parseFloat(e)?"0":e})}})))),A&&!j&&(0,a.createElement)(m.BlockControls,null,(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(i.Z,{icon:l}),title:__("List","newspack-blocks"),isActive:"list"===Q,onClick:function(){f({layout:"list"})}},{icon:(0,a.createElement)(i.Z,{icon:y}),title:__("Columns","newspack-blocks"),isActive:se,onClick:function(){f({layout:"columns"})}}]}),J&&"is-style-center"!==r.className&&(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(i.Z,{icon:b.Z}),title:__("Show avatar on left","newspack-blocks"),isActive:"left"===re,onClick:function(){return f({avatarAlignment:"left"})}},{icon:(0,a.createElement)(i.Z,{icon:w.Z}),title:__("Show avatar on right","newspack-blocks"),isActive:"right"===re,onClick:function(){return f({avatarAlignment:"right"})}}]}),(0,a.createElement)(v.Toolbar,{controls:[{icon:(0,a.createElement)(i.Z,{icon:k.Z}),title:__("Edit selection","newspack-blocks"),onClick:function(){f({authorId:0})}}]})),(0,a.createElement)("div",{className:M()(r.className,"wp-block-newspack-blocks-author-list")},!j&&!z&&A&&Array.isArray(A)&&(0,a.createElement)(a.Fragment,null,se&&ee&&te?Object.keys(ce).map((function(e,t){return(0,a.createElement)(a.Fragment,{key:t},(0,a.createElement)("h2",{className:"newspack-blocks__author-list-separator",id:"newspack-blocks__author-list-separator__".concat(s,"__").concat(e)},e),(0,a.createElement)("ul",{className:M()("newspack-blocks__author-list-container",(0,c.Z)({"is-columns":se},"columns-".concat(Y),se))},ce[e].map((function(e,t){return(0,a.createElement)("li",{key:t,className:"newspack-blocks__author-list-item"},(0,a.createElement)(S.T,{author:e,attributes:r}))}))))})):(0,a.createElement)("ul",{className:M()("newspack-blocks__author-list-container",(0,c.Z)({"is-columns":se},"columns-".concat(Y),se))},A.map((function(e,t){var n=e.last_name.charAt(0).toUpperCase(),o=0>U.indexOf(n);return o&&U.push(n),(0,a.createElement)(a.Fragment,{key:t},ee&&o&&(0,a.createElement)("li",{className:"newspack-blocks__author-list-item"},(0,a.createElement)("h2",{className:"newspack-blocks__author-list-separator",id:"newspack-blocks__author-list-separator__".concat(s,"__").concat(n)},n)),(0,a.createElement)("li",{className:"newspack-blocks__author-list-item"},(0,a.createElement)(S.T,{author:e,attributes:r})))})))),(!A||j)&&(0,a.createElement)(v.Placeholder,{icon:(0,a.createElement)(i.Z,{icon:l}),label:__("Author List","newspack-blocks")},z&&(0,a.createElement)(v.Notice,{status:"error",isDismissible:!1},z),j&&(0,a.createElement)("div",{className:"is-loading"},__("Fetching authors…","newspack-blocks"),(0,a.createElement)(v.Spinner,null)))))},A=JSON.parse('{"u2":"author-list","W3":"newspack","Y4":{"className":{"type":"string","default":""},"columns":{"type":"number","default":2},"exclude":{"type":"array","default":[]},"excludeEmpty":{"type":"boolean","default":false},"layout":{"type":"string","default":"list"},"textSize":{"type":"string","default":"medium"},"authorRoles":{"type":"array","default":["Administrator","Editor","Author","Contributor"]},"authorType":{"type":"string","default":"all"},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"showSeparators":{"type":"boolean","default":false},"separatorSections":{"type":"boolean","default":false},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var O,I=o.__,_x=o._x,N=A.u2,z=A.Y4,D=A.W3,L=I("Author List","newspack-blocks");((null===(O=window.newspack_blocks_data)||void 0===O?void 0:O.author_custom_fields)||[]).forEach((function(e){z["show".concat(e.name)]={type:"boolean",default:!0}}));var R={title:L,icon:{src:(0,a.createElement)(i.Z,{icon:l}),foreground:"#36f"},keywords:[I("author","newspack-blocks"),I("profile","newspack-blocks")],description:I("Display a list of author profile cards.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:_x("Centered","block style","newspack-blocks")}],attributes:z,category:D,supports:{html:!1,default:""},edit:P,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(N),R)},8438:(e,t,n)=>{"use strict";n.d(t,{Dl:()=>k,dN:()=>_,E4:()=>E,ZP:()=>S});var r=n(5861),a=n(885),o=n(9307),i=n(6989),s=n.n(i),l=n(2175),c=n(5609),u=n(2629),p=n(1984),d=n(8341),f=n(5573),h=n(4688),m=n(9862),v=n(5736),g=n(6483),y=n(2009),b=n(9133),w=n(272),__=v.__,k=[{value:"%",label:"%"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"}],_=[{value:"small",label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:"medium",label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:"large",label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:"extra-large",label:__("Extra Large","newspack-blocks"),shortName:__("XL","newspack-blocks")}],E=[{value:72,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:128,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:192,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:256,label:__("Extra-large","newspack-blocks"),shortName:__("XL","newspack-blocks")}];const S=function(e){var t=e.attributes,n=e.setAttributes,i=(0,o.useState)(null),S=(0,a.Z)(i,2),x=S[0],C=S[1],T=(0,o.useState)(null),M=(0,a.Z)(T,2),P=M[0],A=M[1],O=(0,o.useState)(null),I=(0,a.Z)(O,2),N=I[0],z=I[1],D=(0,o.useState)(!1),L=(0,a.Z)(D,2),R=L[0],j=L[1],B=(0,o.useState)(0),F=(0,a.Z)(B,2),$=F[0],H=F[1],q=t.authorId,V=t.isGuestAuthor,Z=t.showSocial,U=t.showEmail,G=t.textSize,W=t.showAvatar,Y=t.avatarAlignment,X=t.avatarBorderRadius,K=t.avatarSize,Q=t.avatarHideDefault;(0,o.useEffect)((function(){0!==q&&J()}),[q,Q,V]);var J=function(){var e=(0,r.Z)(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(null),j(!0),e.prev=2,t={author_id:q,is_guest_author:V?1:0,fields:"id,name,bio,email,social,avatar,url"},Q&&(t.avatar_hide_default=1),e.next=7,s()({path:(0,g.addQueryArgs)("/newspack-blocks/v1/authors",t)});case 7:if(n=e.sent,r=n.pop()){e.next=11;break}throw(0,v.sprintf)(__("No authors or guest authors found for ID %s.","newspack-blocks"),q);case 11:C(r),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),z(e.t0.message||e.t0||(0,v.sprintf)(__("No authors or guest authors found for ID %s.","newspack-blocks"),q));case 17:j(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),ee=Z&&x&&x.social||{};return U&&x&&x.email?ee.email=x.email:delete ee.email,(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(c.PanelBody,{title:__("Author Profile Settings","newspack-blocks")},(0,o.createElement)(c.BaseControl,{label:__("Text Size","newspack-blocks"),id:"newspack-blocks__text-size-control"},(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ButtonGroup,{id:"newspack-blocks__text-size-control-buttons","aria-label":__("Text Size","newspack-blocks")},_.map((function(e){var t=G===e.value;return(0,o.createElement)(c.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return n({textSize:e.value})}},e.shortName)}))))),(0,o.createElement)(b.m,{attributes:t,setAttributes:n})),(0,o.createElement)(c.PanelBody,{title:__("Avatar Settings","newspack-blocks")},(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ToggleControl,{label:__("Display avatar","newspack-blocks"),checked:W,onChange:function(){return n({showAvatar:!W})}})),W&&(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ToggleControl,{label:__("Hide default avatar","newspack-blocks"),checked:Q,onChange:function(){return n({avatarHideDefault:!Q})}})),W&&(0,o.createElement)(c.BaseControl,{label:__("Avatar size","newspack-blocks"),id:"newspack-blocks__avatar-size-control"},(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ButtonGroup,{id:"newspack-blocks__avatar-size-control-buttons","aria-label":__("Avatar size","newspack-blocks")},E.map((function(e){var t=K===e.value;return(0,o.createElement)(c.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return n({avatarSize:e.value})}},e.shortName)}))))),W&&(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.__experimentalUnitControl,{label:__("Avatar border radius","newspack-blocks"),labelPosition:"edge",__unstableInputWidth:"80px",units:k,value:X,onChange:function(e){return n({avatarBorderRadius:0>parseFloat(e)?"0":e})}})))),x&&(0,o.createElement)(l.BlockControls,null,W&&"is-style-center"!==t.className&&(0,o.createElement)(c.Toolbar,{controls:[{icon:(0,o.createElement)(p.Z,{icon:d.Z}),title:__("Show avatar on left","newspack-blocks"),isActive:"left"===Y,onClick:function(){return n({avatarAlignment:"left"})}},{icon:(0,o.createElement)(p.Z,{icon:f.Z}),title:__("Show avatar on right","newspack-blocks"),isActive:"right"===Y,onClick:function(){return n({avatarAlignment:"right"})}}]}),(0,o.createElement)(c.Toolbar,{controls:[{icon:(0,o.createElement)(p.Z,{icon:h.Z}),title:__("Edit selection","newspack-blocks"),onClick:function(){n({authorId:0}),C(null)}}]})),x?(0,o.createElement)(y.T,{author:x,attributes:t}):(0,o.createElement)(c.Placeholder,{className:"newspack-blocks-author-profile",icon:(0,o.createElement)(p.Z,{icon:m.Z}),label:__("Author Profile","newspack-blocks")},N&&(0,o.createElement)(c.Notice,{status:"error",isDismissible:!1},N),R&&(0,o.createElement)("div",{className:"is-loading"},__("Fetching author info…","newspack-blocks"),(0,o.createElement)(c.Spinner,null)),!R&&(0,o.createElement)(w.ah,{label:__("Search for an author to display","newspack-blocks"),help:__("Begin typing name, click autocomplete result to select.","newspack-blocks"),fetchSuggestions:(0,r.Z)(regeneratorRuntime.mark((function e(){var t,n,r,a,o,i,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>0&&void 0!==l[0]?l[0]:null,n=l.length>1&&void 0!==l[1]?l[1]:0,A(null),!q||N){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,s()({parse:!1,path:(0,g.addQueryArgs)("/newspack-blocks/v1/authors",{search:t,offset:n,fields:"id,name"})});case 7:return r=e.sent,a=parseInt(r.headers.get("x-wp-total")||0),e.next=11,r.json();case 11:return o=e.sent,$||t||H(a),i=o.map((function(e){return{value:e.id,label:(0,u.decodeEntities)(e.name)||__("(no name)","newspack-blocks"),isGuestAuthor:e.is_guest}})),A(i),e.abrupt("return",i);case 16:case"end":return e.stop()}}),e)}))),maxItemsToSuggest:$,onChange:function(e){var t=!1,r=e[0];P&&P.forEach((function(e){parseInt(null==r?void 0:r.value)===parseInt(null==e?void 0:e.value)&&null!=e&&e.isGuestAuthor&&(t=!0)})),n({authorId:parseInt((null==r?void 0:r.value)||0),isGuestAuthor:t})},postTypeLabel:__("author","newspack-blocks"),postTypeLabelPlural:__("authors","newspack-blocks"),selectedItems:[]})))}},7362:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),o=n(5736),i=n(1984),s=n(9862),l=n(8438);const c=JSON.parse('{"u2":"author-profile","W3":"newspack","Y4":{"className":{"type":"string","default":""},"authorId":{"type":"number","default":0},"isGuestAuthor":{"type":"boolean","default":true},"showBio":{"type":"boolean","default":true},"showSocial":{"type":"boolean","default":true},"showEmail":{"type":"boolean","default":true},"showArchiveLink":{"type":"boolean","default":true},"textSize":{"type":"string","default":"medium"},"showAvatar":{"type":"boolean","default":true},"avatarAlignment":{"type":"string","default":"left"},"avatarBorderRadius":{"type":"string","default":"50%"},"avatarSize":{"type":"number","default":128},"avatarHideDefault":{"type":"boolean","default":false}}}');var u,__=o.__,_x=o._x,p=c.u2,d=c.Y4,f=c.W3,h=__("Author Profile","newspack-blocks");((null===(u=window.newspack_blocks_data)||void 0===u?void 0:u.author_custom_fields)||[]).forEach((function(e){d["show".concat(e.name)]={type:"boolean",default:!0}}));var m={title:h,icon:{src:(0,a.createElement)(i.Z,{icon:s.Z}),foreground:"#36f"},keywords:[__("author","newspack-blocks"),__("profile","newspack-blocks")],description:__("Display an author profile card.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"center",label:_x("Centered","block style","newspack-blocks")}],attributes:d,category:f,supports:{html:!1,default:""},edit:l.ZP,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(p),m)},2009:(e,t,n)=>{"use strict";n.d(t,{T:()=>l});var r=n(9307),a=n(5736),o=n(3967),i=n.n(o),__=a.__,s=function(e){var t=e.author,n=e.children;return e.showArchiveLink&&t&&t.url?(0,r.createElement)("a",{href:"#",className:"no-op"},n):(0,r.createElement)(r.Fragment,null,n)},l=function(e){var t=e.author,n=e.attributes,a=n.showBio,o=n.showSocial,l=n.showEmail,c=n.showArchiveLink,u=n.showAvatar,p=n.textSize,d=n.avatarAlignment,f=n.avatarBorderRadius,h=n.avatarSize,m=o&&t&&t.social||{};l&&t&&t.email?m.email=t.email:delete m.email,n.shownewspack_phone_number&&t&&t.newspack_phone_number?m.newspack_phone_number=t.newspack_phone_number:delete m.newspack_phone_number;var v=[n.shownewspack_role&&t.newspack_role,n.shownewspack_employer&&t.newspack_employer].filter(Boolean).join(", "),g=Object.keys(m);return(0,r.createElement)("div",{className:i()("wp-block-newspack-blocks-author-profile","avatar-"+d,"text-size-"+p,{"is-style-center":"is-style-center"===n.className})},u&&t.avatar&&(0,r.createElement)("div",{className:"wp-block-newspack-blocks-author-profile__avatar"},(0,r.createElement)("figure",{style:{borderRadius:f,height:"".concat(h,"px"),width:"".concat(h,"px")},dangerouslySetInnerHTML:{__html:t.avatar}})),(0,r.createElement)("div",{className:"wp-block-newspack-blocks-author-profile__bio"},(0,r.createElement)("h3",null,(0,r.createElement)(s,{author:t,showArchiveLink:c},t.name)),n.shownewspack_job_title&&t.newspack_job_title&&(0,r.createElement)("p",{className:"wp-block-newspack-blocks-author-profile__job-title"},t.newspack_job_title),v&&(0,r.createElement)("p",{className:"wp-block-newspack-blocks-author-profile__employment"},v),a&&t.bio&&(0,r.createElement)("p",null,t.bio," ",c&&(0,r.createElement)("a",{href:"#",className:"no-op"},__("More by","newspack-blocks")+" "+t.name)),0!==g.length&&(0,r.createElement)("ul",{className:"wp-block-newspack-blocks-author-profile__social-links"},g.map((function(e){return(0,r.createElement)("li",{key:e},(0,r.createElement)("a",{href:"#",className:"no-op"},m[e].svg&&(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:m[e].svg}}),(0,r.createElement)("span",{className:m[e].svg?"hidden":"visible"},e)))})))))}},5671:(e,t,n)=>{"use strict";var r=n(4981),a=n(632);(0,r.registerBlockType)("newspack-blocks/".concat(a.u2),a.Xd)},632:(e,t,n)=>{"use strict";n.d(t,{u2:()=>Ze,Xd:()=>Ue});var r=n(9307),a=n(5609),o=n(5736),i=n(5048),s=n(3144),l=n(136),c=n(8347),u=n(2819),p=n(3967),d=n.n(p),f=n(2175),h=n(9771),m=n(9818),v=n(4333),g=n(2629),y=n(6967),b=n(96);const w=window.wp.a11y,k=window.wp.escapeHtml;function _(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function E(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:_(t[n])&&_(e[n])&&Object.keys(t[n]).length>0&&E(e[n],t[n])}))}const S={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function x(){const e="undefined"!=typeof document?document:{};return E(e,S),e}const C={document:S,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function T(){const e="undefined"!=typeof window?window:{};return E(e,C),e}function M(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function P(){return Date.now()}function A(e,t){void 0===t&&(t="x");const n=T();let r,a,o;const i=function(e){const t=T();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(a=i.transform||i.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),o=new n.WebKitCSSMatrix("none"===a?"":a)):(o=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),"x"===t&&(a=n.WebKitCSSMatrix?o.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(a=n.WebKitCSSMatrix?o.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),a||0}function O(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function I(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function N(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!I(r)){const n=Object.keys(Object(r)).filter((e=>t.indexOf(e)<0));for(let t=0,a=n.length;t<a;t+=1){const a=n[t],o=Object.getOwnPropertyDescriptor(r,a);void 0!==o&&o.enumerable&&(O(e[a])&&O(r[a])?r[a].__swiper__?e[a]=r[a]:N(e[a],r[a]):!O(e[a])&&O(r[a])?(e[a]={},r[a].__swiper__?e[a]=r[a]:N(e[a],r[a])):e[a]=r[a])}}}return e}function z(e,t,n){e.style.setProperty(t,n)}function D(e){let{swiper:t,targetPosition:n,side:r}=e;const a=T(),o=-t.translate;let i,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const c=n>o?"next":"prev",u=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,p=()=>{i=(new Date).getTime(),null===s&&(s=i);const e=Math.max(Math.min((i-s)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let d=o+c*(n-o);if(u(d,n)&&(d=n),t.wrapperEl.scrollTo({[r]:d}),u(d,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:d})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(p)};p()}function L(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function R(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function j(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:[t]),n}function B(e){const t=T(),n=x(),r=e.getBoundingClientRect(),a=n.body,o=e.clientTop||a.clientTop||0,i=e.clientLeft||a.clientLeft||0,s=e===t?t.scrollY:e.scrollTop,l=e===t?t.scrollX:e.scrollLeft;return{top:r.top+s-o,left:r.left+l-i}}function F(e,t){return T().getComputedStyle(e,null).getPropertyValue(t)}function $(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function H(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function q(e,t){t&&e.addEventListener("transitionend",(function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))}))}function V(e,t,n){const r=T();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}let Z,U,G;function W(){return Z||(Z=function(){const e=T(),t=x();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Z}function Y(e){return void 0===e&&(e={}),U||(U=function(e){let{userAgent:t}=void 0===e?{}:e;const n=W(),r=T(),a=r.navigator.platform,o=t||r.navigator.userAgent,i={ios:!1,android:!1},s=r.screen.width,l=r.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const p=o.match(/(iPod)(.*OS\s([\d_]+))?/),d=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===a;let h="MacIntel"===a;return!u&&h&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!f&&(i.os="android",i.android=!0),(u||d||p)&&(i.os="ios",i.ios=!0),i}(e)),U}function X(){return G||(G=function(){const e=T();let t=!1;function n(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(n()){const n=String(e.navigator.userAgent);if(n.includes("Version/")){const[e,r]=n.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));t=e<16||16===e&&r<2}}return{isSafari:t||n(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),G}var K={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const a=n?"unshift":"push";return e.split(" ").forEach((e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][a](t)})),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;function a(){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t.apply(r,o)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((r,a)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,r;for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],n=o.slice(1,o.length),r=e):(t=o[0].events,n=o[0].data,r=o[0].context||e),n.unshift(r);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(r,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(r,n)}))})),e}};const Q=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},J=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},ee=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=a,o=[n-t];return o.push(...Array.from({length:t}).map(((e,t)=>n+r+t))),void e.slides.forEach(((t,n)=>{o.includes(t.column)&&J(e,n)}))}const o=a+r-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=o+t;i+=1){const t=(i%n+n)%n;(t<a||t>o)&&J(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(o+t,n-1);i+=1)i!==a&&(i>o||i<a)&&J(e,i)};var te={updateSize:function(){const e=this;let t,n;const r=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(F(r,"padding-left")||0,10)-parseInt(F(r,"padding-right")||0,10),n=n-parseInt(F(r,"padding-top")||0,10)-parseInt(F(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function n(e,n){return parseFloat(e.getPropertyValue(t(n))||0)}const r=e.params,{wrapperEl:a,slidesEl:o,size:i,rtlTranslate:s,wrongRTL:l}=e,c=e.virtual&&r.virtual.enabled,u=c?e.virtual.slides.length:e.slides.length,p=R(o,`.${e.params.slideClass}, swiper-slide`),d=c?e.virtual.slides.length:p.length;let f=[];const h=[],m=[];let v=r.slidesOffsetBefore;"function"==typeof v&&(v=r.slidesOffsetBefore.call(e));let g=r.slidesOffsetAfter;"function"==typeof g&&(g=r.slidesOffsetAfter.call(e));const y=e.snapGrid.length,b=e.slidesGrid.length;let w=r.spaceBetween,k=-v,_=0,E=0;if(void 0===i)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*i:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,p.forEach((e=>{s?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),r.centeredSlides&&r.cssMode&&(z(a,"--swiper-centered-offset-before",""),z(a,"--swiper-centered-offset-after",""));const S=r.grid&&r.grid.rows>1&&e.grid;let x;S&&e.grid.initSlides(d);const C="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter((e=>void 0!==r.breakpoints[e].slidesPerView)).length>0;for(let T=0;T<d;T+=1){let a;if(x=0,p[T]&&(a=p[T]),S&&e.grid.updateSlide(T,a,d,t),!p[T]||"none"!==F(a,"display")){if("auto"===r.slidesPerView){C&&(p[T].style[t("width")]="");const o=getComputedStyle(a),i=a.style.transform,s=a.style.webkitTransform;if(i&&(a.style.transform="none"),s&&(a.style.webkitTransform="none"),r.roundLengths)x=e.isHorizontal()?V(a,"width",!0):V(a,"height",!0);else{const e=n(o,"width"),t=n(o,"padding-left"),r=n(o,"padding-right"),i=n(o,"margin-left"),s=n(o,"margin-right"),l=o.getPropertyValue("box-sizing");if(l&&"border-box"===l)x=e+i+s;else{const{clientWidth:n,offsetWidth:o}=a;x=e+t+r+i+s+(o-n)}}i&&(a.style.transform=i),s&&(a.style.webkitTransform=s),r.roundLengths&&(x=Math.floor(x))}else x=(i-(r.slidesPerView-1)*w)/r.slidesPerView,r.roundLengths&&(x=Math.floor(x)),p[T]&&(p[T].style[t("width")]=`${x}px`);p[T]&&(p[T].swiperSlideSize=x),m.push(x),r.centeredSlides?(k=k+x/2+_/2+w,0===_&&0!==T&&(k=k-i/2-w),0===T&&(k=k-i/2-w),Math.abs(k)<.001&&(k=0),r.roundLengths&&(k=Math.floor(k)),E%r.slidesPerGroup==0&&f.push(k),h.push(k)):(r.roundLengths&&(k=Math.floor(k)),(E-Math.min(e.params.slidesPerGroupSkip,E))%e.params.slidesPerGroup==0&&f.push(k),h.push(k),k=k+x+w),e.virtualSize+=x+w,_=x,E+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+g,s&&l&&("slide"===r.effect||"coverflow"===r.effect)&&(a.style.width=`${e.virtualSize+w}px`),r.setWrapperSize&&(a.style[t("width")]=`${e.virtualSize+w}px`),S&&e.grid.updateWrapperSize(x,f,t),!r.centeredSlides){const t=[];for(let n=0;n<f.length;n+=1){let a=f[n];r.roundLengths&&(a=Math.floor(a)),f[n]<=e.virtualSize-i&&t.push(a)}f=t,Math.floor(e.virtualSize-i)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-i)}if(c&&r.loop){const t=m[0]+w;if(r.slidesPerGroup>1){const n=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),a=t*r.slidesPerGroup;for(let e=0;e<n;e+=1)f.push(f[f.length-1]+a)}for(let n=0;n<e.virtual.slidesBefore+e.virtual.slidesAfter;n+=1)1===r.slidesPerGroup&&f.push(f[f.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===f.length&&(f=[0]),0!==w){const n=e.isHorizontal()&&s?"marginLeft":t("marginRight");p.filter(((e,t)=>!(r.cssMode&&!r.loop)||t!==p.length-1)).forEach((e=>{e.style[n]=`${w}px`}))}if(r.centeredSlides&&r.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(w||0)})),e-=w;const t=e-i;f=f.map((e=>e<=0?-v:e>t?t+g:e))}if(r.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(w||0)})),e-=w,e<i){const t=(i-e)/2;f.forEach(((e,n)=>{f[n]=e-t})),h.forEach(((e,n)=>{h[n]=e+t}))}}if(Object.assign(e,{slides:p,snapGrid:f,slidesGrid:h,slidesSizesGrid:m}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){z(a,"--swiper-centered-offset-before",-f[0]+"px"),z(a,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(d!==u&&e.emit("slidesLengthChange"),f.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),!(c||r.cssMode||"slide"!==r.effect&&"fade"!==r.effect)){const t=`${r.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);d<=r.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a,o=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const i=e=>r?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!r)break;n.push(i(e))}else n.push(i(t.activeIndex));for(a=0;a<n.length;a+=1)if(void 0!==n[a]){const e=n[a].offsetHeight;o=e>o?e:o}(o||0===o)&&(t.wrapperEl.style.height=`${o}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:o}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let i=-e;a&&(i=e),r.forEach((e=>{e.classList.remove(n.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let l=0;l<r.length;l+=1){const e=r[l];let c=e.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const u=(i+(n.centeredSlides?t.minTranslate():0)-c)/(e.swiperSlideSize+s),p=(i-o[0]+(n.centeredSlides?t.minTranslate():0)-c)/(e.swiperSlideSize+s),d=-(i-c),f=d+t.slidesSizesGrid[l];(d>=0&&d<t.size-1||f>1&&f<=t.size||d<=0&&f>=t.size)&&(t.visibleSlides.push(e),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),e.progress=a?-u:u,e.originalProgress=a?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:o,isEnd:i,progressLoop:s}=t;const l=o,c=i;if(0===r)a=0,o=!0,i=!0;else{a=(e-t.minTranslate())/r;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;o=n||a<=0,i=s||a>=1,n&&(a=0),s&&(a=1)}if(n.loop){const n=t.getSlideIndexByData(0),r=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[n],o=t.slidesGrid[r],i=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=a?(l-a)/i:(l+i-o)/i,s>1&&(s-=1)}Object.assign(t,{progress:a,progressLoop:s,isBeginning:o,isEnd:i}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),i&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!i)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,o=e.virtual&&n.virtual.enabled,i=e=>R(r,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let s;if(t.forEach((e=>{e.classList.remove(n.slideActiveClass,n.slideNextClass,n.slidePrevClass)})),o)if(n.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),s=i(`[data-swiper-slide-index="${t}"]`)}else s=i(`[data-swiper-slide-index="${a}"]`);else s=t[a];if(s){s.classList.add(n.slideActiveClass);let e=function(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(s,`.${n.slideClass}, swiper-slide`)[0];n.loop&&!e&&(e=t[0]),e&&e.classList.add(n.slideNextClass);let r=function(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(s,`.${n.slideClass}, swiper-slide`)[0];n.loop&&0===!r&&(r=t[t.length-1]),r&&r.classList.add(n.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:o,realIndex:i,snapIndex:s}=t;let l,c=e;const u=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let o=0;o<t.length;o+=1)void 0!==t[o+1]?r>=t[o]&&r<t[o+1]-(t[o+1]-t[o])/2?a=o:r>=t[o]&&r<t[o+1]&&(a=o+1):r>=t[o]&&(a=o);return n.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const e=Math.min(a.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),c===o)return l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")),void(t.params.loop&&t.virtual&&t.params.virtual.enabled&&(t.realIndex=u(c)));let p;p=t.virtual&&a.virtual.enabled&&a.loop?u(c):t.slides[c]?parseInt(t.slides[c].getAttribute("data-swiper-slide-index")||c,10):c,Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:i,realIndex:p,previousIndex:o,activeIndex:c}),t.initialized&&ee(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(i!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${r.slideClass}, swiper-slide`)&&(a=e)}));let o,i=!1;if(a)for(let s=0;s<n.slides.length;s+=1)if(n.slides[s]===a){i=!0,o=s;break}if(!a||!i)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=o,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var ne={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:r,wrapperEl:a}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let o=A(a,e);return o+=this.cssOverflowAdjustment(),n&&(o=-o),o||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:o,progress:i}=n;let s,l=0,c=0;n.isHorizontal()?l=r?-e:e:c=e,a.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,a.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:a.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),o.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const u=n.maxTranslate()-n.minTranslate();s=0===u?0:(e-n.minTranslate())/u,s!==i&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,r,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);const o=this,{params:i,wrapperEl:s}=o;if(o.animating&&i.preventInteractionOnTransition)return!1;const l=o.minTranslate(),c=o.maxTranslate();let u;if(u=r&&e>l?l:r&&e<c?c:e,o.updateProgress(u),i.cssMode){const e=o.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!o.support.smoothScroll)return D({swiper:o,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(o.setTransition(0),o.setTranslate(u),n&&(o.emit("beforeTransitionStart",t,a),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(u),n&&(o.emit("beforeTransitionStart",t,a),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}};function re(e){let{swiper:t,runCallbacks:n,direction:r,step:a}=e;const{activeIndex:o,previousIndex:i}=t;let s=r;if(s||(s=o>i?"next":o<i?"prev":"reset"),t.emit(`transition${a}`),n&&o!==i){if("reset"===s)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===s?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var ae={slideTo:function(e,t,n,r,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const o=this;let i=e;i<0&&(i=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:p,rtlTranslate:d,wrapperEl:f,enabled:h}=o;if(o.animating&&s.preventInteractionOnTransition||!h&&!r&&!a)return!1;const m=Math.min(o.params.slidesPerGroupSkip,i);let v=m+Math.floor((i-m)/o.params.slidesPerGroup);v>=l.length&&(v=l.length-1);const g=-l[v];if(s.normalizeSlideIndex)for(let b=0;b<c.length;b+=1){const e=-Math.floor(100*g),t=Math.floor(100*c[b]),n=Math.floor(100*c[b+1]);void 0!==c[b+1]?e>=t&&e<n-(n-t)/2?i=b:e>=t&&e<n&&(i=b+1):e>=t&&(i=b)}if(o.initialized&&i!==p){if(!o.allowSlideNext&&(d?g>o.translate&&g>o.minTranslate():g<o.translate&&g<o.minTranslate()))return!1;if(!o.allowSlidePrev&&g>o.translate&&g>o.maxTranslate()&&(p||0)!==i)return!1}let y;if(i!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(g),y=i>p?"next":i<p?"prev":"reset",d&&-g===o.translate||!d&&g===o.translate)return o.updateActiveIndex(i),s.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==s.effect&&o.setTranslate(g),"reset"!==y&&(o.transitionStart(n,y),o.transitionEnd(n,y)),!1;if(s.cssMode){const e=o.isHorizontal(),n=d?g:-g;if(0===t){const t=o.virtual&&o.params.virtual.enabled;t&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),t&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{f[e?"scrollLeft":"scrollTop"]=n}))):f[e?"scrollLeft":"scrollTop"]=n,t&&requestAnimationFrame((()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1}))}else{if(!o.support.smoothScroll)return D({swiper:o,targetPosition:n,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(g),o.updateActiveIndex(i),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,y),0===t?o.transitionEnd(n,y):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,y))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const a=this;let o=e;return a.params.loop&&(a.virtual&&a.params.virtual.enabled?o+=a.virtual.slidesBefore:o=a.getSlideIndexByData(o)),a.slideTo(o,t,n,r)},slideNext:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{enabled:a,params:o,animating:i}=r;if(!a)return r;let s=o.slidesPerGroup;"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<o.slidesPerGroupSkip?1:s,c=r.virtual&&o.virtual.enabled;if(o.loop){if(i&&!c&&o.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&o.cssMode)return requestAnimationFrame((()=>{r.slideTo(r.activeIndex+l,e,t,n)})),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{params:a,snapGrid:o,slidesGrid:i,rtlTranslate:s,enabled:l,animating:c}=r;if(!l)return r;const u=r.virtual&&a.virtual.enabled;if(a.loop){if(c&&!u&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const d=p(s?r.translate:-r.translate),f=o.map((e=>p(e)));let h=o[f.indexOf(d)-1];if(void 0===h&&a.cssMode){let e;o.forEach(((t,n)=>{d>=t&&(e=n)})),void 0!==e&&(h=o[e>0?e-1:e])}let m=0;if(void 0!==h&&(m=i.indexOf(h),m<0&&(m=r.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(m=m-r.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),a.rewind&&r.isBeginning){const a=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(a,e,t,n)}return a.loop&&0===r.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{r.slideTo(m,e,t,n)})),!0):r.slideTo(m,e,t,n)},slideReset:function(e,t,n){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,n)},slideToClosest:function(e,t,n,r){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===r&&(r=.5);const a=this;let o=a.activeIndex;const i=Math.min(a.params.slidesPerGroupSkip,o),s=i+Math.floor((o-i)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){const e=a.snapGrid[s];l-e>(a.snapGrid[s+1]-e)*r&&(o+=a.params.slidesPerGroup)}else{const e=a.snapGrid[s-1];l-e<=(a.snapGrid[s]-e)*r&&(o-=a.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,a.slidesGrid.length-1),a.slideTo(o,e,t,n)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:n}=e,r="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,o=e.clickedIndex;const i=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?o<e.loopedSlides-r/2||o>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),o=e.getSlideIndex(R(n,`${i}[data-swiper-slide-index="${a}"]`)[0]),M((()=>{e.slideTo(o)}))):e.slideTo(o):o>e.slides.length-r?(e.loopFix(),o=e.getSlideIndex(R(n,`${i}[data-swiper-slide-index="${a}"]`)[0]),M((()=>{e.slideTo(o)}))):e.slideTo(o)}else e.slideTo(o)}};var oe={loopCreate:function(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;R(r,`.${n.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:a,activeSlideIndex:o,byController:i,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:u,allowSlideNext:p,slidesEl:d,params:f}=l;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&f.virtual.enabled)return n&&(f.centeredSlides||0!==l.snapIndex?f.centeredSlides&&l.snapIndex<f.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=p,void l.emit("loopFix");const h="auto"===f.slidesPerView?l.slidesPerViewDynamic():Math.ceil(parseFloat(f.slidesPerView,10));let m=f.loopedSlides||h;m%f.slidesPerGroup!=0&&(m+=f.slidesPerGroup-m%f.slidesPerGroup),l.loopedSlides=m;const v=[],g=[];let y=l.activeIndex;void 0===o?o=l.getSlideIndex(l.slides.filter((e=>e.classList.contains(f.slideActiveClass)))[0]):y=o;const b="next"===r||!r,w="prev"===r||!r;let k=0,_=0;if(o<m){k=Math.max(m-o,f.slidesPerGroup);for(let e=0;e<m-o;e+=1){const t=e-Math.floor(e/c.length)*c.length;v.push(c.length-t-1)}}else if(o>l.slides.length-2*m){_=Math.max(o-(l.slides.length-2*m),f.slidesPerGroup);for(let e=0;e<_;e+=1){const t=e-Math.floor(e/c.length)*c.length;g.push(t)}}if(w&&v.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,d.prepend(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),b&&g.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,d.append(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===f.slidesPerView&&l.updateSlides(),f.watchSlidesProgress&&l.updateSlidesOffset(),n)if(v.length>0&&w)if(void 0===t){const e=l.slidesGrid[y],t=l.slidesGrid[y+k]-e;s?l.setTranslate(l.translate-t):(l.slideTo(y+k,0,!1,!0),a&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else a&&(l.slideToLoop(t,0,!1,!0),l.touchEventsData.currentTranslate=l.translate);else if(g.length>0&&b)if(void 0===t){const e=l.slidesGrid[y],t=l.slidesGrid[y-_]-e;s?l.setTranslate(l.translate-t):(l.slideTo(y-_,0,!1,!0),a&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else l.slideToLoop(t,0,!1,!0);if(l.allowSlidePrev=u,l.allowSlideNext=p,l.controller&&l.controller.control&&!i){const e={slideRealIndex:t,direction:r,setTranslate:a,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&n})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===f.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;r[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),r.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function ie(e){const t=this,n=x(),r=T(),a=t.touchEventsData;a.evCache.push(e);const{params:o,touches:i,enabled:s}=t;if(!s)return;if(!o.simulateTouch&&"mouse"===e.pointerType)return;if(t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=e;l.originalEvent&&(l=l.originalEvent);let c=l.target;if("wrapper"===o.touchEventsTarget&&!t.wrapperEl.contains(c))return;if("which"in l&&3===l.which)return;if("button"in l&&l.button>0)return;if(a.isTouched&&a.isMoved)return;const u=!!o.noSwipingClass&&""!==o.noSwipingClass,p=e.composedPath?e.composedPath():e.path;u&&l.target&&l.target.shadowRoot&&p&&(c=p[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!(!l.target||!l.target.shadowRoot);if(o.noSwiping&&(f?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===x()||n===T())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(e);return r||n.getRootNode?r||t(n.getRootNode().host):null}(t)}(d,c):c.closest(d)))return void(t.allowClick=!0);if(o.swipeHandler&&!c.closest(o.swipeHandler))return;i.currentX=l.pageX,i.currentY=l.pageY;const h=i.currentX,m=i.currentY,v=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,g=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(v&&(h<=g||h>=r.innerWidth-g)){if("prevent"!==v)return;e.preventDefault()}Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),i.startX=h,i.startY=m,a.touchStartTime=P(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(a.allowThresholdMove=!1);let y=!0;c.matches(a.focusableElements)&&(y=!1,"SELECT"===c.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==c&&n.activeElement.blur();const b=y&&t.allowTouchMove&&o.touchStartPreventDefault;!o.touchStartForcePreventDefault&&!b||c.isContentEditable||l.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function se(e){const t=x(),n=this,r=n.touchEventsData,{params:a,touches:o,rtlTranslate:i,enabled:s}=n;if(!s)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),!r.isTouched)return void(r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l));const c=r.evCache.findIndex((e=>e.pointerId===l.pointerId));c>=0&&(r.evCache[c]=l);const u=r.evCache.length>1?r.evCache[0]:l,p=u.pageX,d=u.pageY;if(l.preventedByNestedSwiper)return o.startX=p,void(o.startY=d);if(!n.allowTouchMove)return l.target.matches(r.focusableElements)||(n.allowClick=!1),void(r.isTouched&&(Object.assign(o,{startX:p,startY:d,prevX:n.touches.currentX,prevY:n.touches.currentY,currentX:p,currentY:d}),r.touchStartTime=P()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(d<o.startY&&n.translate<=n.maxTranslate()||d>o.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(p<o.startX&&n.translate<=n.maxTranslate()||p>o.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);if(r.allowTouchCallbacks&&n.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;o.currentX=p,o.currentY=d;const f=o.currentX-o.startX,h=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+h**2)<n.params.threshold)return;if(void 0===r.isScrolling){let e;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(f))/Math.PI,r.isScrolling=n.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),void 0===r.startMoving&&(o.currentX===o.startX&&o.currentY===o.startY||(r.startMoving=!0)),r.isScrolling||n.zoom&&n.params.zoom&&n.params.zoom.enabled&&r.evCache.length>1)return void(r.isTouched=!1);if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&l.cancelable&&l.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&l.stopPropagation();let m=n.isHorizontal()?f:h,v=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;a.oneWayMovement&&(m=Math.abs(m)*(i?1:-1),v=Math.abs(v)*(i?1:-1)),o.diff=m,m*=a.touchRatio,i&&(m=-m,v=-v);const g=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=v>0?"prev":"next";const y=n.params.loop&&!a.cssMode,b="next"===n.swipeDirection&&n.allowSlideNext||"prev"===n.swipeDirection&&n.allowSlidePrev;if(!r.isMoved){if(y&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let w;r.isMoved&&g!==n.touchesDirection&&y&&b&&Math.abs(m)>=1&&(n.loopFix({direction:n.swipeDirection,setTranslate:!0}),w=!0),n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=m+r.startTranslate;let k=!0,_=a.resistanceRatio;if(a.touchReleaseOnEdges&&(_=0),m>0?(y&&b&&!w&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.size/2:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(k=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+m)**_))):m<0&&(y&&b&&!w&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.size/2:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(k=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-m)**_))),k&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),a.threshold>0){if(!(Math.abs(m)>a.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,void(o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function le(e){const t=this,n=t.touchEventsData,r=n.evCache.findIndex((t=>t.pointerId===e.pointerId));if(r>=0&&n.evCache.splice(r,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(e.type)){if(!(["pointercancel","contextmenu"].includes(e.type)&&(t.browser.isSafari||t.browser.isWebView)))return}const{params:a,touches:o,rtlTranslate:i,slidesGrid:s,enabled:l}=t;if(!l)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),n.allowTouchCallbacks&&t.emit("touchEnd",c),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);a.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=P(),p=u-n.touchStartTime;if(t.allowClick){const e=c.path||c.composedPath&&c.composedPath();t.updateClickedSlide(e&&e[0]||c.target,e),t.emit("tap click",c),p<300&&u-n.lastClickTime<300&&t.emit("doubleTap doubleClick",c)}if(n.lastClickTime=P(),M((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let d;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,d=a.followFinger?i?t.translate:-t.translate:-n.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:d});let f=0,h=t.slidesSizesGrid[0];for(let b=0;b<s.length;b+=b<a.slidesPerGroupSkip?1:a.slidesPerGroup){const e=b<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==s[b+e]?d>=s[b]&&d<s[b+e]&&(f=b,h=s[b+e]-s[b]):d>=s[b]&&(f=b,h=s[s.length-1]-s[s.length-2])}let m=null,v=null;a.rewind&&(t.isBeginning?v=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const g=(d-s[f])/h,y=f<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(p>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?m:f+y):t.slideTo(f)),"prev"===t.swipeDirection&&(g>1-a.longSwipesRatio?t.slideTo(f+y):null!==v&&g<0&&Math.abs(g)>a.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(c.target===t.navigation.nextEl||c.target===t.navigation.prevEl)?c.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==m?m:f+y),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function ce(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:o}=e,i=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=i&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!i?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function ue(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function pe(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const o=e.maxTranslate()-e.minTranslate();a=0===o?0:(e.translate-e.minTranslate())/o,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function de(e){const t=this;Q(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}let fe=!1;function he(){}const me=(e,t)=>{const n=x(),{params:r,el:a,wrapperEl:o,device:i}=e,s=!!r.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;a[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](i.ios||i.android?"resize orientationchange observerUpdate":"resize observerUpdate",ce,!0):e[c]("observerUpdate",ce,!0),a[l]("load",e.onLoad,{capture:!0})};const ve=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ge={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,o=r.breakpoints;if(!o||o&&0===Object.keys(o).length)return;const i=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!i||e.currentBreakpoint===i)return;const s=(i in o?o[i]:void 0)||e.originalParams,l=ve(e,r),c=ve(e,s),u=r.enabled;l&&!c?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(a.classList.add(`${r.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===r.grid.fill)&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===s[t])return;const n=r[t]&&r[t].enabled,a=s[t]&&s[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}));const p=s.direction&&s.direction!==r.direction,d=r.loop&&(s.slidesPerView!==r.slidesPerView||p),f=r.loop;p&&n&&e.changeDirection(),N(e.params,s);const h=e.params.enabled,m=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),u&&!h?e.disable():!u&&h&&e.enable(),e.currentBreakpoint=i,e.emit("_beforeBreakpoint",s),n&&(d?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!f&&m?(e.loopCreate(t),e.updateSlides()):f&&!m&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let r=!1;const a=T(),o="window"===t?a.innerHeight:n.clientHeight,i=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:o*t,point:e}}return{value:e,point:e}}));i.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let s=0;s<i.length;s+=1){const{point:e,value:o}=i[s];"window"===t?a.matchMedia(`(min-width: ${o}px)`).matches&&(r=e):o<=n.clientWidth&&(r=e)}return r||"max"}};var ye={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function be(e,t){return function(n){void 0===n&&(n={});const r=Object.keys(n)[0],a=n[r];"object"==typeof a&&null!==a?(!0===e[r]&&(e[r]={enabled:!0}),"navigation"===r&&e[r]&&e[r].enabled&&!e[r].prevEl&&!e[r].nextEl&&(e[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&e[r]&&e[r].enabled&&!e[r].el&&(e[r].auto=!0),r in e&&"enabled"in a?("object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),N(t,n)):N(t,n)):N(t,n)}}const we={eventsEmitter:K,update:te,translate:ne,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),re({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),re({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:ae,loop:oe,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,t=x(),{params:n}=e;e.onTouchStart=ie.bind(e),e.onTouchMove=se.bind(e),e.onTouchEnd=le.bind(e),n.cssMode&&(e.onScroll=pe.bind(e)),e.onClick=ue.bind(e),e.onLoad=de.bind(e),fe||(t.addEventListener("touchstart",he),fe=!0),me(e,"on")},detachEvents:function(){me(this,"off")}},breakpoints:ge,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:o}=e,i=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((r=>{e[r]&&n.push(t+r)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...i),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},ke={};class _e{constructor(){let e,t;for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];1===r.length&&r[0].constructor&&"Object"===Object.prototype.toString.call(r[0]).slice(8,-1)?t=r[0]:[e,t]=r,t||(t={}),t=N({},t),e&&!t.el&&(t.el=e);const o=x();if(t.el&&"string"==typeof t.el&&o.querySelectorAll(t.el).length>1){const e=[];return o.querySelectorAll(t.el).forEach((n=>{const r=N({},t,{el:n});e.push(new _e(r))})),e}const i=this;i.__swiper__=!0,i.support=W(),i.device=Y({userAgent:t.userAgent}),i.browser=X(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],t.modules&&Array.isArray(t.modules)&&i.modules.push(...t.modules);const s={};i.modules.forEach((e=>{e({params:t,swiper:i,extendParams:be(t,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})}));const l=N({},ye,s);return i.params=N({},l,ke,t),i.originalParams=N({},i.params),i.passedParams=N({},t),i.params&&i.params.on&&Object.keys(i.params.on).forEach((e=>{i.on(e,i.params.on[e])})),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===i.params.direction,isVertical:()=>"vertical"===i.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=$(R(t,`.${n.slideClass}, swiper-slide`)[0]);return $(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=R(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),a=(n.maxTranslate()-r)*e+r;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:r,slidesGrid:a,slidesSizesGrid:o,size:i,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=r[s]?r[s].swiperSlideSize:0;for(let n=s+1;n<r.length;n+=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>i&&(e=!0));for(let n=s-1;n>=0;n-=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>i&&(e=!0))}else if("current"===e)for(let c=s+1;c<r.length;c+=1){(t?a[c]+o[c]-a[s]<i:a[c]-a[s]<i)&&(l+=1)}else for(let c=s-1;c>=0;c-=1){a[s]-a[c]<i&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&Q(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&"SWIPER-CONTAINER"===n.parentNode.host.nodeName&&(t.isElement=!0);const r=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(r())}return R(n,r())[0]})();return!a&&t.params.createElements&&(a=j("div",t.params.wrapperClass),n.append(a),R(n,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===F(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===F(n,"direction")),wrongRTL:"-webkit-box"===F(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?Q(t,e):e.addEventListener("load",(e=>{Q(t,e.target)}))})),ee(t),t.initialized=!0,ee(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:r,el:a,wrapperEl:o,slides:i}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),a.removeAttribute("style"),o.removeAttribute("style"),i&&i.length&&i.forEach((e=>{e.classList.remove(r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el.swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(n){}try{delete t[e]}catch(n){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){N(ke,e)}static get extendedDefaults(){return ke}static get defaults(){return ye}static installModule(e){_e.prototype.__modules__||(_e.prototype.__modules__=[]);const t=_e.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>_e.installModule(e))),_e):(_e.installModule(e),_e)}}function Ee(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach((a=>{if(!n[a]&&!0===n.auto){let o=R(e.el,`.${r[a]}`)[0];o||(o=j("div",r[a]),o.className=r[a],e.el.append(o)),n[a]=o,t[a]=o}})),n}function Se(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function xe(e){const t=this,{params:n,slidesEl:r}=t;n.loop&&t.loopDestroy();const a=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,r.append(t.children[0]),t.innerHTML=""}else r.append(e)};if("object"==typeof e&&"length"in e)for(let o=0;o<e.length;o+=1)e[o]&&a(e[o]);else a(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update()}function Ce(e){const t=this,{params:n,activeIndex:r,slidesEl:a}=t;n.loop&&t.loopDestroy();let o=r+1;const i=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,a.prepend(t.children[0]),t.innerHTML=""}else a.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&i(e[t]);o=r+e.length}else i(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),t.slideTo(o,0,!1)}function Te(e,t){const n=this,{params:r,activeIndex:a,slidesEl:o}=n;let i=a;r.loop&&(i-=n.loopedSlides,n.loopDestroy(),n.recalcSlides());const s=n.slides.length;if(e<=0)return void n.prependSlide(t);if(e>=s)return void n.appendSlide(t);let l=i>e?i+1:i;const c=[];for(let u=s-1;u>=e;u-=1){const e=n.slides[u];e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&o.append(t[e]);l=i>e?i+t.length:i}else o.append(t);for(let u=0;u<c.length;u+=1)o.append(c[u]);n.recalcSlides(),r.loop&&n.loopCreate(),r.observer&&!n.isElement||n.update(),r.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function Me(e){const t=this,{params:n,activeIndex:r}=t;let a=r;n.loop&&(a-=t.loopedSlides,t.loopDestroy());let o,i=a;if("object"==typeof e&&"length"in e){for(let n=0;n<e.length;n+=1)o=e[n],t.slides[o]&&t.slides[o].remove(),o<i&&(i-=1);i=Math.max(i,0)}else o=e,t.slides[o]&&t.slides[o].remove(),o<i&&(i-=1),i=Math.max(i,0);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),n.loop?t.slideTo(i+t.loopedSlides,0,!1):t.slideTo(i,0,!1)}function Pe(){const e=this,t=[];for(let n=0;n<e.slides.length;n+=1)t.push(n);e.removeSlide(t)}function Ae(e){const{effect:t,swiper:n,on:r,setTranslate:a,setTransition:o,overwriteParams:i,perspective:s,recreateShadows:l,getEffectParams:c}=e;let u;r("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=i?i():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),r("setTranslate",(()=>{n.params.effect===t&&a()})),r("setTransition",((e,r)=>{n.params.effect===t&&o(r)})),r("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),r("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(u=!0),requestAnimationFrame((()=>{u&&n.slides&&n.slides.length&&(a(),u=!1)})))}))}function Oe(e,t){const n=L(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function Ie(e){let{swiper:t,duration:n,transformElements:r,allSlides:a}=e;const{activeIndex:o}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=a?r:r.filter((e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter((t=>t.shadowRoot&&t.shadowRoot===e.parentNode))[0];return e.parentElement})(e):e;return t.getSlideIndex(n)===o})),e.forEach((e=>{q(e,(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function Ne(e,t,n){const r=`swiper-slide-shadow${n?`-${n}`:""}${e?` swiper-slide-shadow-${e}`:""}`,a=L(t);let o=a.querySelector(`.${r.split(" ").join(".")}`);return o||(o=j("div",r.split(" ")),a.append(o)),o}Object.keys(we).forEach((e=>{Object.keys(we[e]).forEach((t=>{_e.prototype[t]=we[e][t]}))})),_e.use([function(e){let{swiper:t,on:n,emit:r}=e;const a=T();let o=null,i=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(o=new ResizeObserver((e=>{i=a.requestAnimationFrame((()=>{const{width:n,height:r}=t;let a=n,o=r;e.forEach((e=>{let{contentBoxSize:n,contentRect:r,target:i}=e;i&&i!==t.el||(a=r?r.width:(n[0]||n).inlineSize,o=r?r.height:(n[0]||n).blockSize)})),a===n&&o===r||s()}))})),o.observe(t.el)):(a.addEventListener("resize",s),a.addEventListener("orientationchange",l))})),n("destroy",(()=>{i&&a.cancelAnimationFrame(i),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null),a.removeEventListener("resize",s),a.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o=[],i=T(),s=function(e,n){void 0===n&&(n={});const r=new(i.MutationObserver||i.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const n=function(){a("observerUpdate",e[0])};i.requestAnimationFrame?i.requestAnimationFrame(n):i.setTimeout(n,0)}));r.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:void 0===n.childList||n.childList,characterData:void 0===n.characterData||n.characterData}),o.push(r)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=H(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}})),r("destroy",(()=>{o.forEach((e=>{e.disconnect()})),o.splice(0,o.length)}))}]);const ze=[function(e){let t,{swiper:n,extendParams:r,on:a,emit:o}=e;r({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const i=x();n.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const s=i.createElement("div");function l(e,t){const r=n.params.virtual;if(r.cache&&n.virtual.cache[t])return n.virtual.cache[t];let a;return r.renderSlide?(a=r.renderSlide.call(n,e,t),"string"==typeof a&&(s.innerHTML=a,a=s.children[0])):a=n.isElement?j("swiper-slide"):j("div",n.params.slideClass),a.setAttribute("data-swiper-slide-index",t),r.renderSlide||(a.innerHTML=e),r.cache&&(n.virtual.cache[t]=a),a}function c(e){const{slidesPerView:t,slidesPerGroup:r,centeredSlides:a,loop:i}=n.params,{addSlidesBefore:s,addSlidesAfter:c}=n.params.virtual,{from:u,to:p,slides:d,slidesGrid:f,offset:h}=n.virtual;n.params.cssMode||n.updateActiveIndex();const m=n.activeIndex||0;let v,g,y;v=n.rtlTranslate?"right":n.isHorizontal()?"left":"top",a?(g=Math.floor(t/2)+r+c,y=Math.floor(t/2)+r+s):(g=t+(r-1)+c,y=(i?t:r)+s);let b=m-y,w=m+g;i||(b=Math.max(b,0),w=Math.min(w,d.length-1));let k=(n.slidesGrid[b]||0)-(n.slidesGrid[0]||0);function _(){n.updateSlides(),n.updateProgress(),n.updateSlidesClasses(),o("virtualUpdate")}if(i&&m>=y?(b-=y,a||(k+=n.slidesGrid[0])):i&&m<y&&(b=-y,a&&(k+=n.slidesGrid[0])),Object.assign(n.virtual,{from:b,to:w,offset:k,slidesGrid:n.slidesGrid,slidesBefore:y,slidesAfter:g}),u===b&&p===w&&!e)return n.slidesGrid!==f&&k!==h&&n.slides.forEach((e=>{e.style[v]=k-Math.abs(n.cssOverflowAdjustment())+"px"})),n.updateProgress(),void o("virtualUpdate");if(n.params.virtual.renderExternal)return n.params.virtual.renderExternal.call(n,{offset:k,from:b,to:w,slides:function(){const e=[];for(let t=b;t<=w;t+=1)e.push(d[t]);return e}()}),void(n.params.virtual.renderExternalUpdate?_():o("virtualUpdate"));const E=[],S=[],x=e=>{let t=e;return e<0?t=d.length+e:t>=d.length&&(t-=d.length),t};if(e)n.slides.filter((e=>e.matches(`.${n.params.slideClass}, swiper-slide`))).forEach((e=>{e.remove()}));else for(let o=u;o<=p;o+=1)if(o<b||o>w){const e=x(o);n.slides.filter((t=>t.matches(`.${n.params.slideClass}[data-swiper-slide-index="${e}"], swiper-slide[data-swiper-slide-index="${e}"]`))).forEach((e=>{e.remove()}))}const C=i?-d.length:0,T=i?2*d.length:d.length;for(let n=C;n<T;n+=1)if(n>=b&&n<=w){const t=x(n);void 0===p||e?S.push(t):(n>p&&S.push(t),n<u&&E.push(t))}if(S.forEach((e=>{n.slidesEl.append(l(d[e],e))})),i)for(let o=E.length-1;o>=0;o-=1){const e=E[o];n.slidesEl.prepend(l(d[e],e))}else E.sort(((e,t)=>t-e)),E.forEach((e=>{n.slidesEl.prepend(l(d[e],e))}));R(n.slidesEl,".swiper-slide, swiper-slide").forEach((e=>{e.style[v]=k-Math.abs(n.cssOverflowAdjustment())+"px"})),_()}a("beforeInit",(()=>{if(!n.params.virtual.enabled)return;let e;if(void 0===n.passedParams.virtual.slides){const t=[...n.slidesEl.children].filter((e=>e.matches(`.${n.params.slideClass}, swiper-slide`)));t&&t.length&&(n.virtual.slides=[...t],e=!0,t.forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t),n.virtual.cache[t]=e,e.remove()})))}e||(n.virtual.slides=n.params.virtual.slides),n.classNames.push(`${n.params.containerModifierClass}virtual`),n.params.watchSlidesProgress=!0,n.originalParams.watchSlidesProgress=!0,c()})),a("setTranslate",(()=>{n.params.virtual.enabled&&(n.params.cssMode&&!n._immediateVirtual?(clearTimeout(t),t=setTimeout((()=>{c()}),100)):c())})),a("init update resize",(()=>{n.params.virtual.enabled&&n.params.cssMode&&z(n.wrapperEl,"--swiper-virtual-size",`${n.virtualSize}px`)})),Object.assign(n.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.push(e[t]);else n.virtual.slides.push(e);c(!0)},prependSlide:function(e){const t=n.activeIndex;let r=t+1,a=1;if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.unshift(e[t]);r=t+e.length,a=e.length}else n.virtual.slides.unshift(e);if(n.params.virtual.cache){const e=n.virtual.cache,t={};Object.keys(e).forEach((n=>{const r=e[n],o=r.getAttribute("data-swiper-slide-index");o&&r.setAttribute("data-swiper-slide-index",parseInt(o,10)+a),t[parseInt(n,10)+a]=r})),n.virtual.cache=t}c(!0),n.slideTo(r,0)},removeSlide:function(e){if(null==e)return;let t=n.activeIndex;if(Array.isArray(e))for(let r=e.length-1;r>=0;r-=1)n.params.virtual.cache&&(delete n.virtual.cache[e[r]],Object.keys(n.virtual.cache).forEach((t=>{t>e&&(n.virtual.cache[t-1]=n.virtual.cache[t],n.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete n.virtual.cache[t])}))),n.virtual.slides.splice(e[r],1),e[r]<t&&(t-=1),t=Math.max(t,0);else n.params.virtual.cache&&(delete n.virtual.cache[e],Object.keys(n.virtual.cache).forEach((t=>{t>e&&(n.virtual.cache[t-1]=n.virtual.cache[t],n.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete n.virtual.cache[t])}))),n.virtual.slides.splice(e,1),e<t&&(t-=1),t=Math.max(t,0);c(!0),n.slideTo(t,0)},removeAllSlides:function(){n.virtual.slides=[],n.params.virtual.cache&&(n.virtual.cache={}),c(!0),n.slideTo(0,0)},update:c})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o=x(),i=T();function s(e){if(!t.enabled)return;const{rtlTranslate:n}=t;let r=e;r.originalEvent&&(r=r.originalEvent);const s=r.keyCode||r.charCode,l=t.params.keyboard.pageUpDown,c=l&&33===s,u=l&&34===s,p=37===s,d=39===s,f=38===s,h=40===s;if(!t.allowSlideNext&&(t.isHorizontal()&&d||t.isVertical()&&h||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&p||t.isVertical()&&f||c))return!1;if(!(r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||o.activeElement&&o.activeElement.nodeName&&("input"===o.activeElement.nodeName.toLowerCase()||"textarea"===o.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||u||p||d||f||h)){let e=!1;if(H(t.el,`.${t.params.slideClass}, swiper-slide`).length>0&&0===H(t.el,`.${t.params.slideActiveClass}`).length)return;const r=t.el,a=r.clientWidth,o=r.clientHeight,s=i.innerWidth,l=i.innerHeight,c=B(r);n&&(c.left-=r.scrollLeft);const u=[[c.left,c.top],[c.left+a,c.top],[c.left,c.top+o],[c.left+a,c.top+o]];for(let t=0;t<u.length;t+=1){const n=u[t];if(n[0]>=0&&n[0]<=s&&n[1]>=0&&n[1]<=l){if(0===n[0]&&0===n[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((c||u||p||d)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),((u||d)&&!n||(c||p)&&n)&&t.slideNext(),((c||p)&&!n||(u||d)&&n)&&t.slidePrev()):((c||u||f||h)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),(u||h)&&t.slideNext(),(c||f)&&t.slidePrev()),a("keyPress",s)}}function l(){t.keyboard.enabled||(o.addEventListener("keydown",s),t.keyboard.enabled=!0)}function c(){t.keyboard.enabled&&(o.removeEventListener("keydown",s),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},n({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),r("init",(()=>{t.params.keyboard.enabled&&l()})),r("destroy",(()=>{t.keyboard.enabled&&c()})),Object.assign(t.keyboard,{enable:l,disable:c})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o=T();let i;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let s,l=P();const c=[];function u(){t.enabled&&(t.mouseEntered=!0)}function p(){t.enabled&&(t.mouseEntered=!1)}function d(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&P()-l<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&P()-l<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),a("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),a("scroll",e.raw)),l=(new o.Date).getTime(),!1)))}function f(e){let n=e,r=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const o=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const u=l&&l.contains(n.target);if(!t.mouseEntered&&!u&&!o.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let p=0;const f=t.rtlTranslate?-1:1,h=function(e){let t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),e.shiftKey&&!r&&(r=a,a=0),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}}(n);if(o.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(h.pixelX)>Math.abs(h.pixelY)))return!0;p=-h.pixelX*f}else{if(!(Math.abs(h.pixelY)>Math.abs(h.pixelX)))return!0;p=-h.pixelY}else p=Math.abs(h.pixelX)>Math.abs(h.pixelY)?-h.pixelX*f:-h.pixelY;if(0===p)return!0;o.invert&&(p=-p);let m=t.getTranslate()+p*o.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),r=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),r&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:P(),delta:Math.abs(p),direction:Math.sign(p)},r=s&&e.time<s.time+500&&e.delta<=s.delta&&e.direction===s.direction;if(!r){s=void 0;let l=t.getTranslate()+p*o.sensitivity;const u=t.isBeginning,d=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!u&&t.isBeginning||!d&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(i),i=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,r=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=p>0?.8:.2;s=e,c.splice(0),i=M((()=>{t.slideToClosest(t.params.speed,!0,void 0,n)}),0)}i||(i=M((()=>{s=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(r||a("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),o.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:P(),delta:Math.abs(p),direction:Math.sign(p),raw:e};c.length>=2&&c.shift();const r=c.length?c[c.length-1]:void 0;if(c.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&d(n):d(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function h(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",u),n[e]("mouseleave",p),n[e]("wheel",f)}function m(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",f),!0):!t.mousewheel.enabled&&(h("addEventListener"),t.mousewheel.enabled=!0,!0)}function v(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,f),!0):!!t.mousewheel.enabled&&(h("removeEventListener"),t.mousewheel.enabled=!1,!0)}r("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&v(),t.params.mousewheel.enabled&&m()})),r("destroy",(()=>{t.params.cssMode&&m(),t.mousewheel.enabled&&v()})),Object.assign(t.mousewheel,{enable:m,disable:v})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const o=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function i(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n.length>1&&1===t.el.querySelectorAll(e).length&&(n=t.el.querySelector(e))),e&&!n?e:n)}function s(e,n){const r=t.params.navigation;(e=o(e)).forEach((e=>{e&&(e.classList[n?"add":"remove"](...r.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass))}))}function l(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return s(n,!1),void s(e,!1);s(n,t.isBeginning&&!t.params.rewind),s(e,t.isEnd&&!t.params.rewind)}function c(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),a("navigationPrev"))}function u(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),a("navigationNext"))}function p(){const e=t.params.navigation;if(t.params.navigation=Ee(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=i(e.nextEl),r=i(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:r}),n=o(n),r=o(r);const a=(n,r)=>{n&&n.addEventListener("click","next"===r?u:c),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach((e=>a(e,"next"))),r.forEach((e=>a(e,"prev")))}function d(){let{nextEl:e,prevEl:n}=t.navigation;e=o(e),n=o(n);const r=(e,n)=>{e.removeEventListener("click","next"===n?u:c),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>r(e,"next"))),n.forEach((e=>r(e,"prev")))}r("init",(()=>{!1===t.params.navigation.enabled?f():(p(),l())})),r("toEdge fromEdge lock unlock",(()=>{l()})),r("destroy",(()=>{d()})),r("enable disable",(()=>{let{nextEl:e,prevEl:n}=t.navigation;e=o(e),n=o(n),t.enabled?l():[...e,...n].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),r("click",((e,n)=>{let{nextEl:r,prevEl:i}=t.navigation;r=o(r),i=o(i);const s=n.target;if(t.params.navigation.hideOnClick&&!i.includes(s)&&!r.includes(s)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===s||t.pagination.el.contains(s)))return;let e;r.length?e=r[0].classList.contains(t.params.navigation.hiddenClass):i.length&&(e=i[0].classList.contains(t.params.navigation.hiddenClass)),a(!0===e?"navigationShow":"navigationHide"),[...r,...i].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const f=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),d()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),p(),l()},disable:f,update:l,init:p,destroy:d})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o="swiper-pagination";let i;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),t.pagination={el:null,bullets:[]};let s=0;const l=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function c(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function u(e,n){const{bulletActiveClass:r}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${r}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${r}-${n}-${n}`))}function p(e){const n=e.target.closest(Se(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const r=$(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===r)return;const e=t.realIndex,n=t.getSlideIndexByData(r),a=t.getSlideIndexByData(t.realIndex),o=r=>{const a=t.activeIndex;t.loopFix({direction:r,activeSlideIndex:n,slideTo:!1});a===t.activeIndex&&t.slideToLoop(e,0,!1,!0)};if(n>t.slides.length-t.loopedSlides)o(n>a?"next":"prev");else if(t.params.centeredSlides){const e="auto"===t.params.slidesPerView?t.slidesPerViewDynamic():Math.ceil(parseFloat(t.params.slidesPerView,10));n<Math.floor(e/2)&&o("prev")}t.slideToLoop(r)}else t.slideTo(r)}function d(){const e=t.rtl,n=t.params.pagination;if(c())return;let r,o,p=t.pagination.el;p=l(p);const d=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,f=t.params.loop?Math.ceil(d/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(o=t.previousRealIndex||0,r=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(r=t.snapIndex,o=t.previousSnapIndex):(o=t.previousIndex||0,r=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let l,c,d;if(n.dynamicBullets&&(i=V(a[0],t.isHorizontal()?"width":"height",!0),p.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=i*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==o&&(s+=r-(o||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),l=Math.max(r-s,0),c=l+(Math.min(a.length,n.dynamicMainBullets)-1),d=(c+l)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),p.length>1)a.forEach((e=>{const a=$(e);a===r?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(a>=l&&a<=c&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),a===l&&u(e,"prev"),a===c&&u(e,"next"))}));else{const e=a[r];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")})),n.dynamicBullets){const e=a[l],t=a[c];for(let r=l;r<=c;r+=1)a[r]&&a[r].classList.add(...`${n.bulletActiveClass}-main`.split(" "));u(e,"prev"),u(t,"next")}}if(n.dynamicBullets){const r=Math.min(a.length,n.dynamicMainBullets+4),o=(i*r-i)/2-d*i,s=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?s:"top"]=`${o}px`}))}}p.forEach(((e,o)=>{if("fraction"===n.type&&(e.querySelectorAll(Se(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(r+1)})),e.querySelectorAll(Se(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(f)}))),"progressbar"===n.type){let a;a=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const o=(r+1)/f;let i=1,s=1;"horizontal"===a?i=o:s=o,e.querySelectorAll(Se(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${i}) scaleY(${s})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(e.innerHTML=n.renderCustom(t,r+1,f),0===o&&a("paginationRender",e)):(0===o&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function f(){const e=t.params.pagination;if(c())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let r=t.pagination.el;r=l(r);let o="";if("bullets"===e.type){let r=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&r>n&&(r=n);for(let n=0;n<r;n+=1)e.renderBullet?o+=e.renderBullet.call(t,n,e.bulletClass):o+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(o=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(o=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],r.forEach((n=>{"custom"!==e.type&&(n.innerHTML=o||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(Se(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",r[0])}function h(){t.params.pagination=Ee(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.filter((e=>H(e,".swiper")[0]===t.el))[0])),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=l(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",p),t.enabled||n.classList.add(e.lockClass)})))}function m(){const e=t.params.pagination;if(c())return;let n=t.pagination.el;n&&(n=l(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",p))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}r("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=l(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),r("init",(()=>{!1===t.params.pagination.enabled?v():(h(),f(),d())})),r("activeIndexChange",(()=>{void 0===t.snapIndex&&d()})),r("snapIndexChange",(()=>{d()})),r("snapGridLengthChange",(()=>{f(),d()})),r("destroy",(()=>{m()})),r("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),r("lock unlock",(()=>{d()})),r("click",((e,n)=>{const r=n.target,o=l(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&o&&o.length>0&&!r.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&r===t.navigation.nextEl||t.navigation.prevEl&&r===t.navigation.prevEl))return;const e=o[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),o.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const v=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),m()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=l(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),f(),d()},disable:v,render:f,update:d,init:h,destroy:m})},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o=x();let i,s,l,c,u=!1,p=null,d=null;function f(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:r,el:a}=e,o=t.params.scrollbar,i=t.params.loop?t.progressLoop:t.progress;let c=s,u=(l-s)*i;n?(u=-u,u>0?(c=s-u,u=0):-u+s>l&&(c=l+u)):u<0?(c=s+u,u=0):u+s>l&&(c=l-u),t.isHorizontal()?(r.style.transform=`translate3d(${u}px, 0, 0)`,r.style.width=`${c}px`):(r.style.transform=`translate3d(0px, ${u}px, 0)`,r.style.height=`${c}px`),o.hide&&(clearTimeout(p),a.style.opacity=1,p=setTimeout((()=>{a.style.opacity=0,a.style.transitionDuration="400ms"}),1e3))}function h(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:r}=e;n.style.width="",n.style.height="",l=t.isHorizontal()?r.offsetWidth:r.offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),s="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=`${s}px`:n.style.height=`${s}px`,r.style.display=c>=1?"none":"",t.params.scrollbar.hide&&(r.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function m(e){return t.isHorizontal()?e.clientX:e.clientY}function v(e){const{scrollbar:n,rtlTranslate:r}=t,{el:a}=n;let o;o=(m(e)-B(a)[t.isHorizontal()?"left":"top"]-(null!==i?i:s/2))/(l-s),o=Math.max(Math.min(o,1),0),r&&(o=1-o);const c=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*o;t.updateProgress(c),t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}function g(e){const n=t.params.scrollbar,{scrollbar:r,wrapperEl:o}=t,{el:s,dragEl:l}=r;u=!0,i=e.target===l?m(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),o.style.transitionDuration="100ms",l.style.transitionDuration="100ms",v(e),clearTimeout(d),s.style.transitionDuration="0ms",n.hide&&(s.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),a("scrollbarDragStart",e)}function y(e){const{scrollbar:n,wrapperEl:r}=t,{el:o,dragEl:i}=n;u&&(e.preventDefault?e.preventDefault():e.returnValue=!1,v(e),r.style.transitionDuration="0ms",o.style.transitionDuration="0ms",i.style.transitionDuration="0ms",a("scrollbarDragMove",e))}function b(e){const n=t.params.scrollbar,{scrollbar:r,wrapperEl:o}=t,{el:i}=r;u&&(u=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",o.style.transitionDuration=""),n.hide&&(clearTimeout(d),d=M((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3)),a("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function w(e){const{scrollbar:n,params:r}=t,a=n.el;if(!a)return;const i=a,s=!!r.passiveListeners&&{passive:!1,capture:!1},l=!!r.passiveListeners&&{passive:!0,capture:!1};if(!i)return;const c="on"===e?"addEventListener":"removeEventListener";i[c]("pointerdown",g,s),o[c]("pointermove",y,s),o[c]("pointerup",b,l)}function k(){const{scrollbar:e,el:n}=t;t.params.scrollbar=Ee(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const r=t.params.scrollbar;if(!r.el)return;let a,i;"string"==typeof r.el&&t.isElement&&(a=t.el.querySelector(r.el)),a||"string"!=typeof r.el?a||(a=r.el):a=o.querySelectorAll(r.el),t.params.uniqueNavElements&&"string"==typeof r.el&&a.length>1&&1===n.querySelectorAll(r.el).length&&(a=n.querySelector(r.el)),a.length>0&&(a=a[0]),a.classList.add(t.isHorizontal()?r.horizontalClass:r.verticalClass),a&&(i=a.querySelector(`.${t.params.scrollbar.dragClass}`),i||(i=j("div",t.params.scrollbar.dragClass),a.append(i))),Object.assign(e,{el:a,dragEl:i}),r.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&w("on"),a&&a.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}function _(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&w("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},r("init",(()=>{!1===t.params.scrollbar.enabled?E():(k(),h(),f())})),r("update resize observerUpdate lock unlock",(()=>{h()})),r("setTranslate",(()=>{f()})),r("setTransition",((e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(n)})),r("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)})),r("destroy",(()=>{_()}));const E=()=>{t.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),_()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),k(),h(),f()},disable:E,updateSize:h,setTranslate:f,init:k,destroy:_})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({parallax:{enabled:!1}});const a="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",o=(e,n)=>{const{rtl:r}=t,a=r?-1:1,o=e.getAttribute("data-swiper-parallax")||"0";let i=e.getAttribute("data-swiper-parallax-x"),s=e.getAttribute("data-swiper-parallax-y");const l=e.getAttribute("data-swiper-parallax-scale"),c=e.getAttribute("data-swiper-parallax-opacity"),u=e.getAttribute("data-swiper-parallax-rotate");if(i||s?(i=i||"0",s=s||"0"):t.isHorizontal()?(i=o,s="0"):(s=o,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*n*a+"%":i*n*a+"px",s=s.indexOf("%")>=0?parseInt(s,10)*n+"%":s*n+"px",null!=c){const t=c-(c-1)*(1-Math.abs(n));e.style.opacity=t}let p=`translate3d(${i}, ${s}, 0px)`;if(null!=l){p+=` scale(${l-(l-1)*(1-Math.abs(n))})`}if(u&&null!=u){p+=` rotate(${u*n*-1}deg)`}e.style.transform=p},i=()=>{const{el:e,slides:n,progress:r,snapGrid:i,isElement:s}=t,l=R(e,a);t.isElement&&l.push(...R(t.hostEl,a)),l.forEach((e=>{o(e,r)})),n.forEach(((e,n)=>{let s=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(s+=Math.ceil(n/2)-r*(i.length-1)),s=Math.min(Math.max(s,-1),1),e.querySelectorAll(`${a}, [data-swiper-parallax-rotate]`).forEach((e=>{o(e,s)}))}))};r("beforeInit",(()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),r("init",(()=>{t.params.parallax.enabled&&i()})),r("setTranslate",(()=>{t.params.parallax.enabled&&i()})),r("setTransition",((e,n)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{el:n,hostEl:r}=t,o=[...n.querySelectorAll(a)];t.isElement&&o.push(...r.querySelectorAll(a)),o.forEach((t=>{let n=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&&(n=0),t.style.transitionDuration=`${n}ms`}))}(n)}))},function(e){let{swiper:t,extendParams:n,on:r,emit:a}=e;const o=T();n({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let i,s,l=1,c=!1;const u=[],p={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},d={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},f={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let h=1;function m(){if(u.length<2)return 1;const e=u[0].pageX,t=u[0].pageY,n=u[1].pageX,r=u[1].pageY;return Math.sqrt((n-e)**2+(r-t)**2)}function v(e){const n=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(n)||t.slides.filter((t=>t.contains(e.target))).length>0}function g(e){if("mouse"===e.pointerType&&u.splice(0,u.length),!v(e))return;const n=t.params.zoom;if(i=!1,s=!1,u.push(e),!(u.length<2)){if(i=!0,p.scaleStart=m(),!p.slideEl){p.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),p.slideEl||(p.slideEl=t.slides[t.activeIndex]);let r=p.slideEl.querySelector(`.${n.containerClass}`);if(r&&(r=r.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=r,p.imageWrapEl=r?H(p.imageEl,`.${n.containerClass}`)[0]:void 0,!p.imageWrapEl)return void(p.imageEl=void 0);p.maxRatio=p.imageWrapEl.getAttribute("data-swiper-zoom")||n.maxRatio}if(p.imageEl){const[e,t]=function(){if(u.length<2)return{x:null,y:null};const e=p.imageEl.getBoundingClientRect();return[(u[0].pageX+(u[1].pageX-u[0].pageX)/2-e.x-o.scrollX)/l,(u[0].pageY+(u[1].pageY-u[0].pageY)/2-e.y-o.scrollY)/l]}();p.originX=e,p.originY=t,p.imageEl.style.transitionDuration="0ms"}c=!0}}function y(e){if(!v(e))return;const n=t.params.zoom,r=t.zoom,a=u.findIndex((t=>t.pointerId===e.pointerId));a>=0&&(u[a]=e),u.length<2||(s=!0,p.scaleMove=m(),p.imageEl&&(r.scale=p.scaleMove/p.scaleStart*l,r.scale>p.maxRatio&&(r.scale=p.maxRatio-1+(r.scale-p.maxRatio+1)**.5),r.scale<n.minRatio&&(r.scale=n.minRatio+1-(n.minRatio-r.scale+1)**.5),p.imageEl.style.transform=`translate3d(0,0,0) scale(${r.scale})`))}function b(e){if(!v(e))return;if("mouse"===e.pointerType&&"pointerout"===e.type)return;const n=t.params.zoom,r=t.zoom,a=u.findIndex((t=>t.pointerId===e.pointerId));a>=0&&u.splice(a,1),i&&s&&(i=!1,s=!1,p.imageEl&&(r.scale=Math.max(Math.min(r.scale,p.maxRatio),n.minRatio),p.imageEl.style.transitionDuration=`${t.params.speed}ms`,p.imageEl.style.transform=`translate3d(0,0,0) scale(${r.scale})`,l=r.scale,c=!1,r.scale>1&&p.slideEl?p.slideEl.classList.add(`${n.zoomedSlideClass}`):r.scale<=1&&p.slideEl&&p.slideEl.classList.remove(`${n.zoomedSlideClass}`),1===r.scale&&(p.originX=0,p.originY=0,p.slideEl=void 0)))}function w(e){if(!v(e)||!function(e){const n=`.${t.params.zoom.containerClass}`;return!!e.target.matches(n)||[...t.hostEl.querySelectorAll(n)].filter((t=>t.contains(e.target))).length>0}(e))return;const n=t.zoom;if(!p.imageEl)return;if(!d.isTouched||!p.slideEl)return;d.isMoved||(d.width=p.imageEl.offsetWidth,d.height=p.imageEl.offsetHeight,d.startX=A(p.imageWrapEl,"x")||0,d.startY=A(p.imageWrapEl,"y")||0,p.slideWidth=p.slideEl.offsetWidth,p.slideHeight=p.slideEl.offsetHeight,p.imageWrapEl.style.transitionDuration="0ms");const r=d.width*n.scale,a=d.height*n.scale;if(r<p.slideWidth&&a<p.slideHeight)return;d.minX=Math.min(p.slideWidth/2-r/2,0),d.maxX=-d.minX,d.minY=Math.min(p.slideHeight/2-a/2,0),d.maxY=-d.minY,d.touchesCurrent.x=u.length>0?u[0].pageX:e.pageX,d.touchesCurrent.y=u.length>0?u[0].pageY:e.pageY;if(Math.max(Math.abs(d.touchesCurrent.x-d.touchesStart.x),Math.abs(d.touchesCurrent.y-d.touchesStart.y))>5&&(t.allowClick=!1),!d.isMoved&&!c){if(t.isHorizontal()&&(Math.floor(d.minX)===Math.floor(d.startX)&&d.touchesCurrent.x<d.touchesStart.x||Math.floor(d.maxX)===Math.floor(d.startX)&&d.touchesCurrent.x>d.touchesStart.x))return void(d.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(d.minY)===Math.floor(d.startY)&&d.touchesCurrent.y<d.touchesStart.y||Math.floor(d.maxY)===Math.floor(d.startY)&&d.touchesCurrent.y>d.touchesStart.y))return void(d.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),d.isMoved=!0;const o=(n.scale-l)/(p.maxRatio-t.params.zoom.minRatio),{originX:i,originY:s}=p;d.currentX=d.touchesCurrent.x-d.touchesStart.x+d.startX+o*(d.width-2*i),d.currentY=d.touchesCurrent.y-d.touchesStart.y+d.startY+o*(d.height-2*s),d.currentX<d.minX&&(d.currentX=d.minX+1-(d.minX-d.currentX+1)**.8),d.currentX>d.maxX&&(d.currentX=d.maxX-1+(d.currentX-d.maxX+1)**.8),d.currentY<d.minY&&(d.currentY=d.minY+1-(d.minY-d.currentY+1)**.8),d.currentY>d.maxY&&(d.currentY=d.maxY-1+(d.currentY-d.maxY+1)**.8),f.prevPositionX||(f.prevPositionX=d.touchesCurrent.x),f.prevPositionY||(f.prevPositionY=d.touchesCurrent.y),f.prevTime||(f.prevTime=Date.now()),f.x=(d.touchesCurrent.x-f.prevPositionX)/(Date.now()-f.prevTime)/2,f.y=(d.touchesCurrent.y-f.prevPositionY)/(Date.now()-f.prevTime)/2,Math.abs(d.touchesCurrent.x-f.prevPositionX)<2&&(f.x=0),Math.abs(d.touchesCurrent.y-f.prevPositionY)<2&&(f.y=0),f.prevPositionX=d.touchesCurrent.x,f.prevPositionY=d.touchesCurrent.y,f.prevTime=Date.now(),p.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}function k(){const e=t.zoom;p.slideEl&&t.activeIndex!==t.slides.indexOf(p.slideEl)&&(p.imageEl&&(p.imageEl.style.transform="translate3d(0,0,0) scale(1)"),p.imageWrapEl&&(p.imageWrapEl.style.transform="translate3d(0,0,0)"),p.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,l=1,p.slideEl=void 0,p.imageEl=void 0,p.imageWrapEl=void 0,p.originX=0,p.originY=0)}function _(e){const n=t.zoom,r=t.params.zoom;if(!p.slideEl){e&&e.target&&(p.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),p.slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.slideEl=R(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:p.slideEl=t.slides[t.activeIndex]);let n=p.slideEl.querySelector(`.${r.containerClass}`);n&&(n=n.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=n,p.imageWrapEl=n?H(p.imageEl,`.${r.containerClass}`)[0]:void 0}if(!p.imageEl||!p.imageWrapEl)return;let a,i,s,c,u,f,h,m,v,g,y,b,w,k,_,E,S,x;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),p.slideEl.classList.add(`${r.zoomedSlideClass}`),void 0===d.touchesStart.x&&e?(a=e.pageX,i=e.pageY):(a=d.touchesStart.x,i=d.touchesStart.y);const C="number"==typeof e?e:null;1===l&&C&&(a=void 0,i=void 0),n.scale=C||p.imageWrapEl.getAttribute("data-swiper-zoom")||r.maxRatio,l=C||p.imageWrapEl.getAttribute("data-swiper-zoom")||r.maxRatio,!e||1===l&&C?(h=0,m=0):(S=p.slideEl.offsetWidth,x=p.slideEl.offsetHeight,s=B(p.slideEl).left+o.scrollX,c=B(p.slideEl).top+o.scrollY,u=s+S/2-a,f=c+x/2-i,v=p.imageEl.offsetWidth,g=p.imageEl.offsetHeight,y=v*n.scale,b=g*n.scale,w=Math.min(S/2-y/2,0),k=Math.min(x/2-b/2,0),_=-w,E=-k,h=u*n.scale,m=f*n.scale,h<w&&(h=w),h>_&&(h=_),m<k&&(m=k),m>E&&(m=E)),C&&1===n.scale&&(p.originX=0,p.originY=0),p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform=`translate3d(${h}px, ${m}px,0)`,p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform=`translate3d(0,0,0) scale(${n.scale})`}function E(){const e=t.zoom,n=t.params.zoom;if(!p.slideEl){t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.slideEl=R(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:p.slideEl=t.slides[t.activeIndex];let e=p.slideEl.querySelector(`.${n.containerClass}`);e&&(e=e.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),p.imageEl=e,p.imageWrapEl=e?H(p.imageEl,`.${n.containerClass}`)[0]:void 0}p.imageEl&&p.imageWrapEl&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,l=1,p.imageWrapEl.style.transitionDuration="300ms",p.imageWrapEl.style.transform="translate3d(0,0,0)",p.imageEl.style.transitionDuration="300ms",p.imageEl.style.transform="translate3d(0,0,0) scale(1)",p.slideEl.classList.remove(`${n.zoomedSlideClass}`),p.slideEl=void 0,p.originX=0,p.originY=0)}function S(e){const n=t.zoom;n.scale&&1!==n.scale?E():_(e)}function x(){return{passiveListener:!!t.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function C(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:n,activeListenerWithCapture:r}=x();t.wrapperEl.addEventListener("pointerdown",g,n),t.wrapperEl.addEventListener("pointermove",y,r),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.addEventListener(e,b,n)})),t.wrapperEl.addEventListener("pointermove",w,r)}function M(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:n,activeListenerWithCapture:r}=x();t.wrapperEl.removeEventListener("pointerdown",g,n),t.wrapperEl.removeEventListener("pointermove",y,r),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.removeEventListener(e,b,n)})),t.wrapperEl.removeEventListener("pointermove",w,r)}Object.defineProperty(t.zoom,"scale",{get:()=>h,set(e){if(h!==e){const t=p.imageEl,n=p.slideEl;a("zoomChange",e,t,n)}h=e}}),r("init",(()=>{t.params.zoom.enabled&&C()})),r("destroy",(()=>{M()})),r("touchStart",((e,n)=>{t.zoom.enabled&&function(e){const n=t.device;if(!p.imageEl)return;if(d.isTouched)return;n.android&&e.cancelable&&e.preventDefault(),d.isTouched=!0;const r=u.length>0?u[0]:e;d.touchesStart.x=r.pageX,d.touchesStart.y=r.pageY}(n)})),r("touchEnd",((e,n)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!p.imageEl)return;if(!d.isTouched||!d.isMoved)return d.isTouched=!1,void(d.isMoved=!1);d.isTouched=!1,d.isMoved=!1;let n=300,r=300;const a=f.x*n,o=d.currentX+a,i=f.y*r,s=d.currentY+i;0!==f.x&&(n=Math.abs((o-d.currentX)/f.x)),0!==f.y&&(r=Math.abs((s-d.currentY)/f.y));const l=Math.max(n,r);d.currentX=o,d.currentY=s;const c=d.width*e.scale,u=d.height*e.scale;d.minX=Math.min(p.slideWidth/2-c/2,0),d.maxX=-d.minX,d.minY=Math.min(p.slideHeight/2-u/2,0),d.maxY=-d.minY,d.currentX=Math.max(Math.min(d.currentX,d.maxX),d.minX),d.currentY=Math.max(Math.min(d.currentY,d.maxY),d.minY),p.imageWrapEl.style.transitionDuration=`${l}ms`,p.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}()})),r("doubleTap",((e,n)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&S(n)})),r("transitionEnd",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&k()})),r("slideChange",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&k()})),Object.assign(t.zoom,{enable:C,disable:M,in:_,out:E,toggle:S})},function(e){let{swiper:t,extendParams:n,on:r}=e;function a(e,t){const n=function(){let e,t,n;return(r,a)=>{for(t=-1,e=r.length;e-t>1;)n=e+t>>1,r[n]<=a?t=n:e=n;return e}}();let r,a;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(a=n(this.x,e),r=a-1,(e-this.x[r])*(this.y[a]-this.y[r])/(this.x[a]-this.x[r])+this.y[r]):0},this}function o(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}n({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},r("beforeInit",(()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){const e=document.querySelector(t.params.controller.control);if(e&&e.swiper)t.controller.control=e.swiper;else if(e){const n=r=>{t.controller.control=r.detail[0],t.update(),e.removeEventListener("init",n)};e.addEventListener("init",n)}}else t.controller.control=t.params.controller.control})),r("update",(()=>{o()})),r("resize",(()=>{o()})),r("observerUpdate",(()=>{o()})),r("setTranslate",((e,n,r)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(n,r)})),r("setTransition",((e,n,r)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(n,r)})),Object.assign(t.controller,{setTranslate:function(e,n){const r=t.controller.control;let o,i;const s=t.constructor;function l(e){if(e.destroyed)return;const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline=t.params.loop?new a(t.slidesGrid,e.slidesGrid):new a(t.snapGrid,e.snapGrid)}(e),i=-t.controller.spline.interpolate(-n)),i&&"container"!==t.params.controller.by||(o=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(o)&&Number.isFinite(o)||(o=1),i=(n-t.minTranslate())*o+e.minTranslate()),t.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(let t=0;t<r.length;t+=1)r[t]!==n&&r[t]instanceof s&&l(r[t]);else r instanceof s&&n!==r&&l(r)},setTransition:function(e,n){const r=t.constructor,a=t.controller.control;let o;function i(n){n.destroyed||(n.setTransition(e,t),0!==e&&(n.transitionStart(),n.params.autoHeight&&M((()=>{n.updateAutoHeight()})),q(n.wrapperEl,(()=>{a&&n.transitionEnd()}))))}if(Array.isArray(a))for(o=0;o<a.length;o+=1)a[o]!==n&&a[o]instanceof r&&i(a[o]);else a instanceof r&&n!==a&&i(a)}})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let a=null;function o(e){const t=a;0!==t.length&&(t.innerHTML="",t.innerHTML=e)}const i=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function s(e){(e=i(e)).forEach((e=>{e.setAttribute("tabIndex","0")}))}function l(e){(e=i(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function c(e,t){(e=i(e)).forEach((e=>{e.setAttribute("role",t)}))}function u(e,t){(e=i(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function p(e,t){(e=i(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function d(e){(e=i(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function f(e){(e=i(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function h(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,r=e.target;t.pagination&&t.pagination.el&&(r===t.pagination.el||t.pagination.el.contains(e.target))&&!e.target.matches(Se(t.params.pagination.bulletClass))||(t.navigation&&t.navigation.nextEl&&r===t.navigation.nextEl&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?o(n.lastSlideMessage):o(n.nextSlideMessage)),t.navigation&&t.navigation.prevEl&&r===t.navigation.prevEl&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?o(n.firstSlideMessage):o(n.prevSlideMessage)),t.pagination&&r.matches(Se(t.params.pagination.bulletClass))&&r.click())}function m(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function v(){return m()&&t.params.pagination.clickable}const g=(e,t,n)=>{s(e),"BUTTON"!==e.tagName&&(c(e,"button"),e.addEventListener("keydown",h)),p(e,n),function(e,t){(e=i(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},y=()=>{t.a11y.clicked=!0},b=()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},w=e=>{if(t.a11y.clicked)return;const n=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!n||!t.slides.includes(n))return;const r=t.slides.indexOf(n)===t.activeIndex,a=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);r||a||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(n),0))},k=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&u(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&c(t.slides,e.slideRole);const n=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((r,a)=>{const o=t.params.loop?parseInt(r.getAttribute("data-swiper-slide-index"),10):a;p(r,e.slideLabelMessage.replace(/\{\{index\}\}/,o+1).replace(/\{\{slidesLength\}\}/,n))}))},_=()=>{const e=t.params.a11y;t.el.append(a);const n=t.el;e.containerRoleDescriptionMessage&&u(n,e.containerRoleDescriptionMessage),e.containerMessage&&p(n,e.containerMessage);const r=t.wrapperEl,o=e.id||r.getAttribute("id")||`swiper-wrapper-${s=16,void 0===s&&(s=16),"x".repeat(s).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var s;const l=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var c;c=o,i(r).forEach((e=>{e.setAttribute("id",c)})),function(e,t){(e=i(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(r,l),k();let{nextEl:d,prevEl:f}=t.navigation?t.navigation:{};if(d=i(d),f=i(f),d&&d.forEach((t=>g(t,o,e.nextSlideMessage))),f&&f.forEach((t=>g(t,o,e.prevSlideMessage))),v()){(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.addEventListener("keydown",h)}))}t.el.addEventListener("focus",w,!0),t.el.addEventListener("pointerdown",y,!0),t.el.addEventListener("pointerup",b,!0)};r("beforeInit",(()=>{a=j("span",t.params.a11y.notificationClass),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true")})),r("afterInit",(()=>{t.params.a11y.enabled&&_()})),r("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&k()})),r("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:n}=t.navigation;n&&(t.isBeginning?(d(n),l(n)):(f(n),s(n))),e&&(t.isEnd?(d(e),l(e)):(f(e),s(e)))}()})),r("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;m()&&t.pagination.bullets.forEach((n=>{t.params.pagination.clickable&&(s(n),t.params.pagination.renderBullet||(c(n,"button"),p(n,e.paginationBulletMessage.replace(/\{\{index\}\}/,$(n)+1)))),n.matches(Se(t.params.pagination.bulletActiveClass))?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}))}()})),r("destroy",(()=>{t.params.a11y.enabled&&function(){a&&a.remove();let{nextEl:e,prevEl:n}=t.navigation?t.navigation:{};e=i(e),n=i(n),e&&e.forEach((e=>e.removeEventListener("keydown",h))),n&&n.forEach((e=>e.removeEventListener("keydown",h))),v()&&(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.removeEventListener("keydown",h)}));t.el.removeEventListener("focus",w,!0),t.el.removeEventListener("pointerdown",y,!0),t.el.removeEventListener("pointerup",b,!0)}()}))},function(e){let{swiper:t,extendParams:n,on:r}=e;n({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let a=!1,o={};const i=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),s=e=>{const t=T();let n;n=e?new URL(e):t.location;const r=n.pathname.slice(1).split("/").filter((e=>""!==e)),a=r.length;return{key:r[a-2],value:r[a-1]}},l=(e,n)=>{const r=T();if(!a||!t.params.history.enabled)return;let o;o=t.params.url?new URL(t.params.url):r.location;const s=t.slides[n];let l=i(s.getAttribute("data-history"));if(t.params.history.root.length>0){let n=t.params.history.root;"/"===n[n.length-1]&&(n=n.slice(0,n.length-1)),l=`${n}/${e?`${e}/`:""}${l}`}else o.pathname.includes(e)||(l=`${e?`${e}/`:""}${l}`);t.params.history.keepQuery&&(l+=o.search);const c=r.history.state;c&&c.value===l||(t.params.history.replaceState?r.history.replaceState({value:l},null,l):r.history.pushState({value:l},null,l))},c=(e,n,r)=>{if(n)for(let a=0,o=t.slides.length;a<o;a+=1){const o=t.slides[a];if(i(o.getAttribute("data-history"))===n){const n=t.getSlideIndex(o);t.slideTo(n,e,r)}}else t.slideTo(0,e,r)},u=()=>{o=s(t.params.url),c(t.params.speed,o.value,!1)};r("init",(()=>{t.params.history.enabled&&(()=>{const e=T();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);a=!0,o=s(t.params.url),o.key||o.value?(c(0,o.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",u)):t.params.history.replaceState||e.addEventListener("popstate",u)}})()})),r("destroy",(()=>{t.params.history.enabled&&(()=>{const e=T();t.params.history.replaceState||e.removeEventListener("popstate",u)})()})),r("transitionEnd _freeModeNoMomentumRelease",(()=>{a&&l(t.params.history.key,t.activeIndex)})),r("slideChange",(()=>{a&&t.params.cssMode&&l(t.params.history.key,t.activeIndex)}))},function(e){let{swiper:t,extendParams:n,emit:r,on:a}=e,o=!1;const i=x(),s=T();n({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,n){if(t.virtual&&t.params.virtual.enabled){const e=t.slides.filter((e=>e.getAttribute("data-hash")===n))[0];if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex(R(t.slidesEl,`.${t.params.slideClass}[data-hash="${n}"], swiper-slide[data-hash="${n}"]`)[0])}}});const l=()=>{r("hashChange");const e=i.location.hash.replace("#",""),n=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex];if(e!==(n?n.getAttribute("data-hash"):"")){const n=t.params.hashNavigation.getSlideIndex(t,e);if(void 0===n||Number.isNaN(n))return;t.slideTo(n)}},c=()=>{if(!o||!t.params.hashNavigation.enabled)return;const e=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex],n=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&&s.history&&s.history.replaceState?(s.history.replaceState(null,null,`#${n}`||""),r("hashSet")):(i.location.hash=n||"",r("hashSet"))};a("init",(()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;o=!0;const e=i.location.hash.replace("#","");if(e){const n=0,r=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(r||0,n,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&&s.addEventListener("hashchange",l)})()})),a("destroy",(()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&s.removeEventListener("hashchange",l)})),a("transitionEnd _freeModeNoMomentumRelease",(()=>{o&&c()})),a("slideChange",(()=>{o&&t.params.cssMode&&c()}))},function(e){let t,n,{swiper:r,extendParams:a,on:o,emit:i,params:s}=e;r.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,u,p,d,f,h,m=s&&s.autoplay?s.autoplay.delay:3e3,v=s&&s.autoplay?s.autoplay.delay:3e3,g=(new Date).getTime;function y(e){r&&!r.destroyed&&r.wrapperEl&&e.target===r.wrapperEl&&(r.wrapperEl.removeEventListener("transitionend",y),S())}const b=()=>{if(r.destroyed||!r.autoplay.running)return;r.autoplay.paused?c=!0:c&&(v=l,c=!1);const e=r.autoplay.paused?l:g+v-(new Date).getTime();r.autoplay.timeLeft=e,i("autoplayTimeLeft",e,e/m),n=requestAnimationFrame((()=>{b()}))},w=e=>{if(r.destroyed||!r.autoplay.running)return;cancelAnimationFrame(n),b();let a=void 0===e?r.params.autoplay.delay:e;m=r.params.autoplay.delay,v=r.params.autoplay.delay;const o=(()=>{let e;if(e=r.virtual&&r.params.virtual.enabled?r.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:r.slides[r.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(o)&&o>0&&void 0===e&&(a=o,m=o,v=o),l=a;const s=r.params.speed,c=()=>{r&&!r.destroyed&&(r.params.autoplay.reverseDirection?!r.isBeginning||r.params.loop||r.params.rewind?(r.slidePrev(s,!0,!0),i("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(r.slides.length-1,s,!0,!0),i("autoplay")):!r.isEnd||r.params.loop||r.params.rewind?(r.slideNext(s,!0,!0),i("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(0,s,!0,!0),i("autoplay")),r.params.cssMode&&(g=(new Date).getTime(),requestAnimationFrame((()=>{w()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{c()}),a)):requestAnimationFrame((()=>{c()})),a},k=()=>{r.autoplay.running=!0,w(),i("autoplayStart")},_=()=>{r.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),i("autoplayStop")},E=(e,n)=>{if(r.destroyed||!r.autoplay.running)return;clearTimeout(t),e||(h=!0);const a=()=>{i("autoplayPause"),r.params.autoplay.waitForTransition?r.wrapperEl.addEventListener("transitionend",y):S()};if(r.autoplay.paused=!0,n)return f&&(l=r.params.autoplay.delay),f=!1,void a();const o=l||r.params.autoplay.delay;l=o-((new Date).getTime()-g),r.isEnd&&l<0&&!r.params.loop||(l<0&&(l=0),a())},S=()=>{r.isEnd&&l<0&&!r.params.loop||r.destroyed||!r.autoplay.running||(g=(new Date).getTime(),h?(h=!1,w(l)):w(),r.autoplay.paused=!1,i("autoplayResume"))},C=()=>{if(r.destroyed||!r.autoplay.running)return;const e=x();"hidden"===e.visibilityState&&(h=!0,E(!0)),"visible"===e.visibilityState&&S()},T=e=>{"mouse"===e.pointerType&&(h=!0,r.animating||r.autoplay.paused||E(!0))},M=e=>{"mouse"===e.pointerType&&r.autoplay.paused&&S()};o("init",(()=>{r.params.autoplay.enabled&&(r.params.autoplay.pauseOnMouseEnter&&(r.el.addEventListener("pointerenter",T),r.el.addEventListener("pointerleave",M)),x().addEventListener("visibilitychange",C),g=(new Date).getTime(),k())})),o("destroy",(()=>{r.el.removeEventListener("pointerenter",T),r.el.removeEventListener("pointerleave",M),x().removeEventListener("visibilitychange",C),r.autoplay.running&&_()})),o("beforeTransitionStart",((e,t,n)=>{!r.destroyed&&r.autoplay.running&&(n||!r.params.autoplay.disableOnInteraction?E(!0,!0):_())})),o("sliderFirstMove",(()=>{!r.destroyed&&r.autoplay.running&&(r.params.autoplay.disableOnInteraction?_():(u=!0,p=!1,h=!1,d=setTimeout((()=>{h=!0,p=!0,E(!0)}),200)))})),o("touchEnd",(()=>{if(!r.destroyed&&r.autoplay.running&&u){if(clearTimeout(d),clearTimeout(t),r.params.autoplay.disableOnInteraction)return p=!1,void(u=!1);p&&r.params.cssMode&&S(),p=!1,u=!1}})),o("slideChange",(()=>{!r.destroyed&&r.autoplay.running&&(f=!0)})),Object.assign(r.autoplay,{start:k,stop:_,pause:E,resume:S})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let a=!1,o=!1;function i(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const n=e.clickedIndex,r=e.clickedSlide;if(r&&r.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==n)return;let a;a=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):n,t.params.loop?t.slideToLoop(a):t.slideTo(a)}function s(){const{thumbs:e}=t.params;if(a)return!1;a=!0;const n=t.constructor;if(e.swiper instanceof n)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(O(e.swiper)){const r=Object.assign({},e.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new n(r),o=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",i),!0}function l(e){const n=t.thumbs.swiper;if(!n||n.destroyed)return;const r="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView;let a=1;const o=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(a=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(a=1),a=Math.floor(a),n.slides.forEach((e=>e.classList.remove(o))),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(let l=0;l<a;l+=1)R(n.slidesEl,`[data-swiper-slide-index="${t.realIndex+l}"]`).forEach((e=>{e.classList.add(o)}));else for(let l=0;l<a;l+=1)n.slides[t.realIndex+l]&&n.slides[t.realIndex+l].classList.add(o);const i=t.params.thumbs.autoScrollOffset,s=i&&!n.params.loop;if(t.realIndex!==n.realIndex||s){const a=n.activeIndex;let o,l;if(n.params.loop){const e=n.slides.filter((e=>e.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];o=n.slides.indexOf(e),l=t.activeIndex>t.previousIndex?"next":"prev"}else o=t.realIndex,l=o>t.previousIndex?"next":"prev";s&&(o+="next"===l?i:-1*i),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(o)<0&&(n.params.centeredSlides?o=o>a?o-Math.floor(r/2)+1:o+Math.floor(r/2)-1:o>a&&n.params.slidesPerGroup,n.slideTo(o,e?0:void 0))}}t.thumbs={swiper:null},r("beforeInit",(()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const n=x(),r=()=>{const r="string"==typeof e.swiper?n.querySelector(e.swiper):e.swiper;if(r&&r.swiper)e.swiper=r.swiper,s(),l(!0);else if(r){const n=a=>{e.swiper=a.detail[0],r.removeEventListener("init",n),s(),l(!0),e.swiper.update(),t.update()};r.addEventListener("init",n)}return r},a=()=>{if(t.destroyed)return;r()||requestAnimationFrame(a)};requestAnimationFrame(a)}else s(),l(!0)})),r("slideChange update resize observerUpdate",(()=>{l()})),r("setTransition",((e,n)=>{const r=t.thumbs.swiper;r&&!r.destroyed&&r.setTransition(n)})),r("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&o&&e.destroy()})),Object.assign(t.thumbs,{init:s,update:l})},function(e){let{swiper:t,extendParams:n,emit:r,once:a}=e;n({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){if(t.params.cssMode)return;const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){if(t.params.cssMode)return;const{touchEventsData:e,touches:n}=t;0===e.velocities.length&&e.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:P()})},onTouchEnd:function(e){let{currentPos:n}=e;if(t.params.cssMode)return;const{params:o,wrapperEl:i,rtlTranslate:s,snapGrid:l,touchEventsData:c}=t,u=P()-c.touchStartTime;if(n<-t.minTranslate())t.slideTo(t.activeIndex);else if(n>-t.maxTranslate())t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1);else{if(o.freeMode.momentum){if(c.velocities.length>1){const e=c.velocities.pop(),n=c.velocities.pop(),r=e.position-n.position,a=e.time-n.time;t.velocity=r/a,t.velocity/=2,Math.abs(t.velocity)<o.freeMode.minimumVelocity&&(t.velocity=0),(a>150||P()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=o.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*o.freeMode.momentumRatio;const n=t.velocity*e;let u=t.translate+n;s&&(u=-u);let p,d=!1;const f=20*Math.abs(t.velocity)*o.freeMode.momentumBounceRatio;let h;if(u<t.maxTranslate())o.freeMode.momentumBounce?(u+t.maxTranslate()<-f&&(u=t.maxTranslate()-f),p=t.maxTranslate(),d=!0,c.allowMomentumBounce=!0):u=t.maxTranslate(),o.loop&&o.centeredSlides&&(h=!0);else if(u>t.minTranslate())o.freeMode.momentumBounce?(u-t.minTranslate()>f&&(u=t.minTranslate()+f),p=t.minTranslate(),d=!0,c.allowMomentumBounce=!0):u=t.minTranslate(),o.loop&&o.centeredSlides&&(h=!0);else if(o.freeMode.sticky){let e;for(let t=0;t<l.length;t+=1)if(l[t]>-u){e=t;break}u=Math.abs(l[e]-u)<Math.abs(l[e-1]-u)||"next"===t.swipeDirection?l[e]:l[e-1],u=-u}if(h&&a("transitionEnd",(()=>{t.loopFix()})),0!==t.velocity){if(e=s?Math.abs((-u-t.translate)/t.velocity):Math.abs((u-t.translate)/t.velocity),o.freeMode.sticky){const n=Math.abs((s?-u:u)-t.translate),r=t.slidesSizesGrid[t.activeIndex];e=n<r?o.speed:n<2*r?1.5*o.speed:2.5*o.speed}}else if(o.freeMode.sticky)return void t.slideToClosest();o.freeMode.momentumBounce&&d?(t.updateProgress(p),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating=!0,q(i,(()=>{t&&!t.destroyed&&c.allowMomentumBounce&&(r("momentumBounce"),t.setTransition(o.speed),setTimeout((()=>{t.setTranslate(p),q(i,(()=>{t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(r("_freeModeNoMomentumRelease"),t.updateProgress(u),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,q(i,(()=>{t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(u),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(o.freeMode.sticky)return void t.slideToClosest();o.freeMode&&r("_freeModeNoMomentumRelease")}(!o.freeMode.momentum||u>=o.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,n,r,a,{swiper:o,extendParams:i,on:s}=e;i({grid:{rows:1,fill:"column"}});const l=()=>{let e=o.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*o.size:"string"==typeof e&&(e=parseFloat(e)),e};s("init",(()=>{a=o.params.grid&&o.params.grid.rows>1})),s("update",(()=>{const{params:e,el:t}=o,n=e.grid&&e.grid.rows>1;a&&!n?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),r=1,o.emitContainerClasses()):!a&&n&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),o.emitContainerClasses()),a=n})),o.grid={initSlides:e=>{const{slidesPerView:a}=o.params,{rows:i,fill:s}=o.params.grid;r=Math.floor(e/i),t=Math.floor(e/i)===e/i?e:Math.ceil(e/i)*i,"auto"!==a&&"row"===s&&(t=Math.max(t,a*i)),n=t/i},updateSlide:(e,a,i,s)=>{const{slidesPerGroup:c}=o.params,u=l(),{rows:p,fill:d}=o.params.grid;let f,h,m;if("row"===d&&c>1){const n=Math.floor(e/(c*p)),r=e-p*c*n,o=0===n?c:Math.min(Math.ceil((i-n*p*c)/p),c);m=Math.floor(r/o),h=r-m*o+n*c,f=h+m*t/p,a.style.order=f}else"column"===d?(h=Math.floor(e/p),m=e-h*p,(h>r||h===r&&m===p-1)&&(m+=1,m>=p&&(m=0,h+=1))):(m=Math.floor(e/n),h=e-m*n);a.row=m,a.column=h,a.style[s("margin-top")]=0!==m?u&&`${u}px`:""},updateWrapperSize:(e,n,r)=>{const{centeredSlides:a,roundLengths:i}=o.params,s=l(),{rows:c}=o.params.grid;if(o.virtualSize=(e+s)*t,o.virtualSize=Math.ceil(o.virtualSize/c)-s,o.wrapperEl.style[r("width")]=`${o.virtualSize+s}px`,a){const e=[];for(let t=0;t<n.length;t+=1){let r=n[t];i&&(r=Math.floor(r)),n[t]<o.virtualSize+n[0]&&e.push(r)}n.splice(0,n.length),n.push(...e)}}}},function(e){let{swiper:t}=e;Object.assign(t,{appendSlide:xe.bind(t),prependSlide:Ce.bind(t),addSlide:Te.bind(t),removeSlide:Me.bind(t),removeAllSlides:Pe.bind(t)})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({fadeEffect:{crossFade:!1}}),Ae({effect:"fade",swiper:t,on:r,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let n=0;n<e.length;n+=1){const e=t.slides[n];let r=-e.swiperSlideOffset;t.params.virtualTranslate||(r-=t.translate);let a=0;t.isHorizontal()||(a=r,r=0);const o=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),i=Oe(0,e);i.style.opacity=o,i.style.transform=`translate3d(${r}px, ${a}px, 0px)`}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`})),Ie({swiper:t,duration:e,transformElements:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const a=(e,t,n)=>{let r=n?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),a=n?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");r||(r=j("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"left":"top")).split(" ")),e.append(r)),a||(a=j("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"right":"bottom")).split(" ")),e.append(a)),r&&(r.style.opacity=Math.max(-t,0)),a&&(a.style.opacity=Math.max(t,0))};Ae({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{el:e,wrapperEl:n,slides:r,width:o,height:i,rtlTranslate:s,size:l,browser:c}=t,u=t.params.cubeEffect,p=t.isHorizontal(),d=t.virtual&&t.params.virtual.enabled;let f,h=0;u.shadow&&(p?(f=t.wrapperEl.querySelector(".swiper-cube-shadow"),f||(f=j("div","swiper-cube-shadow"),t.wrapperEl.append(f)),f.style.height=`${o}px`):(f=e.querySelector(".swiper-cube-shadow"),f||(f=j("div","swiper-cube-shadow"),e.append(f))));for(let t=0;t<r.length;t+=1){const e=r[t];let n=t;d&&(n=parseInt(e.getAttribute("data-swiper-slide-index"),10));let o=90*n,i=Math.floor(o/360);s&&(o=-o,i=Math.floor(-o/360));const c=Math.max(Math.min(e.progress,1),-1);let f=0,m=0,v=0;n%4==0?(f=4*-i*l,v=0):(n-1)%4==0?(f=0,v=4*-i*l):(n-2)%4==0?(f=l+4*i*l,v=l):(n-3)%4==0&&(f=-l,v=3*l+4*l*i),s&&(f=-f),p||(m=f,f=0);const g=`rotateX(${p?0:-o}deg) rotateY(${p?o:0}deg) translate3d(${f}px, ${m}px, ${v}px)`;c<=1&&c>-1&&(h=90*n+90*c,s&&(h=90*-n-90*c)),e.style.transform=g,u.slideShadows&&a(e,c,p)}if(n.style.transformOrigin=`50% 50% -${l/2}px`,n.style["-webkit-transform-origin"]=`50% 50% -${l/2}px`,u.shadow)if(p)f.style.transform=`translate3d(0px, ${o/2+u.shadowOffset}px, ${-o/2}px) rotateX(90deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(h)-90*Math.floor(Math.abs(h)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=u.shadowScale,r=u.shadowScale/t,a=u.shadowOffset;f.style.transform=`scale3d(${n}, 1, ${r}) translate3d(0px, ${i/2+a}px, ${-i/2/r}px) rotateX(-90deg)`}const m=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-l/2:0;n.style.transform=`translate3d(0px,0,${m}px) rotateX(${t.isHorizontal()?0:h}deg) rotateY(${t.isHorizontal()?-h:0}deg)`,n.style.setProperty("--swiper-cube-translate-z",`${m}px`)},setTransition:e=>{const{el:n,slides:r}=t;if(r.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=n.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const n=Math.max(Math.min(t.progress,1),-1);a(t,n,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0}});const a=(e,n)=>{let r=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),a=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");r||(r=Ne("flip",e,t.isHorizontal()?"left":"top")),a||(a=Ne("flip",e,t.isHorizontal()?"right":"bottom")),r&&(r.style.opacity=Math.max(-n,0)),a&&(a.style.opacity=Math.max(n,0))};Ae({effect:"flip",swiper:t,on:r,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,r=t.params.flipEffect;for(let o=0;o<e.length;o+=1){const i=e[o];let s=i.progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(i.progress,1),-1));const l=i.swiperSlideOffset;let c=-180*s,u=0,p=t.params.cssMode?-l-t.translate:-l,d=0;t.isHorizontal()?n&&(c=-c):(d=p,p=0,u=-c,c=0),i.style.zIndex=-Math.abs(Math.round(s))+e.length,r.slideShadows&&a(i,s);const f=`translate3d(${p}px, ${d}px, 0px) rotateX(${u}deg) rotateY(${c}deg)`;Oe(0,i).style.transform=f}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let n=e.progress;t.params.flipEffect.limitRotation&&(n=Math.max(Math.min(e.progress,1),-1)),a(e,n)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Ae({effect:"coverflow",swiper:t,on:r,setTranslate:()=>{const{width:e,height:n,slides:r,slidesSizesGrid:a}=t,o=t.params.coverflowEffect,i=t.isHorizontal(),s=t.translate,l=i?e/2-s:n/2-s,c=i?o.rotate:-o.rotate,u=o.depth;for(let t=0,p=r.length;t<p;t+=1){const e=r[t],n=a[t],s=(l-e.swiperSlideOffset-n/2)/n,p="function"==typeof o.modifier?o.modifier(s):s*o.modifier;let d=i?c*p:0,f=i?0:c*p,h=-u*Math.abs(p),m=o.stretch;"string"==typeof m&&-1!==m.indexOf("%")&&(m=parseFloat(o.stretch)/100*n);let v=i?0:m*p,g=i?m*p:0,y=1-(1-o.scale)*Math.abs(p);Math.abs(g)<.001&&(g=0),Math.abs(v)<.001&&(v=0),Math.abs(h)<.001&&(h=0),Math.abs(d)<.001&&(d=0),Math.abs(f)<.001&&(f=0),Math.abs(y)<.001&&(y=0);const b=`translate3d(${g}px,${v}px,${h}px) rotateX(${f}deg) rotateY(${d}deg) scale(${y})`;if(Oe(0,e).style.transform=b,e.style.zIndex=1-Math.abs(Math.round(p)),o.slideShadows){let t=i?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),n=i?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");t||(t=Ne("coverflow",e,i?"left":"top")),n||(n=Ne("coverflow",e,i?"right":"bottom")),t&&(t.style.opacity=p>0?p:0),n&&(n.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>L(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const a=e=>"string"==typeof e?e:`${e}px`;Ae({effect:"creative",swiper:t,on:r,setTranslate:()=>{const{slides:e,wrapperEl:n,slidesSizesGrid:r}=t,o=t.params.creativeEffect,{progressMultiplier:i}=o,s=t.params.centeredSlides;if(s){const e=r[0]/2-t.params.slidesOffsetBefore||0;n.style.transform=`translateX(calc(50% - ${e}px))`}for(let l=0;l<e.length;l+=1){const n=e[l],r=n.progress,c=Math.min(Math.max(n.progress,-o.limitProgress),o.limitProgress);let u=c;s||(u=Math.min(Math.max(n.originalProgress,-o.limitProgress),o.limitProgress));const p=n.swiperSlideOffset,d=[t.params.cssMode?-p-t.translate:-p,0,0],f=[0,0,0];let h=!1;t.isHorizontal()||(d[1]=d[0],d[0]=0);let m={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};c<0?(m=o.next,h=!0):c>0&&(m=o.prev,h=!0),d.forEach(((e,t)=>{d[t]=`calc(${e}px + (${a(m.translate[t])} * ${Math.abs(c*i)}))`})),f.forEach(((e,t)=>{f[t]=m.rotate[t]*Math.abs(c*i)})),n.style.zIndex=-Math.abs(Math.round(r))+e.length;const v=d.join(", "),g=`rotateX(${f[0]}deg) rotateY(${f[1]}deg) rotateZ(${f[2]}deg)`,y=u<0?`scale(${1+(1-m.scale)*u*i})`:`scale(${1-(1-m.scale)*u*i})`,b=u<0?1+(1-m.opacity)*u*i:1-(1-m.opacity)*u*i,w=`translate3d(${v}) ${g} ${y}`;if(h&&m.shadow||!h){let e=n.querySelector(".swiper-slide-shadow");if(!e&&m.shadow&&(e=Ne("creative",n)),e){const t=o.shadowPerProgress?c*(1/o.limitProgress):c;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const k=Oe(0,n);k.style.transform=w,k.style.opacity=b,m.origin&&(k.style.transformOrigin=m.origin)}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Ae({effect:"cards",swiper:t,on:r,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:r}=t,a=t.params.cardsEffect,{startTranslate:o,isTouched:i}=t.touchEventsData,s=r?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],u=c.progress,p=Math.min(Math.max(u,-4),4);let d=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(d-=e[0].swiperSlideOffset);let f=t.params.cssMode?-d-t.translate:-d,h=0;const m=-100*Math.abs(p);let v=1,g=-a.perSlideRotate*p,y=a.perSlideOffset-.75*Math.abs(p);const b=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,w=(b===n||b===n-1)&&p>0&&p<1&&(i||t.params.cssMode)&&s<o,k=(b===n||b===n+1)&&p<0&&p>-1&&(i||t.params.cssMode)&&s>o;if(w||k){const e=(1-Math.abs((Math.abs(p)-.5)/.5))**.5;g+=-28*p*e,v+=-.5*e,y+=96*e,h=-25*e*Math.abs(p)+"%"}if(f=p<0?`calc(${f}px ${r?"-":"+"} (${y*Math.abs(p)}%))`:p>0?`calc(${f}px ${r?"-":"+"} (-${y*Math.abs(p)}%))`:`${f}px`,!t.isHorizontal()){const e=h;h=f,f=e}const _=p<0?""+(1+(1-v)*p):""+(1-(1-v)*p),E=`\n translate3d(${f}, ${h}, ${m}px)\n rotateZ(${a.rotate?r?-g:g:0}deg)\n scale(${_})\n `;if(a.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=Ne("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(p)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(u))+e.length;Oe(0,c).style.transform=E}},setTransition:e=>{const n=t.slides.map((e=>L(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Ie({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];_e.use(ze);var __=o.__,De="wp-block-newspack-blocks-carousel__autoplay-playing";function Le(e,t){Array.prototype.forEach.call(e,t)}function Re(e){e&&(e.setAttribute("aria-hidden","false"),Le(e.querySelectorAll("a"),(function(e){return e.removeAttribute("tabindex")})))}function je(e){e&&(e.setAttribute("aria-hidden","true"),Le(e.querySelectorAll("a"),(function(e){return e.setAttribute("tabindex","-1")})))}var Be=n(2089),Fe=n(1030),$e=o.__,He=function(e){(0,l.Z)(n,e);var t=(0,c.Z)(n);function n(e){var a;return(0,i.Z)(this,n),(a=t.call(this,e)).btnPlayRef=(0,r.createRef)(),a.btnPauseRef=(0,r.createRef)(),a.btnNextRef=(0,r.createRef)(),a.btnPrevRef=(0,r.createRef)(),a.carouselRef=(0,r.createRef)(),a.paginationRef=(0,r.createRef)(),a.state={swiperInitialized:!1},a}return(0,s.Z)(n,[{key:"componentDidMount",value:function(){this.initializeSwiper(0),this.props.triggerReflow()}},{key:"componentDidUpdate",value:function(e){if(!(0<this.carouselRef.current.offsetWidth&&0<this.carouselRef.current.offsetHeight))return!1;if(!this.state.swiperInitialized)return this.initializeSwiper(0);(0,Fe.Ou)(e,this.props)&&this.props.triggerReflow();var t=this.props,n=t.attributes,r=t.latestPosts;if(!(0,u.isEqual)(e.latestPosts,r)||!(0,u.isEqual)(e.attributes,n)){var a=0;this.swiperInstance&&(r&&this.swiperInstance.realIndex<r.length&&(a=this.swiperInstance.realIndex),this.setState({swiperInitialized:!1}),this.swiperInstance.destroy(!0,!0)),this.initializeSwiper(a)}}},{key:"componentWillUnmount",value:function(){this.props.triggerReflow()}},{key:"initializeSwiper",value:function(e){var t=this.props.latestPosts;if(t&&t.length){var n=this.props.attributes,r=n.aspectRatio,a=n.autoplay,i=n.delay,s=n.slidesPerView,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0<e.container.offsetWidth&&0<e.container.offsetHeight))return!1;var n=new _e(e.container,{a11y:!1,autoplay:!!t.autoplay&&{delay:t.delay,disableOnInteraction:!1},effect:"slide",grabCursor:!0,init:!1,initialSlide:t.initialSlide||0,loop:!0,navigation:{nextEl:e.next,prevEl:e.prev},pagination:{bulletElement:"button",clickable:!0,el:e.pagination,type:"bullets",renderBullet:function(e,t){return'<button class="'.concat(t,'"><span>').concat((0,o.sprintf)(__("Slide %s","newspack-blocks"),e+1),"</span></button>")}},watchSlidesProgress:t.slidesPerView>1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,slidesPerView:t.slidesPerView,spaceBetween:16,touchStartPreventDefault:!1,breakpoints:{320:{slidesPerView:1},782:{slidesPerView:t.slidesPerView>1?2:1},1168:{slidesPerView:t.slidesPerView}},on:{init:function(){Le(this.wrapperEl.querySelectorAll(".swiper-slide"),(function(e){return je(e)})),r.call(this),Re(this.slides[this.activeIndex])},slideChange:function(){var e,t=this.slides[this.activeIndex];if(je(this.slides[this.previousIndex]),Re(t),null===(e=this.autoplay)||void 0===e||!e.running){var n,r,a=t.querySelector("img"),i=!!a&&(null==a?void 0:a.alt),s=(0,o.sprintf)(__("Slide %1$s of %2$s","newspack-blocks"),this.realIndex+1,(null===(n=this.pagination)||void 0===n||null===(r=n.bullets)||void 0===r?void 0:r.length)||0);(0,w.speak)((0,k.escapeHTML)("".concat(t.innerText,",\n\t\t\t\t\t\t\t").concat(i?(0,o.sprintf)(__("Image: %s, ","newspack-blocks"),i):"","\n\t\t\t\t\t\t\t").concat(s)),"assertive")}}}});function r(){var e=t.aspectRatio;Array.from(this.slides).forEach((function(t){t.style.height="".concat(t.clientWidth*e,"px")}))}if(n.on("imagesReady",r),n.on("resize",r),t.autoplay){var a=function(){n.autoplay.stop(),e.play.focus()},i=function(){n.autoplay.start(),e.pause.focus()};n.on("init",(function(){e.play.addEventListener("click",i),e.pause.addEventListener("click",a)})),n.on("autoplayStart",(function(){e.block.classList.add(De),(0,w.speak)(__("Playing","newspack-blocks"),"assertive")})),n.on("autoplayStop",(function(){e.block.classList.remove(De),(0,w.speak)(__("Paused","newspack-blocks"),"assertive")})),n.on("beforeDestroy",(function(){e.play.removeEventListener("click",i),e.pause.removeEventListener("click",a)}))}return n.init(),n}({block:this.carouselRef.current,container:this.carouselRef.current,next:this.btnNextRef.current,prev:this.btnPrevRef.current,play:this.btnPlayRef.current,pause:this.btnPauseRef.current,pagination:this.paginationRef.current},{aspectRatio:r,autoplay:a,delay:1e3*i,initialSlide:e,slidesPerView:s<=t.length?s:t.length});l&&(this.swiperInstance=l,this.setState({swiperInitialized:!0}))}}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,o=e.setAttributes,i=e.latestPosts,s=e.isUIDisabled,l=t.aspectRatio,c=t.authors,u=t.autoplay,p=t.categories,m=t.includeSubcategories,v=t.customTaxonomies,w=t.delay,k=t.hideControls,_=t.imageFit,E=t.postsToShow,S=t.postType,x=t.showCategory,C=t.showDate,T=t.showAuthor,M=t.showAvatar,P=t.showTitle,A=t.slidesPerView,O=t.specificMode,I=t.specificPosts,N=t.tags,z=d()(n,"wp-block-newspack-blocks-carousel","wpnbpc","slides-per-view-"+A,"swiper",{"wp-block-newspack-blocks-carousel__autoplay-playing":u,"newspack-block--disabled":s,"hide-controls":k}),D=(0,h.__experimentalGetSettings)().formats.date,L=i&&!i.length,R=i&&1===i.length,j=i?Math.min(E,i.length):E,B=[{value:1,label:$e("Square","newspack-blocks"),shortName:$e("1:1","newspack-blocks")},{value:.75,label:$e("4:3","newspack-blocks"),shortName:$e("4:3","newspack-blocks")},{value:.5625,label:$e("16:9","newspack-blocks"),shortName:$e("16:9","newspack-blocks")},{value:4/3,label:$e("3:4","newspack-blocks"),shortName:$e("3:4","newspack-blocks")},{value:16/9,label:$e("9:16","newspack-blocks"),shortName:$e("9:16","newspack-blocks")}];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:z,ref:this.carouselRef},L&&(0,r.createElement)(a.Placeholder,{className:"component-placeholder__align-center"},(0,r.createElement)("div",{style:{margin:"auto"}},$e("Sorry, no posts were found."))),(!this.state.swiperInitialized||!i)&&(0,r.createElement)(a.Placeholder,{icon:(0,r.createElement)(a.Spinner,null),className:"component-placeholder__align-center"}),i&&(0,r.createElement)(r.Fragment,null,u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{ref:this.btnPauseRef}),(0,r.createElement)("button",{ref:this.btnPlayRef})),(0,r.createElement)("div",{className:"swiper-wrapper"},i.map((function(e){return(0,r.createElement)("article",{className:"post-has-image swiper-slide ".concat(e.post_type," ").concat(e.newspack_article_classes||""),key:e.id},(0,Be.fC)(e),(0,r.createElement)("figure",{className:"post-thumbnail"},(0,r.createElement)("a",{href:"#",rel:"bookmark"},e.newspack_featured_image_src?(0,r.createElement)("img",{className:"image-fit-".concat(_),src:e.newspack_featured_image_src.large,alt:""}):(0,r.createElement)("div",{className:"wp-block-newspack-blocks-carousel__placeholder"}))),(e.newspack_post_sponsors||x||P||T||C)&&(0,r.createElement)("div",{className:"entry-wrapper"},(e.newspack_post_sponsors||x&&0<e.newspack_category_info.length)&&(0,r.createElement)("div",{className:"cat-links"+(e.newspack_post_sponsors?" sponsor-label":"")},e.newspack_post_sponsors&&(0,r.createElement)("span",{className:"flag"},e.newspack_post_sponsors[0].flag),x&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_categories)&&(0,r.createElement)(r.RawHTML,null,(0,g.decodeEntities)(e.newspack_category_info))),P&&(0,r.createElement)("h3",{className:"entry-title"},(0,r.createElement)("a",{href:"#"},(0,g.decodeEntities)(e.title.rendered.trim()))),(0,r.createElement)("div",{className:"entry-meta"},e.newspack_post_sponsors&&(0,r.createElement)("span",{className:"entry-sponsors ".concat(e.newspack_sponsors_show_author?"plus-author":"")},(0,Be.b2)(e.newspack_post_sponsors),(0,Be.Q$)(e.newspack_post_sponsors)),T&&M&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_author)&&(0,Be.lW)(e.newspack_author_info),T&&(!e.newspack_post_sponsors||e.newspack_sponsors_show_author)&&(0,Be.FX)(e.newspack_author_info),C&&(0,r.createElement)("time",{className:"entry-date published",key:"pub-date"},(0,h.dateI18n)(D,e.date)))))}))),!L&&!R&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("button",{className:"swiper-button-prev",ref:this.btnPrevRef}),(0,r.createElement)("button",{className:"swiper-button-next",ref:this.btnNextRef}),(0,r.createElement)("div",{className:"swiper-pagination swiper-pagination-bullets",ref:this.paginationRef})))),(0,r.createElement)(f.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:$e("Display Settings"),initialOpen:!0},E&&(0,r.createElement)(y.Z,{numberOfItems:E,onNumberOfItemsChange:function(e){return o({postsToShow:e||1})},authors:c,onAuthorsChange:function(e){return o({authors:e})},categories:p,onCategoriesChange:function(e){return o({categories:e})},includeSubcategories:m,onIncludeSubcategoriesChange:function(e){return o({includeSubcategories:e})},tags:N,onTagsChange:function(e){return o({tags:e})},onCustomTaxonomiesChange:function(e){return o({customTaxonomies:e})},customTaxonomies:v,specificMode:O,onSpecificModeChange:function(e){return o({specificMode:e})},specificPosts:I,onSpecificPostsChange:function(e){return o({specificPosts:e})},postType:S})),(0,r.createElement)(a.PanelBody,{title:$e("Slideshow Settings"),initialOpen:!0},(0,r.createElement)(a.BaseControl,{label:$e("Slide Aspect Ratio","newspack-blocks"),help:$e("All slides will share the same aspect ratio, for consistency.","newspack-popups"),id:"newspack-blocks__aspect-ratio-control"},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ButtonGroup,{id:"newspack-blocks__aspect-ratio-control-buttons","aria-label":$e("Slide Aspect Ratio","newspack-blocks")},B.map((function(e){var t=l===e.value;return(0,r.createElement)(a.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return o({aspectRatio:e.value})}},e.shortName)}))))),(0,r.createElement)(a.BaseControl,{label:$e("Image Fit","newspack-blocks"),help:$e("cover"===_?"The image will fill the entire slide and will be cropped if necessary.":"The image will be resized to fit inside the slide without being cropped.","newspack-popups"),id:"newspack-blocks__blocks__image-fit-control"},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ButtonGroup,{id:"newspack-blocks__image-fit-buttons","aria-label":$e("Image Fit","newspack-blocks")},(0,r.createElement)(a.Button,{isPrimary:"cover"===_,"aria-pressed":"cover"===_,"aria-label":$e("Cover","newspack-blocks"),onClick:function(){return o({imageFit:"cover"})}},$e("Cover","newspack-blocks")),(0,r.createElement)(a.Button,{isPrimary:"contain"===_,"aria-pressed":"contain"===_,"aria-label":$e("Contain","newspack-blocks"),onClick:function(){return o({imageFit:"contain"})}},$e("Contain","newspack-blocks"))))),(0,r.createElement)(a.ToggleControl,{label:$e("Hide Controls"),help:$e("Hide the slideshow UI. Useful when used with Autoplay."),checked:k,onChange:function(e){o({hideControls:e})}}),(0,r.createElement)(a.ToggleControl,{label:$e("Autoplay"),help:$e("Autoplay between slides"),checked:u,onChange:function(e){o({autoplay:e})}}),u&&(0,r.createElement)(a.RangeControl,{label:$e("Delay between transitions (in seconds)"),value:w,onChange:function(e){o({delay:e})},min:1,max:20}),i&&1<i.length&&(0,r.createElement)(a.RangeControl,{label:$e("Number of slides to show at once"),value:A<=i.length?A:i.length,onChange:function(e){o({slidesPerView:e})},min:1,max:O?Math.min(6,i.length):Math.min(6,j)})),(0,r.createElement)(a.PanelBody,{title:$e("Article Meta Settings","newspack-blocks")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Title","newspack-blocks"),checked:P,onChange:function(){return o({showTitle:!P})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Date","newspack-blocks"),checked:C,onChange:function(){return o({showDate:!C})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Category","newspack-blocks"),checked:x,onChange:function(){return o({showCategory:!x})}})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Author","newspack-blocks"),checked:T,onChange:function(){return o({showAuthor:!T})}})),T&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.ToggleControl,{label:$e("Show Author Avatar","newspack-blocks"),checked:M,onChange:function(){return o({showAvatar:!M})}}))),(0,r.createElement)(b.L,{attributes:t,setAttributes:o}),(0,r.createElement)(b.H,{attributes:t,setAttributes:o})))}}]),n}(r.Component);const qe=(0,v.compose)([(0,m.withSelect)(Fe.b9),(0,m.withDispatch)(Fe.eL)])(He);var Ve=o.__,Ze="carousel",Ue={title:Ve("Post Carousel"),icon:{src:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"M7 18V6a2 2 0 012-2h6a2 2 0 012 2v12a2 2 0 01-2 2H9a2 2 0 01-2-2zM8.5 6v12a.5.5 0 00.5.5h6a.5.5 0 00.5-.5V6a.5.5 0 00-.5-.5H9a.5.5 0 00-.5.5z",fillRule:"evenodd"}),(0,r.createElement)(a.Path,{d:"M4 18.5v-13h1.5v13zM18.5 5.5v13H20v-13z"})),foreground:"#36f"},category:"newspack",keywords:[Ve("posts"),Ve("slideshow"),Ve("carousel")],description:Ve("A carousel of posts."),attributes:{className:{type:"string"},imageFit:{type:"string",default:"cover"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:5},postsToShow:{type:"integer",default:3},authors:{type:"array"},categories:{type:"array"},includeSubcategories:{type:"boolean",default:!0},tags:{type:"array"},customTaxonomies:{type:"array"},showDate:{type:"boolean",default:!0},showAuthor:{type:"boolean",default:!0},showAvatar:{type:"boolean",default:!0},showCategory:{type:"boolean",default:!1},showTitle:{type:"boolean",default:!0},postType:{type:"array",default:["post"],items:{type:"string"}},specificMode:{type:"boolean",default:!1},specificPosts:{type:"array",default:[],items:{type:"integer"}},slidesPerView:{type:"number",default:1},hideControls:{type:"boolean",default:!1},aspectRatio:{type:"number",default:.75},includedPostStatuses:{type:"array",default:["publish"],items:{type:"string"}}},supports:{html:!1,align:["center","wide","full"]},edit:qe,save:function(){return null}}},6573:(e,t,n)=>{"use strict";var r=n(2694),a=n(4981),o=n(1413),i=n(9307),s=n(1984),l=n(444);const c=(0,i.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)(l.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));var u=n(9062),p=n(7462),d=n(4942),f=n(885),h=n(181);var m=n(3967),v=n.n(m),g=n(2819),y=n(5736),b=n(2175),w=n(5609),k=n(6989),_=n.n(k),E=n(5189),__=y.__;function S(e){var t,n=[],r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,h.Z)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}(e.attributes);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push(a.name+": "+a.option)}}catch(o){r.e(o)}finally{r.f()}return n.join(", ")}function x(e){var t,n,r,a,o,i,s,l;return{isNYP:(null===(t=newspack_blocks_data)||void 0===t?void 0:t.can_use_name_your_price)&&(null==e||null===(n=e.meta_data)||void 0===n?void 0:n.some((function(e){return"_nyp"===e.key&&"yes"===e.value}))),suggestedPrice:null==e||null===(r=e.meta_data)||void 0===r||null===(a=r.find((function(e){return"_suggested_price"===e.key})))||void 0===a?void 0:a.value,minPrice:null==e||null===(o=e.meta_data)||void 0===o||null===(i=o.find((function(e){return"_min_price"===e.key})))||void 0===i?void 0:i.value,maxPrice:null==e||null===(s=e.meta_data)||void 0===s||null===(l=s.find((function(e){return"_maximum_price"===e.key})))||void 0===l?void 0:l.value}}function C(e){var t=e.selectedWidth,n=e.setAttributes;return(0,i.createElement)(w.PanelBody,{title:__("Width settings","newspack-blocks")},(0,i.createElement)(w.ButtonGroup,{"aria-label":__("Button width","newspack-blocks")},[25,50,75,100].map((function(e){return(0,i.createElement)(w.Button,{key:e,size:"small",variant:e===t?"primary":void 0,onClick:function(){var r;n({width:t===(r=e)?void 0:r})}},e,"%")}))))}function T(e){var t=(0,i.useState)(!1),n=(0,f.Z)(t,2),r=n[0],a=n[1],o=(0,i.useState)({}),s=(0,f.Z)(o,2),l=s[0],c=s[1],u=(0,i.useState)(!1),p=(0,f.Z)(u,2),h=p[0],m=p[1],v=(0,i.useState)(!1),y=(0,f.Z)(v,2),b=y[0],k=y[1];(0,i.useEffect)((function(){k(!1),e.value?(a(!0),_()({path:"/wc/v2/products/".concat(e.value)}).then((function(t){c((0,d.Z)({},t.id,"".concat(t.id,": ").concat(t.name))),m(t),e.onProduct(t)})).finally((function(){return a(!1)}))):m(!1)}),[e.value]);var E=(0,g.debounce)((function(e){return a(!0),_()({path:"/wc/v2/products?search=".concat(encodeURIComponent(e))}).then((function(e){var t={};e.forEach((function(e){t[e.id]="".concat(e.id,": ").concat(e.name)})),c(t)})).finally((function(){return a(!1)}))}),200);return e.value&&!h&&r?(0,i.createElement)(w.Spinner,null):(0,i.createElement)("div",{className:"newspack-checkout-button__product-field"},h&&!b?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(w.BaseControl,{className:"newspack-checkout-button__product-field__selected",help:__("Click to change the selected product","newspack-blocks")},(0,i.createElement)(w.Button,{isSecondary:!0,onClick:function(){return k(!0)},"aria-label":__("Change the selected product","newspack-blocks")},h.name)),e.children):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"newspack-checkout-button__product-field__tokenfield"},(0,i.createElement)(w.FormTokenField,{placeholder:e.placeholder||__("Type to search for a product…","newspack-blocks"),label:__("Select a product","newspack-blocks"),maxLength:1,onChange:function(t){var n=t[0],r=(0,g.invert)(l)[n];k(!1),e.onChange(r)},onInputChange:function(e){e.length>2?(a(!0),E(e)):a(!1)},suggestions:Object.values(l)}),r&&(0,i.createElement)(w.Spinner,null)),h&&(0,i.createElement)(w.Button,{isSecondary:!0,onClick:function(){return k(!1)}},__("Cancel","newspack-blocks"))))}const M=function(e){var t,n,r,a=e.attributes,s=e.setAttributes,l=e.className,c=a.placeholder,h=a.style,m=a.text,g=a.product,y=a.price,k=a.variation,M=a.width,P=(0,i.useState)({}),A=(0,f.Z)(P,2),O=A[0],I=A[1],N=(0,i.useState)([]),z=(0,f.Z)(N,2),D=z[0],L=z[1],R=(0,i.useState)(!1),j=(0,f.Z)(R,2),B=j[0],F=j[1];(0,i.useEffect)((function(){k?_()({path:"/wc/v2/products/".concat(g,"/variations/").concat(k)}).then((function(e){return F(x(e))})).catch((function(){return F({})})):F(x(O))}),[k]),(0,i.useEffect)((function(){!y&&null!=B&&B.suggestedPrice&&s({price:B.suggestedPrice})}),[B]);var $=(0,b.__experimentalUseBorderProps)(a),H=(0,b.__experimentalUseColorProps)(a),q=(0,b.__experimentalGetSpacingClassesAndStyles)(a),V=(0,b.useBlockProps)();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",(0,p.Z)({},V,{className:v()(V.className,(t={},(0,d.Z)(t,"wp-block-button",!0),(0,d.Z)(t,"has-custom-font-size",V.style.fontSize),(0,d.Z)(t,"has-custom-width wp-block-button__width-".concat(M),M),t))}),(0,i.createElement)(b.RichText,{"aria-label":__("Button text"),placeholder:c||__("Add text…"),value:m,onChange:function(e){s({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:v()(l,"wp-block-button__link","wp-block-newspack-blocks-checkout-button__button",H.className,$.className,{"no-border-radius":0===(null==h||null===(n=h.border)||void 0===n?void 0:n.radius)}),style:(0,o.Z)((0,o.Z)((0,o.Z)({},$.style),H.style),q.style),identifier:"text"})),(0,i.createElement)(b.InspectorControls,null,(0,i.createElement)(w.PanelBody,{title:__("Product","newspack-blocks")},(0,i.createElement)(T,{value:g,price:y,onChange:function(e){return s({product:e,variation:"",price:""})},onProduct:function(e){var t;I(e),null!=e&&null!==(t=e.variations)&&void 0!==t&&t.length?(s({is_variable:!0}),_()({path:"/wc/v2/products/".concat(e.id,"/variations?per_page=100")}).then((function(e){return L(e)})).catch((function(){return L([])}))):(s({is_variable:!1}),L([])),k||F(x(e))}},(null==O||null===(r=O.variations)||void 0===r?void 0:r.length)>0&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(w.CheckboxControl,{label:__("Allow the reader to select the variation before checkout.","newspack-blocks"),checked:!k,onChange:function(e){return s({variation:e?"":D[0].id.toString(),price:""})}}),D.length?(0,i.createElement)(w.SelectControl,{label:__("Variation","newspack-blocks"),help:__("Select the product variation to be added to cart.","newspack-blocks"),value:k,disabled:!k,options:[{label:"--",value:""}].concat((0,u.Z)(D.map((function(e){return{label:S(e),value:e.id}})))),onChange:function(e){return s({variation:e.toString(),price:""})}}):(0,i.createElement)(w.Spinner,null)))),(0,i.createElement)(w.PanelBody,{title:__("After purchase","newspack-blocks")},(0,i.createElement)(E.Z,{setAttributes:s,attributes:a})),(null==B?void 0:B.isNYP)&&(0,i.createElement)(w.PanelBody,{title:__("Name Your Price","newspack-blocks")},(0,i.createElement)("p",null,__('This product has "Name Your Price" toggled on. You can set the custom price for this checkout.',"newspack-blocks")),(0,i.createElement)("p",null,(0,i.createElement)("strong",null,__("Suggested price:","newspack-blocks"))," ",B.suggestedPrice||0,B.minPrice&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)("strong",null,__("Minimum price:","newspack-blocks"))," ",B.minPrice),B.maxPrice&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("br",null),(0,i.createElement)("strong",null,__("Maximum price:","newspack-blocks"))," ",B.maxPrice)),(0,i.createElement)(w.TextControl,{type:"number",label:__("Custom Price","newspack-blocks"),placeholder:B.suggestedPrice,value:y,min:parseFloat(B.minPrice)||null,max:parseFloat(B.maxPrice)||null,onChange:function(e){return s({price:e})}}))),(0,i.createElement)(b.InspectorControls,null,(0,i.createElement)(C,{selectedWidth:M,setAttributes:s})))},P=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"newspack-blocks/checkout-button","title":"Checkout Button","category":"newspack","description":"Modal checkout button for WooCommerce products.","keywords":["woocommerce","product","checkout","button"],"textdomain":"newspack-blocks","attributes":{"product":{"type":"string"},"variation":{"type":"string"},"is_variable":{"type":"boolean","default":false},"price":{"type":"string"},"text":{"type":"string"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"align":["center","wide"],"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"newspack-checkout-button-editor","style":"newspack-checkout-block-button"}');var A=P.name,O=(0,o.Z)((0,o.Z)({},P),{},{icon:{src:(0,i.createElement)(s.Z,{icon:c}),foreground:"#36f"},edit:M,save:function(e){var t,n,r,a,s=e.attributes,l=e.className,c=s.textAlign,u=s.fontSize,p=s.style,f=s.text,h=s.product,m=s.price,g=s.variation,y=s.is_variable,w=s.width;if(!f||!h)return null;var k=(0,b.__experimentalGetBorderClassesAndStyles)(s),_=(0,b.__experimentalGetColorClassesAndStyles)(s),E=(0,b.__experimentalGetSpacingClassesAndStyles)(s),S=v()("wp-block-button__link",_.className,k.className,(n={},(0,d.Z)(n,"has-text-align-".concat(c),c),(0,d.Z)(n,"no-border-radius",0===(null==p||null===(t=p.border)||void 0===t?void 0:t.radius)),n)),x=(0,o.Z)((0,o.Z)((0,o.Z)({},k.style),_.style),E.style),C=v()(l,(a={},(0,d.Z)(a,"has-custom-font-size",u||(null==p||null===(r=p.typography)||void 0===r?void 0:r.fontSize)),(0,d.Z)(a,"has-custom-width wp-block-button__width-".concat(w),w),a));return(0,i.createElement)("div",b.useBlockProps.save({className:C}),(0,i.createElement)("form",null,(0,i.createElement)(b.RichText.Content,{tagName:"button",className:S,style:x,value:f}),(0,i.createElement)("input",{type:"hidden",name:"product_id",value:h}),(0,i.createElement)("input",{type:"hidden",name:"newspack_checkout",value:"1"}),m&&(0,i.createElement)("input",{type:"hidden",name:"price",value:m}),g&&(0,i.createElement)("input",{type:"hidden",name:"variation_id",value:g}),y&&(0,i.createElement)("input",{type:"hidden",name:"is_variable",value:"1"}),s.afterSuccessBehavior&&(0,i.createElement)("input",{type:"hidden",name:"after_success_behavior",value:s.afterSuccessBehavior}),s.afterSuccessButtonLabel&&(0,i.createElement)("input",{type:"hidden",name:"after_success_button_label",value:s.afterSuccessButtonLabel}),s.afterSuccessBehavior&&(0,i.createElement)("input",{type:"hidden",name:"after_success_url",value:s.afterSuccessURL||""})))}});(0,a.registerBlockType)(A,O),(0,r.addFilter)("blockEditor.useSetting.before","newspack-blocks/add-border-radius-support",(function(e,t,n,r){return"border.radius"===t&&"newspack-blocks/checkout-button"===r||e}))},9523:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),o=n(5609),i=n(5736),s=n(444);const l=(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));var c=n(4942),u=n(7462),p=n(1413),d=n(885),f=n(3967),h=n.n(f),m=n(272),v=n(6989),g=n.n(v),y=n(2175),b=n(2819),__=i.__,_x=i._x,w=function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return"#"+t+t+n+n+r+r})).substring(1).match(/.{2}/g);return null===t?[0,0,0]:t.map((function(e){return parseInt(e,16)}))},k=function(e){var t="#000000";if(void 0===e)return t;var n=w(e),r=w(t),a=.2126*Math.pow(n[0]/255,2.2)+.7152*Math.pow(n[1]/255,2.2)+.0722*Math.pow(n[2]/255,2.2),o=.2126*Math.pow(r[0]/255,2.2)+.7152*Math.pow(r[1]/255,2.2)+.0722*Math.pow(r[2]/255,2.2);return(a>o?(a+.05)/(o+.05):(o+.05)/(a+.05))>5?t:"#ffffff"},_=function(e,t,n){var r="month"===e?1:12;return[t[0]*r,t[1]*r,t[2]*r,n*r]},E=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=null===(n=window.newspack_blocks_data)||void 0===n?void 0:n.tier_amounts_template;if(!a)return"";var o=(e||0).toFixed(2).replace(/\.?0*$/,""),s="once"===t?r?"":__(" once","newspack-blocks"):(0,i.sprintf)(_x(" per %s","per `Frequency`","newspack-blocks"),t);return a.replace("AMOUNT_PLACEHOLDER",o).replace("FREQUENCY_PLACEHOLDER",s)},S=n(9062),x=i.__,C={once:x("One-time","newspack-blocks"),month:x("Monthly","newspack-blocks"),year:x("Annually","newspack-blocks")},T=Object.keys(C),M=[{label:x("Frequency","newspack-blocks"),key:"frequency"},{label:x("Tiers","newspack-blocks"),key:"tiers"}],P=i.__;const A=function(e){var t=e.amounts,n=e.availableFrequencies,r=e.attributes,o=(0,a.useState)(n[0]),i=(0,d.Z)(o,2),s=i[0],l=i[1],u=t[s].slice(0,3);(0,a.useEffect)((function(){l(n[0])}),[n.length]);var f=function(t,n){return function(a){var o=(0,S.Z)(r.tiersBasedOptions);o[t]=(0,p.Z)((0,p.Z)({},o[t]),{},(0,c.Z)({},n,a)),e.setAttributes({tiersBasedOptions:o})}},m=r.tiersBasedOptions.some((function(e){return Boolean(e.recommendLabel)}));return(0,a.createElement)("form",{className:"wpbnbd__tiers",onSubmit:function(e){return e.preventDefault()}},(0,a.createElement)("div",{className:"wpbnbd__tiers__selection"},n.map((function(e){var t=s===e;return(0,a.createElement)("button",{key:e,className:h()("wpbnbd__button",{"wpbnbd__button--active":t}),onClick:function(){return l(e)}},C[e])}))),(0,a.createElement)("div",{className:"wpbnbd__tiers__options"},u.map((function(e,t){var n=r.tiersBasedOptions[t].recommendLabel||"";return(0,a.createElement)("div",{key:t,className:h()("wpbnbd__tiers__tier",{"wpbnbd__tiers__tier--recommended":n.length})},(0,a.createElement)("div",{className:"wpbnbd__tiers__top"},(0,a.createElement)("h2",{className:"wpbnbd__tiers__heading"},(0,a.createElement)(y.RichText,{onChange:f(t,"heading"),placeholder:P("Heading…","newspack-blocks"),value:r.tiersBasedOptions[t].heading,tagName:"span"})),(0,a.createElement)("h3",{className:"wpbnbd__tiers__recommend-label",style:{opacity:n?1:.5}},(0,a.createElement)(y.RichText,{onChange:f(t,"recommendLabel"),placeholder:P("…","newspack-blocks"),value:n,tagName:"span"}))),(0,a.createElement)("div",{className:"wpbnbd__tiers__amount"},(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:E(e,s)}})),(0,a.createElement)("div",{className:"submit-button",style:(0,p.Z)({appearance:"button",borderColor:r.buttonColor},m&&!n?{backgroundColor:"transparent",color:r.buttonColor}:{backgroundColor:r.buttonColor,color:k(r.buttonColor)})},(0,a.createElement)(y.RichText,{onChange:f(t,"buttonText"),placeholder:P("Button text…","newspack-blocks"),value:r.tiersBasedOptions[t].buttonText,tagName:"span"})),(0,a.createElement)("div",{className:"wpbnbd__tiers__description"},(0,a.createElement)(y.RichText,{onChange:f(t,"description"),placeholder:P("Description…","newspack-blocks"),value:r.tiersBasedOptions[t].description,tagName:"span"})))}))))};const O=function(e){var t=e.frequencySlug,n=e.tierIndex,r=e.id,o=e.label,i=e.attributes,s=e.settings,l=e.amounts,u=e.setAttributes,d=e.setSettings,f=e.disabled,h=e.ignoreMinimumAmount,m=l[t][n],v=s.minimumDonation&&!h?Math.max(m,s.minimumDonation):m;return(0,a.createElement)("span",{key:"".concat(t,"-").concat(n)},o&&(0,a.createElement)("label",{htmlFor:r},o),(0,a.createElement)("input",{type:"number",min:h?void 0:i.minimumDonation,onChange:function(e){return function(e){var t=e.value,r=e.frequency,a=i.manual?i:s;a.amounts[r][n]=parseFloat(t);var o={amounts:(0,p.Z)((0,c.Z)({},r,a.amounts[r]),a.amounts)};i.manual?u(o):d(o)}({value:e.target.value,frequency:t})},value:v,id:r,disabled:f}))};var I=i.__;const N=function(e){var t,n=(0,a.useMemo)((function(){return Math.random().toString(16).slice(2)}),[]),r=e.attributes,o=e.settings,i=e.amounts,s=e.availableFrequencies,l=e.setAttributes,c=(0,a.useRef)(null);(0,a.useEffect)((function(){if(c.current&&(!Object.fromEntries(new FormData(c.current)).donation_frequency&&c.current.elements)){var e=c.current.elements[0];e instanceof HTMLInputElement&&e.click()}-1===s.indexOf(r.defaultFrequency)&&l({defaultFrequency:s[0]})}),[r.disabledFrequencies]),(0,a.useEffect)((function(){if(c.current){var e=c.current.querySelector('[name="donation_frequency"][value="'.concat(r.defaultFrequency,'"]'));e instanceof HTMLInputElement&&e.click()}}),[r.defaultFrequency]);var p=(0,a.useState)(r.defaultFrequency),f=(0,d.Z)(p,2),m=f[0],v=f[1],g=null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.can_use_name_your_price,b=function(e){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"radio",value:e,id:"newspack-donate-".concat(e,"-").concat(n),name:"donation_frequency",checked:e===m,onChange:function(e){return v(e.target.value)}}),(0,a.createElement)("label",{htmlFor:"newspack-donate-"+e+"-"+n},C[e]))},w=function(e){return(0,a.createElement)("button",{key:e,role:"tab",className:h()("wpbnbd__button freq-label",{"wpbnbd__button--active":e===m}),id:"tab-newspack-donate-".concat(e,"-").concat(n),onClick:function(t){t.preventDefault(),v(e)}},C[e])};return(0,a.createElement)("form",{ref:c},e.isTiered?(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__options"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies"},(0,a.createElement)("div",{className:"tab-container"},s.map(w)),s.map((function(e){return(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",key:e},b(e),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__tiers tiers"},i[e].map((function(t,r){var i=3===r,s="newspack-tier-".concat(e,"-").concat(n,"-").concat(i?"other":r);return(0,a.createElement)("div",{className:h()("wp-block-newspack-blocks-donate__tier","wp-block-newspack-blocks-donate__tier--".concat(i?"other":"frequency")),key:r},(0,a.createElement)("input",{type:"radio",value:i?"other":t,className:i?"other-input":"frequency-input",id:s,name:"donation_value_".concat(e),defaultChecked:1===r}),(0,a.createElement)("label",{className:"tier-select-label tier-label",htmlFor:s},i?I("Other","newspack-blocks"):o.currencySymbol+t.toFixed(2).replace(/\.?0*$/,"")),i?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("label",{className:"odl",htmlFor:s+"-other-input"},I("Donation amount","newspack-blocks")),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input"},(0,a.createElement)("span",{className:"currency"},o.currencySymbol),(0,a.createElement)("input",{type:"number",readOnly:!0}))):null)}))))})))):(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__options"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequencies frequencies"},(0,a.createElement)("div",{className:"tab-container"},s.map(w)),s.map((function(t){var r=i[t][3];return(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__frequency frequency",key:t},b(t),(0,a.createElement)("div",{className:"input-container"},g?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("label",{className:"donate-label",htmlFor:"newspack-"+t+"-"+n+"-untiered-input"},I("Donation amount","newspack-blocks")),(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__money-input money-input"},(0,a.createElement)("span",{className:"currency"},o.currencySymbol),(0,a.createElement)(O,(0,u.Z)({},e,{frequencySlug:t,tierIndex:3,id:"newspack-".concat(t,"-").concat(n,"-untiered-input")})))):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"radio",value:r,className:"frequency-input",id:"newspack-".concat(t,"-").concat(n,"-untiered-input"),name:"donation_value_".concat(t),defaultChecked:!0}),(0,a.createElement)("label",{className:"tier-select-label tier-label",htmlFor:"newspack-".concat(t,"-").concat(n,"-untiered-input")},(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:E(r,t)}})))))})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",{className:"wp-block-newspack-blocks-donate__thanks thanks"},(0,a.createElement)(y.RichText,{onChange:function(e){return l({thanksText:e})},placeholder:I("Thank you text…","newspack-blocks"),value:r.thanksText,tagName:"span"})),(0,a.createElement)("div",{className:"submit-button",style:{backgroundColor:r.buttonColor,color:k(r.buttonColor)}},(0,a.createElement)(y.RichText,{onChange:function(e){return l({buttonText:e})},placeholder:I("Button text…","newspack-blocks"),value:r.buttonText,tagName:"span"}))))};var z=n(5189),D=i.__,L=[D("Low-tier","newspack-blocks"),D("Mid-tier","newspack-blocks"),D("High-tier","newspack-blocks")];const R=function(e){var t,n=e.attributes,r=e.setAttributes,s=e.className,l=(0,a.useState)(!0),f=(0,d.Z)(l,2),v=f[0],w=f[1],k=(0,a.useState)(""),E=(0,d.Z)(k,2),S=E[0],x=E[1],P=m.PT.useObjectState({amounts:{},currencySymbol:"$",tiered:!1,disabledFrequencies:{},minimumDonation:5,platform:""}),I=(0,d.Z)(P,2),R=I[0],j=I[1];if((0,a.useEffect)((function(){g()({path:"/newspack/v1/wizard/newspack-reader-revenue-wizard/donations"}).then((function(e){if(j({amounts:e.amounts,currencySymbol:e.currencySymbol,tiered:e.tiered,disabledFrequencies:e.disabledFrequencies,minimumDonation:e.minimumDonation,platform:e.platform}),(0,b.isEmpty)(n.disabledFrequencies)&&r({disabledFrequencies:e.disabledFrequencies}),(0,b.isEmpty)(n.minimumDonation)&&r({minimumDonation:e.minimumDonation}),(0,b.isEmpty)(n.amounts)&&n.suggestedAmounts&&n.suggestedAmounts.length){var t=n.suggestedAmountUntiered||e.amounts.month[3];r({suggestedAmounts:void 0,suggestedAmountUntiered:void 0,amounts:{once:_("once",n.suggestedAmounts,t),month:_("month",n.suggestedAmounts,t),year:_("year",n.suggestedAmounts,t)}})}else r({amounts:(0,p.Z)((0,p.Z)({},e.amounts),n.amounts)})})).catch(x).finally((function(){return w(!1)}))}),[]),S.length)return(0,a.createElement)(o.Placeholder,{icon:"warning",label:D("Error","newspack-blocks"),instructions:S},(0,a.createElement)(o.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},D("Go to donation settings to troubleshoot.","newspack-blocks")));if("other"===R.platform)return(0,a.createElement)(o.Placeholder,{icon:"warning",label:D("The Donate block will not be rendered.","newspack-blocks"),instructions:D('The Reader Revenue platform is set to "other".',"newspack-blocks")},(0,a.createElement)(o.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},D("Go to donation settings to update the platform.","newspack-blocks")));if(v)return(0,a.createElement)(o.Placeholder,{icon:(0,a.createElement)(o.Spinner,null),className:"component-placeholder__align-center"});var B=null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.can_use_name_your_price,F=n.manual&&B,$=F?n.tiered:R.tiered,H=$&&"tiers"===n.layoutOption,q=F?n.amounts:R.amounts,V=T.filter((function(e){return F?!n.disabledFrequencies[e]:!R.disabledFrequencies[e]}));-1===s.indexOf("is-style")&&(s+=" is-style-default"),B||(s+=" wpbnbd--nyp-disabled");var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return h()(e,s,"wpbnbd","wpbnbd--".concat(H?"tiers-based":"frequency-based"),"wpbnbd--platform-".concat(R.platform),"wpbnbd-frequencies--".concat(V.length))},U=F?n.minimumDonation:R.minimumDonation,G=(0,p.Z)({},q);Object.keys(q).forEach((function(e){var t=q[e].map((function(e){return Math.max(e,U)}));G[e]=t}));var W={attributes:n,amounts:q,availableFrequencies:V,settings:R,setAttributes:r,setSettings:j},Y=function(){return(0,a.createElement)("p",{className:"components-frequency-donations__error"},(0,i.sprintf)(D("Warning: suggested donations should be at least the minimum donation amount (%1$s%2$d).","newspack-blocks"),R.currencySymbol,U))};return(0,a.createElement)(a.Fragment,null,H?(0,a.createElement)("div",{className:Z()},(0,a.createElement)(A,(0,u.Z)({},W,{amounts:G}))):(0,a.createElement)("div",{className:Z([$?"tiered":"untiered"])},(0,a.createElement)(N,(0,u.Z)({isTiered:$},W,{amounts:G}))),(0,a.createElement)(y.InspectorControls,null,(0,a.createElement)(o.PanelBody,{title:D("Layout","newspack-blocks")},B&&(0,a.createElement)("div",{className:"newspack-blocks-donate__layout-selector"},M.map((function(e){var t=e.label,n=e.key,i="tiers"===n?H:!H;return(0,a.createElement)(o.Button,{key:n,variant:i?"primary":"secondary",isPressed:i,onClick:function(){return r({layoutOption:n})},"aria-current":i,disabled:"tiers"===n&&!$},t)}))),B&&!$&&(0,a.createElement)(o.Notice,{isDismissible:!1,className:"newspack-blocks-donate__notice"},D("Tiers layout is disabled if the block is set to render untiered.","newspack-blocks")),!H&&(0,a.createElement)(o.SelectControl,{label:D("Default Tab","newspack-blocks"),value:n.defaultFrequency,options:V.map((function(e){return{label:C[e],value:e}})),onChange:function(e){return r({defaultFrequency:e})}})),B&&(0,a.createElement)(o.PanelBody,{title:D("Suggested Donations","newspack-blocks")},(0,a.createElement)(o.ToggleControl,{checked:Boolean(F),onChange:function(){return r({manual:!n.manual})},label:D("Configure manually","newspack-blocks")}),F?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.ToggleControl,{checked:Boolean($),onChange:function(){return r({tiered:!n.tiered})},label:D("Tiered","newspack-blocks")}),$?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-frequency-donations"},T.map((function(e){var t=n.disabledFrequencies[e],i=Object.values((0,b.pick)(n.disabledFrequencies,T)).filter(Boolean).length,s=T.length-i==1;return(0,a.createElement)(a.Fragment,{key:e},(0,a.createElement)(o.CheckboxControl,{label:C[e],checked:!t,disabled:!t&&s,onChange:function(){r({disabledFrequencies:(0,p.Z)((0,p.Z)({},n.disabledFrequencies),{},(0,c.Z)({},e,!t))})}}),!t&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs"},q[e].reduce((function(e,t){return!t||t<U||e}),!1)&&Y(),q[e].map((function(t,n){return 3===n?null:(0,a.createElement)(O,(0,u.Z)({ignoreMinimumAmount:!0},W,{key:"amount-".concat(e,"-").concat(n),frequencySlug:e,tierIndex:n,label:L[n],id:"".concat(e,"-").concat(n,"-amount"),disabled:H&&3===n}))}))))})))):(0,a.createElement)("div",{className:"components-frequency-donations"},(0,a.createElement)("div",{className:"wp-block-newspack-blocks-donate__panel-inputs"},T.reduce((function(e,t){return!q[t][3]||q[t][3]<n.minimumDonation||e}),!1)&&Y(),T.map((function(e){return(0,a.createElement)(O,(0,u.Z)({ignoreMinimumAmount:!0},W,{key:e,frequencySlug:e,tierIndex:3,label:C[e],id:"".concat(e,"-",3,"-amount")}))})))),(0,a.createElement)(o.TextControl,{className:"components-frequency-donations__minimum-donation",type:"number",label:D("Minimum donation","newspack-blocks"),min:1,onChange:function(e){return r({minimumDonation:e})},value:n.minimumDonation})):(0,a.createElement)("p",null,D("The Donate Block allows you to collect donations from readers. The fields are automatically defined based on your donation settings.","newspack-blocks"),(0,a.createElement)("br",null),(0,a.createElement)("br",null),(0,a.createElement)(o.ExternalLink,{href:"/wp-admin/admin.php?page=newspack-reader-revenue-wizard#/donations"},D("Edit donation settings","newspack-blocks")))),(0,a.createElement)(o.PanelBody,{title:D("Styling","newspack-blocks"),initialOpen:!1},(0,a.createElement)(y.ColorPaletteControl,{value:n.buttonColor,onChange:function(e){return r({buttonColor:e})},label:D("Button Color","newspack-blocks")})),(0,a.createElement)(o.PanelBody,{title:D("Campaign","newspack-blocks"),initialOpen:!1},(0,a.createElement)(o.TextControl,{label:D("Campaign ID","newspack-blocks"),value:n.campaign||"",onChange:function(e){return r({campaign:e})}})),window.newspack_blocks_data.supports_recaptcha&&(0,a.createElement)(o.PanelBody,{title:D("Spam protection","newspack")},(0,a.createElement)("p",null,(0,i.sprintf)(D("reCAPTCHA v3 is currently %s.","newspack"),window.newspack_blocks_data.has_recaptcha?D("enabled","newspack"):D("disabled","newspack"))),!window.newspack_blocks_data.has_recaptcha&&(0,a.createElement)("p",null,D("It's highly recommended that you enable reCAPTCHA v3 protection to prevent spambots from using this form!","newspack")),(0,a.createElement)("p",null,(0,a.createElement)("a",{href:window.newspack_blocks_data.recaptcha_url},D("Configure your reCAPTCHA settings.","newspack")))),(0,a.createElement)(o.PanelBody,{title:D("After purchase","newspack-blocks")},(0,a.createElement)(z.Z,{setAttributes:r,attributes:n}))))},j=JSON.parse('{"u2":"donate","W3":"newspack","Y4":{"className":{"type":"string"},"manual":{"type":"boolean"},"tiered":{"type":"boolean","default":true},"amounts":{"type":"object","default":{}},"disabledFrequencies":{"type":"object","default":{}},"thanksText":{"type":"string","default":"Your contribution is appreciated."},"buttonText":{"type":"string","default":"Donate Now"},"defaultFrequency":{"type":"string","default":"month"},"campaign":{"type":"string"},"buttonColor":{"type":"string","default":"#dd3333"},"suggestedAmounts":{"type":"array"},"suggestedAmountUntiered":{"type":"number"},"minimumDonation":{"type":"number"},"layoutOption":{"type":"string","default":"frequency"},"useModalCheckout":{"type":"boolean","default":true},"tiersBasedOptions":{"type":"array","default":[{"heading":"Small","description":"","buttonText":"Select","recommendLabel":""},{"heading":"Medium","description":"","buttonText":"Select","recommendLabel":"BEST VALUE"},{"heading":"Large","description":"","buttonText":"Select","recommendLabel":""}]},"afterSuccessBehavior":{"type":"string"},"afterSuccessButtonLabel":{"type":"string","default":"Continue browsing"},"afterSuccessURL":{"type":"string"}},"be":{"html":false,"align":false}}');var B=i.__,F=j.u2,$=j.Y4,H=j.W3,q=j.be,V={title:B("Donate","newspack-blocks"),icon:{src:l,foreground:"#36f"},category:H,keywords:[B("donate","newspack-blocks"),B("memberships","newspack-blocks"),B("subscriptions","newspack-blocks")],description:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,B("Manually place a donation block on any post or page on your site.","newspack-blocks")),(0,a.createElement)(o.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/donate-block/"},B("Support reference","newspack-blocks"))),attributes:$,supports:q,edit:R,save:function(){return null}};(0,r.registerBlockStyle)("newspack-blocks/donate",{name:"alternate",label:B("Alternate","newapack-blocks")}),(0,r.registerBlockStyle)("newspack-blocks/donate",{name:"minimal",label:B("Minimal","newapack-blocks")}),(0,r.registerBlockType)("newspack-blocks/".concat(F),V)},1341:(e,t,n)=>{"use strict";var r=n(4981),a=n(6989),o=n.n(a),i=n(9307),s=n(5609),l=n(2694),c=n(5736),u=n(5048),p=n(3144),d=n(7326),f=n(136),h=n(8347),m=n(4942),v=n(6967),g=n(1030),y=n(2089),b=n(96),w=n(3967),k=n.n(w),_=n(9771),E=n(2175),S=n(9818),x=n(4333),C=n(2629),T=n(1984),M=n(444);const P=(0,i.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(M.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),A=(0,i.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(M.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),O=(0,i.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(M.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));var I=n(8341),N=n(5573);const z=(0,i.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)(M.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),D=(0,i.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(M.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var L,__=c.__;"object"==typeof window&&window.newspack_blocks_data&&window.newspack_blocks_data.post_subtitle&&(L=!0);var R=(0,i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,i.createElement)(s.Path,{clipRule:"evenodd",d:"M18.714 7.5H5.286a.786.786 0 00-.786.786v7.428c0 .434.352.786.786.786h13.428a.786.786 0 00.786-.786V8.286a.786.786 0 00-.786-.786zM5.286 6A2.286 2.286 0 003 8.286v7.428A2.286 2.286 0 005.286 18h13.428A2.286 2.286 0 0021 15.714V8.286A2.286 2.286 0 0018.714 6H5.286z",fillRule:"evenodd"})),j=(0,i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,i.createElement)(s.Path,{clipRule:"evenodd",d:"M15.714 4.5H8.286a.786.786 0 00-.786.786v13.428c0 .434.352.786.786.786h7.428a.786.786 0 00.786-.786V5.286a.786.786 0 00-.786-.786zM8.286 3A2.286 2.286 0 006 5.286v13.428A2.286 2.286 0 008.286 21h7.428A2.286 2.286 0 0018 18.714V5.286A2.286 2.286 0 0015.714 3H8.286z",fillRule:"evenodd"})),B=(0,i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,i.createElement)(s.Path,{clipRule:"evenodd",d:"M18.714 4.5H5.286a.786.786 0 00-.786.786v13.428c0 .434.352.786.786.786h13.428a.786.786 0 00.786-.786V5.286a.786.786 0 00-.786-.786zM5.286 3A2.286 2.286 0 003 5.286v13.428A2.286 2.286 0 005.286 21h13.428A2.286 2.286 0 0021 18.714V5.286A2.286 2.286 0 0018.714 3H5.286z",fillRule:"evenodd"})),F=function(e){(0,f.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;(0,u.Z)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),(0,m.Z)((0,d.Z)(e),"renderPost",(function(t){var n=e.props,r=n.attributes,a=n.isUIDisabled,o=r.showImage,s=r.imageShape,l=r.mediaPosition,c=r.minHeight,u=r.showCaption,p=r.showExcerpt,d=r.showReadMore,f=r.readMoreLabel,h=r.showSubtitle,m=r.showAuthor,v=r.showAvatar,g=r.showDate,b=r.showCategory,w=r.sectionHeader,S={minHeight:"behind"===l&&o&&t.newspack_featured_image_src&&c+"vh",paddingTop:"behind"===l&&o&&t.newspack_featured_image_src&&c/5+"vh"},x=k()({"post-has-image":t.newspack_featured_image_src,"newspack-block--disabled":a},t.newspack_article_classes),T=e.titleForPost(t),M=(0,_.__experimentalGetSettings)().formats.date;return(0,i.createElement)("article",{className:x,key:t.id,style:S},(0,y.fC)(t),o&&t.newspack_featured_image_src&&(0,i.createElement)("figure",{className:"post-thumbnail",key:"thumbnail"},(0,i.createElement)("a",{href:"#"},"landscape"===s&&(0,i.createElement)("img",{src:t.newspack_featured_image_src.landscape,alt:""}),"portrait"===s&&(0,i.createElement)("img",{src:t.newspack_featured_image_src.portrait,alt:""}),"square"===s&&(0,i.createElement)("img",{src:t.newspack_featured_image_src.square,alt:""}),"uncropped"===s&&(0,i.createElement)("img",{src:t.newspack_featured_image_src.uncropped,alt:""})),u&&""!==t.newspack_featured_image_caption&&(0,i.createElement)("figcaption",null,t.newspack_featured_image_caption)),(0,i.createElement)("div",{className:"entry-wrapper"},(t.newspack_post_sponsors||b&&0<t.newspack_category_info.length)&&(0,i.createElement)("div",{className:"cat-links"+(t.newspack_post_sponsors?" sponsor-label":"")},t.newspack_post_sponsors&&(0,i.createElement)("span",{className:"flag"},t.newspack_post_sponsors[0].flag),b&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_categories)&&(0,i.createElement)(i.RawHTML,null,(0,C.decodeEntities)(t.newspack_category_info))),E.RichText.isEmpty(w)?(0,i.createElement)("h2",{className:"entry-title",key:"title"},(0,i.createElement)("a",{href:"#"},T)):(0,i.createElement)("h3",{className:"entry-title",key:"title"},(0,i.createElement)("a",{href:"#"},T)),L&&h&&(0,i.createElement)(i.RawHTML,{key:"subtitle",className:"newspack-post-subtitle newspack-post-subtitle--in-homepage-block"},t.meta.newspack_post_subtitle||""),p&&(0,i.createElement)(i.RawHTML,{key:"excerpt",className:"excerpt-contain"},t.excerpt.rendered),d&&t.post_link&&(0,i.createElement)("a",{href:"#",key:"readmore",className:"more-link"},f),(0,i.createElement)("div",{className:"entry-meta"},t.newspack_post_sponsors&&(0,i.createElement)("span",{className:"entry-sponsors ".concat(t.newspack_sponsors_show_author?"plus-author":"")},(0,y.b2)(t.newspack_post_sponsors),(0,y.Q$)(t.newspack_post_sponsors)),m&&!t.newspack_listings_hide_author&&v&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_author)&&(0,y.lW)(t.newspack_author_info),m&&!t.newspack_listings_hide_author&&(!t.newspack_post_sponsors||t.newspack_sponsors_show_author)&&(0,y.FX)(t.newspack_author_info),g&&!t.newspack_listings_hide_publish_date&&(0,i.createElement)("time",{className:"entry-date published",key:"pub-date"},(0,_.dateI18n)(M,t.date)))))})),(0,m.Z)((0,d.Z)(e),"titleForPost",(function(e){return e.title?"string"==typeof e.title?(0,C.decodeEntities)(e.title.trim()):"object"==typeof e.title&&e.title.rendered?(0,C.decodeEntities)(e.title.rendered.trim()):void 0:""})),(0,m.Z)((0,d.Z)(e),"renderInspectorControls",(function(){var t=e.props,n=t.attributes,r=t.setAttributes,a=t.textColor,o=t.setTextColor,l=n.authors,c=n.specificPosts,u=n.postsToShow,p=n.categories,d=n.includeSubcategories,f=n.customTaxonomies,h=n.columns,y=n.colGap,w=n.postType,k=n.showImage,_=n.showCaption,S=n.imageScale,x=n.mobileStack,C=n.minHeight,T=n.moreButton,M=n.showExcerpt,P=n.showReadMore,A=n.readMoreLabel,O=n.excerptLength,I=n.showSubtitle,N=n.typeScale,z=n.showDate,D=n.showAuthor,R=n.showAvatar,j=n.showCategory,B=n.postLayout,F=n.mediaPosition,$=n.specificMode,H=n.tags,q=n.tagExclusions,V=n.categoryExclusions,Z=n.customTaxonomyExclusions,U=[{value:1,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:2,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:3,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")},{value:4,label:__("Extra Large","newspack-blocks"),shortName:__("XL","newspack-blocks")}],G=[{value:1,label:__("Small","newspack-blocks"),shortName:__("S","newspack-blocks")},{value:2,label:__("Medium","newspack-blocks"),shortName:__("M","newspack-blocks")},{value:3,label:__("Large","newspack-blocks"),shortName:__("L","newspack-blocks")}],W=function(e){return function(t){return r((0,m.Z)({},e,t))}};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.PanelBody,{title:__("Display Settings","newspack-blocks"),initialOpen:!0},(0,i.createElement)(v.Z,{numberOfItems:u,onNumberOfItemsChange:function(e){return r({postsToShow:e||1})},specificMode:$,onSpecificModeChange:W("specificMode"),specificPosts:c,onSpecificPostsChange:W("specificPosts"),authors:l,onAuthorsChange:W("authors"),categories:p,onCategoriesChange:W("categories"),includeSubcategories:d,onIncludeSubcategoriesChange:W("includeSubcategories"),tags:H,onTagsChange:W("tags"),onCustomTaxonomiesChange:W("customTaxonomies"),customTaxonomies:f,tagExclusions:q,onTagExclusionsChange:W("tagExclusions"),categoryExclusions:V,onCategoryExclusionsChange:W("categoryExclusions"),customTaxonomyExclusions:Z,onCustomTaxonomyExclusionsChange:W("customTaxonomyExclusions"),postType:w}),"grid"===B&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.RangeControl,{label:__("Columns","newspack-blocks"),value:h,onChange:W("columns"),min:2,max:6,required:!0}),(0,i.createElement)(s.BaseControl,{label:__("Columns Gap","newspack-blocks"),id:"newspackcolumns-col-gap"},(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ButtonGroup,{id:"newspackcolumns-col-gap","aria-label":__("Columns Gap","newspack-blocks")},G.map((function(e){var t=y===e.value;return(0,i.createElement)(s.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return r({colGap:e.value})}},e.shortName)})))))),!$&&(0,g.pM)()?(0,i.createElement)("i",null,__('This blog is private, therefore the "Load more posts" feature is not active.',"newspack-blocks")):!$&&(0,i.createElement)(s.ToggleControl,{label:__('Show "Load more posts" Button',"newspack-blocks"),checked:T,onChange:function(){return r({moreButton:!T})}}),(0,i.createElement)(s.ToggleControl,{label:__("Allow duplicate stories","newspack-blocks"),help:__("If checked, this block will be excluded from the page's de-duplication logic. Duplicate stories may appear.","newspack-blocks"),checked:!n.deduplicate,onChange:function(e){return r({deduplicate:!e})},className:"newspack-blocks-deduplication-toggle"})),(0,i.createElement)(s.PanelBody,{title:__("Featured Image Settings","newspack-blocks")},(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Featured Image","newspack-blocks"),checked:k,onChange:function(){return r({showImage:!k})}})),k&&(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Featured Image Caption","newspack-blocks"),checked:_,onChange:function(){return r({showCaption:!_})}})),k&&"top"!==F&&"behind"!==F&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Stack on mobile","newspack-blocks"),checked:x,onChange:function(){return r({mobileStack:!x})}})),(0,i.createElement)(s.BaseControl,{label:__("Featured Image Size","newspack-blocks"),id:"newspackfeatured-image-size"},(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ButtonGroup,{id:"newspackfeatured-image-size","aria-label":__("Featured Image Size","newspack-blocks")},U.map((function(e){var t=S===e.value;return(0,i.createElement)(s.Button,{isPrimary:t,"aria-pressed":t,"aria-label":e.label,key:e.value,onClick:function(){return r({imageScale:e.value})}},e.shortName)})))))),k&&"behind"===F&&(0,i.createElement)(s.RangeControl,{label:__("Minimum height","newspack-blocks"),help:__("Sets a minimum height for the block, using a percentage of the screen's current height.","newspack-blocks"),value:C,onChange:function(e){return r({minHeight:e})},min:0,max:100,required:!0})),(0,i.createElement)(s.PanelBody,{title:__("Post Control Settings","newspack-blocks")},L&&(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Subtitle","newspack-blocks"),checked:I,onChange:function(){return r({showSubtitle:!I})}})),(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Excerpt","newspack-blocks"),checked:M,onChange:function(){return r({showExcerpt:!M})}})),M&&(0,i.createElement)(s.RangeControl,{label:__("Max number of words in excerpt","newspack-blocks"),value:O,onChange:function(e){return r({excerptLength:e})},min:10,max:100}),(0,i.createElement)(s.ToggleControl,{label:__('Add a "Read More" link',"newspack-blocks"),checked:P,onChange:function(){return r({showReadMore:!P})}}),P&&(0,i.createElement)(s.TextControl,{label:__('"Read More" link text',"newspack-blocks"),value:A,placeholder:A,onChange:function(e){return r({readMoreLabel:e})}}),(0,i.createElement)(s.RangeControl,{className:"type-scale-slider",label:__("Type Scale","newspack-blocks"),value:N,onChange:function(e){return r({typeScale:e})},min:1,max:10,required:!0})),(0,i.createElement)(E.PanelColorSettings,{title:__("Color Settings","newspack-blocks"),initialOpen:!0,colorSettings:[{value:a.color,onChange:o,label:__("Text Color","newspack-blocks")}]}),(0,i.createElement)(s.PanelBody,{title:__("Post Meta Settings","newspack-blocks")},(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Date","newspack-blocks"),checked:z,onChange:function(){return r({showDate:!z})}})),(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Category","newspack-blocks"),checked:j,onChange:function(){return r({showCategory:!j})}})),(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Author","newspack-blocks"),checked:D,onChange:function(){return r({showAuthor:!D})}})),D&&(0,i.createElement)(s.PanelRow,null,(0,i.createElement)(s.ToggleControl,{label:__("Show Author Avatar","newspack-blocks"),checked:R,onChange:function(){return r({showAvatar:!R})}}))),(0,i.createElement)(b.L,{attributes:n,setAttributes:r}),(0,i.createElement)(b.H,{attributes:n,setAttributes:r}))})),e}return(0,p.Z)(n,[{key:"componentDidMount",value:function(){this.props.triggerReflow()}},{key:"componentDidUpdate",value:function(e){(0,g.Ou)(e,this.props)&&this.props.triggerReflow()}},{key:"componentWillUnmount",value:function(){this.props.triggerReflow()}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,a=n.className,o=n.setAttributes,l=n.isSelected,c=n.latestPosts,u=n.textColor,p=n.error,d=r.showImage,f=r.imageShape,h=r.postLayout,v=r.mediaPosition,y=r.moreButton,b=r.moreButtonText,w=r.columns,_=r.colGap,S=r.typeScale,x=r.imageScale,C=r.mobileStack,M=r.sectionHeader,L=r.showCaption,F=r.showCategory,$=r.specificMode,H=r.textAlign,q=k()(a,(e={"is-grid":"grid"===h,"show-image":d},(0,m.Z)(e,"columns-".concat(w),"grid"===h),(0,m.Z)(e,"colgap-".concat(_),"grid"===h),(0,m.Z)(e,"ts-".concat(S),"5"!==S),(0,m.Z)(e,"image-align".concat(v),d),(0,m.Z)(e,"is-".concat(x),"1"!==x&&d),(0,m.Z)(e,"mobile-stack",C),(0,m.Z)(e,"is-".concat(f),d),(0,m.Z)(e,"has-text-color",""!==u.color),(0,m.Z)(e,"show-caption",L),(0,m.Z)(e,"show-category",F),(0,m.Z)(e,"has-text-align-".concat(H),H),(0,m.Z)(e,"wpnbha",!0),e)),V=[{icon:(0,i.createElement)(T.Z,{icon:P}),title:__("List View","newspack-blocks"),onClick:function(){return o({postLayout:"list"})},isActive:"list"===h},{icon:(0,i.createElement)(T.Z,{icon:A}),title:__("Grid View","newspack-blocks"),onClick:function(){return o({postLayout:"grid"})},isActive:"grid"===h}],Z=[{icon:(0,i.createElement)(T.Z,{icon:O}),title:__("Show media on top","newspack-blocks"),isActive:"top"===v,onClick:function(){return o({mediaPosition:"top"})}},{icon:(0,i.createElement)(T.Z,{icon:I.Z}),title:__("Show media on left","newspack-blocks"),isActive:"left"===v,onClick:function(){return o({mediaPosition:"left"})}},{icon:(0,i.createElement)(T.Z,{icon:N.Z}),title:__("Show media on right","newspack-blocks"),isActive:"right"===v,onClick:function(){return o({mediaPosition:"right"})}},{icon:(0,i.createElement)(T.Z,{icon:z}),title:__("Show media behind","newspack-blocks"),isActive:"behind"===v,onClick:function(){return o({mediaPosition:"behind"})}}],U=[{icon:R,title:__("Landscape Image Shape","newspack-blocks"),isActive:"landscape"===f,onClick:function(){return o({imageShape:"landscape"})}},{icon:j,title:__("portrait Image Shape","newspack-blocks"),isActive:"portrait"===f,onClick:function(){return o({imageShape:"portrait"})}},{icon:B,title:__("Square Image Shape","newspack-blocks"),isActive:"square"===f,onClick:function(){return o({imageShape:"square"})}},{icon:(0,i.createElement)(T.Z,{icon:D}),title:__("Uncropped","newspack-blocks"),isActive:"uncropped"===f,onClick:function(){return o({imageShape:"uncropped"})}}];return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:q,style:{color:u.color}},(0,i.createElement)("div",null,c&&(!E.RichText.isEmpty(M)||l)&&(0,i.createElement)(E.RichText,{onChange:function(e){return o({sectionHeader:e})},placeholder:__("Write header…","newspack-blocks"),value:M,tagName:"h2",className:"article-section-title"}),c&&!c.length&&(0,i.createElement)(s.Placeholder,null,__("Sorry, no posts were found.","newspack-blocks")),!c&&!p&&(0,i.createElement)(s.Placeholder,{icon:(0,i.createElement)(s.Spinner,null),className:"component-placeholder__align-center"}),!c&&p&&(0,i.createElement)(s.Placeholder,{className:"component-placeholder__align-center newspack-block--error"},p),c&&c.map((function(e){return t.renderPost(e)})))),!$&&c&&y&&!(0,g.pM)()&&(0,i.createElement)("div",{className:"editor-styles-wrapper wpnbha__wp-block-button__wrapper"},(0,i.createElement)("div",{className:"wp-block-button"},(0,i.createElement)(E.RichText,{placeholder:__("Load more posts","newspack-blocks"),value:b,onChange:function(e){return o({moreButtonText:e})},className:"wp-block-button__link",allowedFormats:[]}))),(0,i.createElement)(E.BlockControls,null,(0,i.createElement)(s.Toolbar,null,(0,i.createElement)(E.AlignmentControl,{value:H,onChange:function(e){o({textAlign:e})}})),(0,i.createElement)(s.Toolbar,{controls:V}),d&&(0,i.createElement)(s.Toolbar,{controls:Z}),d&&(0,i.createElement)(s.Toolbar,{controls:U})),(0,i.createElement)(E.InspectorControls,null,this.renderInspectorControls()))}}]),n}(i.Component);const $=(0,x.compose)([(0,E.withColors)({textColor:"color"}),(0,S.withSelect)(g.b9),(0,S.withDispatch)(g.eL)])(F);var H=n(3357),q=c.__,_x=c._x,V=H.u2,Z=H.Y4,U=H.W3,G={title:q("Homepage Posts","newspack-blocks"),icon:{src:(0,i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,i.createElement)(s.Path,{d:"M6.5 14.25H11v-1.5H6.5zM14.5 11.25h-8v-1.5h8zM6.5 8.25h8v-1.5h-8z"}),(0,i.createElement)(s.Path,{clipRule:"evenodd",d:"M4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.272 3.728 18 4.625 18h11.75c.897 0 1.625-.728 1.625-1.625V4.625C18 3.728 17.272 3 16.375 3zm11.75 1.5H4.625a.125.125 0 00-.125.125v11.75c0 .069.056.125.125.125h11.75a.125.125 0 00.125-.125V4.625a.125.125 0 00-.125-.125z",fillRule:"evenodd"}),(0,i.createElement)(s.Path,{d:"M20.25 8v11c0 .69-.56 1.25-1.249 1.25H6v1.5h13.001A2.749 2.749 0 0021.75 19V8z"})),foreground:"#36f"},attributes:Z,category:U,keywords:[q("posts","newspack-blocks"),q("articles","newspack-blocks"),q("latest","newspack-blocks")],description:q("A block for displaying homepage posts.","newspack-blocks"),styles:[{name:"default",label:_x("Default","block style","newspack-blocks"),isDefault:!0},{name:"borders",label:_x("Borders","block style","newspack-blocks")}],supports:{html:!1,align:["wide","full"],default:""},edit:$,save:function(){return null},transforms:{from:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.displayPostContent,n=e.displayPostDate,a=e.postLayout,o=e.columns,i=e.postsToShow,s=e.categories;return(0,r.createBlock)((0,l.applyFilters)("blocks.transforms_from_name","newspack-blocks/homepage-articles"),{showExcerpt:t,showDate:n,postLayout:a,columns:o,postsToShow:i,showAuthor:!1,categories:s?[s]:[]})}}],to:[{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.showExcerpt,n=e.showDate,a=e.postLayout,o=e.columns,i=e.postsToShow,s=e.categories;return(0,r.createBlock)("core/latest-posts",{displayPostContent:t,displayPostDate:n,postLayout:a,columns:o,postsToShow:i,categories:s[0]||""})}}]}},W=n(632),Y=n(1176),X="newspack-blocks/".concat(V);(0,r.registerBlockType)(X,G),(0,Y.f)([X,"newspack-blocks/".concat(W.u2)]),o()({path:"/newspack-blocks/v1/homepage-articles-css"}).then((function(e){var t=document.createElement("style");t.innerHTML=e,t.id="newspack-blocks-homepage-articles-styles",document.head.appendChild(t)}))},1176:(e,t,n)=>{"use strict";n.d(t,{$:()=>gt,f:()=>Mt});var r=n(9062),a=n(1413);function o(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var i="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function u(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(o(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(o(1));return n(u)(e,t)}if("function"!=typeof e)throw new Error(o(2));var a=e,s=t,p=[],d=p,f=!1;function h(){d===p&&(d=p.slice())}function m(){if(f)throw new Error(o(3));return s}function v(e){if("function"!=typeof e)throw new Error(o(4));if(f)throw new Error(o(5));var t=!0;return h(),d.push(e),function(){if(t){if(f)throw new Error(o(6));t=!1,h();var n=d.indexOf(e);d.splice(n,1),p=null}}}function g(e){if(!c(e))throw new Error(o(7));if(void 0===e.type)throw new Error(o(8));if(f)throw new Error(o(9));try{f=!0,s=a(s,e)}finally{f=!1}for(var t=p=d,n=0;n<t.length;n++){(0,t[n])()}return e}function y(e){if("function"!=typeof e)throw new Error(o(10));a=e,g({type:l.REPLACE})}function b(){var e,t=v;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(o(11));function n(){e.next&&e.next(m())}return n(),{unsubscribe:t(n)}}})[i]=function(){return this},e}return g({type:l.INIT}),(r={dispatch:g,subscribe:v,getState:m,replaceReducer:y})[i]=b,r}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var d=function(e){return"@@redux-saga/"+e},f=d("CANCEL_PROMISE"),h=d("CHANNEL_END"),m=d("IO"),v=d("MATCH"),g=d("MULTICAST"),y=d("SAGA_ACTION"),b=d("SELF_CANCELLATION"),w=d("TASK"),k=d("TASK_CANCEL"),_=d("TERMINATE"),E=d("LOCATION"),S=function(e){return null==e},x=function(e){return null!=e},C=function(e){return"function"==typeof e},T=function(e){return"string"==typeof e},M=Array.isArray,P=function(e){return e&&C(e.then)},A=function(e){return e&&C(e.next)&&C(e.throw)},O=function e(t){return t&&(T(t)||z(t)||C(t)||M(t)&&t.every(e))},I=function(e){return e&&C(e.take)&&C(e.close)},N=function(e){return C(e)&&e.hasOwnProperty("toString")},z=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},D=n(7462);const L=function(e,t){var n;void 0===t&&(t=!0);var r=new Promise((function(r){n=setTimeout(r,Math.min(2147483647,e),t)}));return r[f]=function(){clearTimeout(n)},r};var R=function(e){return function(){return e}}(!0),j=function(){};var B=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var F=function(e,t){(0,D.Z)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))};function $(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var H=function(e){throw e},q=function(e){return{value:e,done:!0}};function V(e,t,n){void 0===t&&(t=H),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:q,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function Z(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var U=function(e){return Array.apply(null,new Array(e))},G=function(e){return function(t){return e(Object.defineProperty(t,y,{value:!0}))}},W=function(e){return e===_},Y=function(e){return e===k},X=function(e){return W(e)||Y(e)};function K(e,t){var n=Object.keys(e),r=n.length;var a,o=0,i=M(e)?U(r):{},s={};return n.forEach((function(e){var n=function(n,s){a||(s||X(n)?(t.cancel(),t(n,s)):(i[e]=n,++o===r&&(a=!0,t(i))))};n.cancel=j,s[e]=n})),t.cancel=function(){a||(a=!0,n.forEach((function(e){return s[e].cancel()})))},s}function Q(e){return{name:e.name||"anonymous",location:J(e)}}function J(e){return e[E]}function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function te(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,a=0,o=0,i=function(t){n[a]=t,a=(a+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r<e)i(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[a]=s,o=a=(a+1)%e;break;case 4:c=2*e,n=l(),r=n.length,a=n.length,o=0,n.length=c,e=c,i(s)}},take:s,flush:l}}var ne=function(e){return te(e,4)},re="TAKE",ae="PUT",oe="CALL",ie="FORK",se="CANCEL",le=function(e,t){var n;return(n={})[m]=!0,n.combinator=!1,n.type=e,n.payload=t,n};function ce(e,t){return void 0===e&&(e="*"),O(e)?(x(t)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),le(re,{pattern:e})):I(n=e)&&n[g]&&x(t)&&O(t)?le(re,{channel:e,pattern:t}):I(e)?(x(t)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),le(re,{channel:e})):void 0;var n}function ue(e,t){return S(t)&&(t=e,e=void 0),le(ae,{channel:e,action:t})}function pe(e,t){var n,r=null;return C(e)?n=e:(M(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&T(n)&&C(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function de(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return le(oe,pe(e,n))}function fe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return le(ie,pe(e,n))}function he(e){return void 0===e&&(e=b),le(se,e)}var me=de.bind(null,L),ve=function(e){return{done:!0,value:e}},ge={};function ye(e){return I(e)?"channel":N(e)?String(e):C(e)?e.name:String(e)}function be(e,t,n){var r,a,o,i=t;function s(t,n){if(i===ge)return ve(t);if(n&&!a)throw i=ge,n;r&&r(t);var s=n?e[a](n):e[i]();return i=s.nextState,o=s.effect,r=s.stateUpdater,a=s.errorState,i===ge?ve(t):o}return V(s,(function(e){return s(null,e)}),n)}function we(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o,i,s={done:!1,value:ce(e)},l=function(e){return{done:!1,value:fe.apply(void 0,[t].concat(r,[e]))}},c=function(e){return{done:!1,value:he(e)}},u=function(e){return o=e},p=function(e){return i=e};return be({q1:function(){return{nextState:"q2",effect:s,stateUpdater:p}},q2:function(){return o?{nextState:"q3",effect:c(o)}:{nextState:"q1",effect:l(i),stateUpdater:u}},q3:function(){return{nextState:"q1",effect:l(i),stateUpdater:u}}},"q1","takeLatest("+ye(e)+", "+t.name+")")}function ke(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return fe.apply(void 0,[we,e,t].concat(r))}var _e=n(3366);function Ee(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}const Se=Ee;var xe=[],Ce=0;function Te(e){try{Ae(),e()}finally{Oe()}}function Me(e){xe.push(e),Ce||(Ae(),Ie())}function Pe(e){try{return Ae(),e()}finally{Ie()}}function Ae(){Ce++}function Oe(){Ce--}function Ie(){var e;for(Oe();!Ce&&void 0!==(e=xe.shift());)Te(e)}var Ne=function(e){return function(t){return e.some((function(e){return je(e)(t)}))}},ze=function(e){return function(t){return e(t)}},De=function(e){return function(t){return t.type===String(e)}},Le=function(e){return function(t){return t.type===e}},Re=function(){return R};function je(e){var t="*"===e?Re:T(e)?De:M(e)?Ne:N(e)?De:C(e)?ze:z(e)?Le:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var Be={type:h},Fe=function(e){return e&&e.type===h};function $e(e){void 0===e&&(e=ne());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(Be):e.isEmpty()?(n.push(r),r.cancel=function(){$(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(Be):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,a=e.length;r<a;r++){(0,e[r])(Be)}}}}}function He(){var e,t,n,r,a,o,i=(t=!1,r=n=[],a=function(){r===n&&(r=n.slice())},o=function(){t=!0;var e=n=r;r=[],e.forEach((function(e){e(Be)}))},(e={})[g]=!0,e.put=function(e){if(!t)if(Fe(e))o();else for(var a=n=r,i=0,s=a.length;i<s;i++){var l=a[i];l[v](e)&&(l.cancel(),l(e))}},e.take=function(e,n){var o,i;void 0===n&&(n=Re),t?e(Be):(e[v]=n,a(),r.push(e),e.cancel=(o=function(){a(),$(r,e)},i=!1,function(){i||(i=!0,o())}))},e.close=o,e),s=i.put;return i.put=function(e){e[y]?s(e):Me((function(){s(e)}))},i}function qe(e,t){var n=e[f];C(n)&&(t.cancel=n),e.then(t,(function(e){t(e,!0)}))}var Ve,Ze=0,Ue=function(){return++Ze};function Ge(e){e.isRunning()&&e.cancel()}var We=((Ve={}).TAKE=function(e,t,n){var r=t.channel,a=void 0===r?e.channel:r,o=t.pattern,i=t.maybe,s=function(e){e instanceof Error?n(e,!0):!Fe(e)||i?n(e):n(_)};try{a.take(s,x(o)?je(o):null)}catch(l){return void n(l,!0)}n.cancel=s.cancel},Ve.PUT=function(e,t,n){var r=t.channel,a=t.action,o=t.resolve;Me((function(){var t;try{t=(r?r.put:e.dispatch)(a)}catch(i){return void n(i,!0)}o&&P(t)?qe(t,n):n(t)}))},Ve.ALL=function(e,t,n,r){var a=r.digestEffect,o=Ze,i=Object.keys(t);if(0!==i.length){var s=K(t,n);i.forEach((function(e){a(t[e],o,s[e],e)}))}else n(M(t)?[]:{})},Ve.RACE=function(e,t,n,r){var a=r.digestEffect,o=Ze,i=Object.keys(t),s=M(t)?U(i.length):{},l={},c=!1;i.forEach((function(e){var t=function(t,r){c||(r||X(t)?(n.cancel(),n(t,r)):(n.cancel(),c=!0,s[e]=t,n(s)))};t.cancel=j,l[e]=t})),n.cancel=function(){c||(c=!0,i.forEach((function(e){return l[e].cancel()})))},i.forEach((function(e){c||a(t[e],o,l[e],e)}))},Ve.CALL=function(e,t,n,r){var a=t.context,o=t.fn,i=t.args,s=r.task;try{var l=o.apply(a,i);if(P(l))return void qe(l,n);if(A(l))return void at(e,l,s.context,Ze,Q(o),!1,n);n(l)}catch(c){n(c,!0)}},Ve.CPS=function(e,t,n){var r=t.context,a=t.fn,o=t.args;try{var i=function(e,t){S(e)?n(t):n(e,!0)};a.apply(r,o.concat(i)),i.cancel&&(n.cancel=i.cancel)}catch(s){n(s,!0)}},Ve.FORK=function(e,t,n,r){var a=t.context,o=t.fn,i=t.args,s=t.detached,l=r.task,c=function(e){var t=e.context,n=e.fn,r=e.args;try{var a=n.apply(t,r);if(A(a))return a;var o=!1;return V((function(e){return o?{value:e,done:!0}:(o=!0,{value:a,done:!P(a)})}))}catch(i){return V((function(){throw i}))}}({context:a,fn:o,args:i}),u=function(e,t){return e.isSagaIterator?{name:e.meta.name}:Q(t)}(c,o);Pe((function(){var t=at(e,c,l.context,Ze,u,s,void 0);s?n(t):t.isRunning()?(l.queue.addTask(t),n(t)):t.isAborted()?l.queue.abort(t.error()):n(t)}))},Ve.JOIN=function(e,t,n,r){var a=r.task,o=function(e,t){if(e.isRunning()){var n={task:a,cb:t};t.cancel=function(){e.isRunning()&&$(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(M(t)){if(0===t.length)return void n([]);var i=K(t,n);t.forEach((function(e,t){o(e,i[t])}))}else o(t,n)},Ve.CANCEL=function(e,t,n,r){var a=r.task;t===b?Ge(a):M(t)?t.forEach(Ge):Ge(t),n()},Ve.SELECT=function(e,t,n){var r=t.selector,a=t.args;try{n(r.apply(void 0,[e.getState()].concat(a)))}catch(o){n(o,!0)}},Ve.ACTION_CHANNEL=function(e,t,n){var r=t.pattern,a=$e(t.buffer),o=je(r),i=function t(n){Fe(n)||e.channel.take(t,o),a.put(n)},s=a.close;a.close=function(){i.cancel(),s()},e.channel.take(i,o),n(a)},Ve.CANCELLED=function(e,t,n,r){n(r.task.isCancelled())},Ve.FLUSH=function(e,t,n){t.flush(n)},Ve.GET_CONTEXT=function(e,t,n,r){n(r.task.context[t])},Ve.SET_CONTEXT=function(e,t,n,r){var a=r.task;F(a.context,t),n()},Ve);function Ye(e,t){return e+"?"+t}function Xe(e){var t=e.name,n=e.location;return n?t+" "+Ye(n.fileName,n.lineNumber):t}function Ke(e){var t,n,r,a=(t=function(e){return e.cancelledTasks},n=e,(r=[]).concat.apply(r,n.map(t)));return a.length?["Tasks cancelled due to error:"].concat(a).join("\n"):""}var Qe=null,Je=[],et=function(e){e.crashedEffect=Qe,Je.push(e)},tt=function(){Qe=null,Je.length=0},nt=function(){var e=Je[0],t=Je.slice(1),n=e.crashedEffect?function(e){var t=J(e);return t?t.code+" "+Ye(t.fileName,t.lineNumber):""}(e.crashedEffect):null;return["The above error occurred in task "+Xe(e.meta)+(n?" \n when executing effect "+n:"")].concat(t.map((function(e){return" created by "+Xe(e.meta)})),[Ke(Je)]).join("\n")};function rt(e,t,n,r,a,o,i){var s;void 0===i&&(i=j);var l,c,u=0,p=null,d=[],f=Object.create(n),h=function(e,t,n){var r,a=[],o=!1;function i(e){t(),l(),n(e,!0)}function s(t){a.push(t),t.cont=function(s,l){o||($(a,t),t.cont=j,l?i(s):(t===e&&(r=s),a.length||(o=!0,n(r))))}}function l(){o||(o=!0,a.forEach((function(e){e.cont=j,e.cancel()})),a=[])}return s(e),{addTask:s,cancelAll:l,abort:i,getTasks:function(){return a}}}(t,(function(){d.push.apply(d,h.getTasks().map((function(e){return e.meta.name})))}),m);function m(t,n){if(n){if(u=2,et({meta:a,cancelledTasks:d}),v.isRoot){var r=nt();tt(),e.onError(t,{sagaStack:r})}c=t,p&&p.reject(t)}else t===k?u=1:1!==u&&(u=3),l=t,p&&p.resolve(t);v.cont(t,n),v.joiners.forEach((function(e){e.cb(t,n)})),v.joiners=null}var v=((s={})[w]=!0,s.id=r,s.meta=a,s.isRoot=o,s.context=f,s.joiners=[],s.queue=h,s.cancel=function(){0===u&&(u=1,h.cancelAll(),m(k,!1))},s.cont=i,s.end=m,s.setContext=function(e){F(f,e)},s.toPromise=function(){return p||(p=Se(),2===u?p.reject(c):0!==u&&p.resolve(l)),p.promise},s.isRunning=function(){return 0===u},s.isCancelled=function(){return 1===u||0===u&&1===t.status},s.isAborted=function(){return 2===u},s.result=function(){return l},s.error=function(){return c},s);return v}function at(e,t,n,r,a,o,i){var s=e.finalizeRunEffect((function(t,n,r){if(P(t))qe(t,r);else if(A(t))at(e,t,c.context,n,a,!1,r);else if(t&&t[m]){(0,We[t.type])(e,t.payload,r,u)}else r(t)}));p.cancel=j;var l={meta:a,cancel:function(){0===l.status&&(l.status=1,p(k))},status:0},c=rt(e,l,n,r,a,o,i),u={task:c,digestEffect:d};return i&&(i.cancel=c.cancel),p(),c;function p(e,n){try{var a;n?(a=t.throw(e),tt()):Y(e)?(l.status=1,p.cancel(),a=C(t.return)?t.return(k):{done:!0,value:k}):a=W(e)?C(t.return)?t.return():{done:!0}:t.next(e),a.done?(1!==l.status&&(l.status=3),l.cont(a.value)):d(a.value,r,p)}catch(o){if(1===l.status)throw o;l.status=2,l.cont(o,!0)}}function d(t,n,r,a){void 0===a&&(a="");var o,i=Ue();function l(n,a){o||(o=!0,r.cancel=j,e.sagaMonitor&&(a?e.sagaMonitor.effectRejected(i,n):e.sagaMonitor.effectResolved(i,n)),a&&function(e){Qe=e}(t),r(n,a))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:i,parentEffectId:n,label:a,effect:t}),l.cancel=j,r.cancel=function(){o||(o=!0,l.cancel(),l.cancel=j,e.sagaMonitor&&e.sagaMonitor.effectCancelled(i))},s(t,i,l)}}function ot(e,t){var n=e.channel,r=void 0===n?He():n,a=e.dispatch,o=e.getState,i=e.context,s=void 0===i?{}:i,l=e.sagaMonitor,c=e.effectMiddlewares,u=e.onError,p=void 0===u?Z:u;for(var d=arguments.length,f=new Array(d>2?d-2:0),h=2;h<d;h++)f[h-2]=arguments[h];var m=t.apply(void 0,f);var v,g=Ue();if(l&&(l.rootSagaStarted=l.rootSagaStarted||j,l.effectTriggered=l.effectTriggered||j,l.effectResolved=l.effectResolved||j,l.effectRejected=l.effectRejected||j,l.effectCancelled=l.effectCancelled||j,l.actionDispatched=l.actionDispatched||j,l.rootSagaStarted({effectId:g,saga:t,args:f})),c){var y=ee.apply(void 0,c);v=function(e){return function(t,n,r){return y((function(t){return e(t,n,r)}))(t)}}}else v=B;var b={channel:r,dispatch:G(a),getState:o,sagaMonitor:l,onError:p,finalizeRunEffect:v};return Pe((function(){var e=at(b,m,s,g,Q(t),!0,void 0);return l&&l.effectResolved(g,e),e}))}const it=function(e){var t,n=void 0===e?{}:e,r=n.context,a=void 0===r?{}:r,o=n.channel,i=void 0===o?He():o,s=n.sagaMonitor,l=(0,_e.Z)(n,["context","channel","sagaMonitor"]);function c(e){var n=e.getState,r=e.dispatch;return t=ot.bind(null,(0,D.Z)({},l,{context:a,channel:i,dispatch:r,getState:n,sagaMonitor:s})),function(e){return function(t){s&&s.actionDispatched&&s.actionDispatched(t);var n=e(t);return i.put(t),n}}}return c.run=function(){return t.apply(void 0,arguments)},c.setContext=function(e){F(a,e)},c},st=it;var lt=n(2819),ct=n(9818),ut=n(6989),pt=n.n(ut),dt=n(6483),ft=n(3357),ht=n(1030),mt=regeneratorRuntime.mark(Ct),vt=ft.u2,gt="newspack-blocks/".concat(vt),yt={postsByBlock:{},errorsByBlock:{}},bt={reflow:function(){_t.dispatch({type:"REFLOW"})}},wt={getPosts:function(e){var t=e.clientId;return _t.getState().postsByBlock[t]},getError:function(e){var t=e.clientId;return _t.getState().errorsByBlock[t]},isUIDisabled:function(){return _t.getState().isUIDisabled}},kt=st(),_t=u((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DISABLE_UI":return(0,lt.set)(e,"isUIDisabled",!0);case"ENABLE_UI":return(0,lt.set)(e,"isUIDisabled",!1);case"UPDATE_BLOCK_POSTS":return(0,lt.set)(e,["postsByBlock",t.clientId],t.posts);case"UPDATE_BLOCK_ERROR":return(0,lt.set)(e,["errorsByBlock",t.clientId],t.error)}return e}),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(o(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=p.apply(void 0,s)(n.dispatch),(0,a.Z)((0,a.Z)({},n),{},{dispatch:r})}}}(kt)),Et=(0,a.Z)({getSelectors:function(){return wt},getActions:function(){return bt}},_t),St={},xt=JSON.stringify;function Ct(e){var t,n,r,o,i;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=xt(e.postsQuery),n=window.newspack_blocks_data.posts_rest_url,void 0!==(r=St[t])){s.next=9;break}return o=(0,dt.addQueryArgs)(n,(0,a.Z)((0,a.Z)({},e.postsQuery),{},{context:"edit"})),s.next=7,de(pt(),{url:o});case 7:r=s.sent,St[t]=r;case 9:return i=r.map((function(e){return e.id})),s.next=12,ue({type:"UPDATE_BLOCK_POSTS",clientId:e.clientId,posts:r});case 12:return s.abrupt("return",i);case 13:case"end":return s.stop()}}),mt)}function Tt(e){var t,n=(0,(0,ct.select)("core/block-editor").getBlock)(e);return null==n||null===(t=n.attributes)||void 0===t?void 0:t.deduplicate}var Mt=function(e){(0,ct.register)({name:gt,instantiate:function(){return Et}}),kt.run(function(e){var t=regeneratorRuntime.mark(n);function n(){var n,o,i,s,l,c,u,p,d,f,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,me(300);case 2:return n=(0,ct.select)("core/block-editor"),o=n.getBlocks,i=(0,ct.select)("core/editor"),s=i.getCurrentPostId,t.next=6,ue({type:"DISABLE_UI"});case 6:l=o().map((function(e){var t=(0,ct.select)("core/block-editor").getBlocks(e.clientId);return(0,a.Z)((0,a.Z)({},e),{},{innerBlocks:t})})),c=(0,ht.Pi)(l,e),u=c.reduce((function(e,t){var n=t.clientId,a=t.postsQuery;return Tt(n)&&a.include&&(e=[].concat((0,r.Z)(e),(0,r.Z)(a.include))),e}),[]),p=(0,ht.Oi)([].concat((0,r.Z)(u),[s()]));case 10:if(!c.length){t.next=28;break}return d=c.shift(),(f=Tt(d.clientId))&&(d.postsQuery.exclude=p),h=[],t.prev=15,t.next=18,de(Ct,d);case 18:h=t.sent,t.next=25;break;case 21:return t.prev=21,t.t0=t.catch(15),t.next=25,ue({type:"UPDATE_BLOCK_ERROR",clientId:d.clientId,error:t.t0.message});case 25:f&&(p=[].concat((0,r.Z)(p),(0,r.Z)(h))),t.next=10;break;case 28:return t.next=30,ue({type:"ENABLE_UI"});case 30:case"end":return t.stop()}}),t,null,[[15,21]])}return regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ke("REFLOW",n);case 2:case"end":return e.stop()}}),e)}))}(e))}},1030:(e,t,n)=>{"use strict";n.d(t,{pM:()=>i,Ou:()=>l,Oi:()=>c,Pi:()=>u,b9:()=>m,eL:()=>v});var r=n(2819),a=n(5736),o=n(1176),__=a.__,i=function(){return"object"==typeof window&&window.wpcomGutenberg&&-1===Number(window.wpcomGutenberg.blogPublic)},s=["postsToShow","authors","categories","includeSubcategories","excerptLength","tags","customTaxonomies","showExcerpt","specificPosts","specificMode","tagExclusions","categoryExclusions","customTaxonomyExclusions","postType","includedPostStatuses","deduplicate"],l=function(e,t){return!(0,r.isEqual)((0,r.pick)(e.attributes,s),(0,r.pick)(t.attributes,s))||!(0,r.isEqual)(e.topBlocksClientIdsInOrder,t.topBlocksClientIdsInOrder)},c=function(e){return e.map((function(e){return parseInt(e)})).filter((function(e){return e>0}))},u=function e(t,n){return t.flatMap((function(t){var a,o,i,l,u,p,d,f,h,m,v,g,y,b,w,k,_,E,S,x,C,T=[];if(n.indexOf(t.name)>=0){var M=(a=t.attributes,o=(0,r.pick)(a,s),i=o.postsToShow,l=o.authors,u=o.categories,p=o.includeSubcategories,d=o.excerptLength,f=o.postType,h=o.showExcerpt,m=o.tags,v=o.customTaxonomies,g=o.specificPosts,y=void 0===g?[]:g,b=o.specificMode,w=o.tagExclusions,k=o.categoryExclusions,_=o.customTaxonomyExclusions,E=o.includedPostStatuses,S=c(y),x=b&&S&&S.length,(C=(0,r.pickBy)(x?{include:S,postsToShow:y.length,postType:f}:{postsToShow:i,categories:u,includeSubcategories:p,authors:l,tags:m,tagExclusions:w,categoryExclusions:k,customTaxonomyExclusions:_,customTaxonomies:v,postType:f,includedPostStatuses:E},(function(e){return!(0,r.isUndefined)(e)}))).excerptLength=d,C.showExcerpt=h,C);T.push({postsQuery:M,clientId:t.clientId})}return T.concat(e(t.innerBlocks,n))}))},p=function e(t){return t.flatMap((function(t){var n=[];return n.push(t.clientId),n.concat(e(t.innerBlocks))}))},d=window.newspack_blocks_data.assets_path,f=function(e){var t=new Date;return t.setHours(12,0,0,0),{author:1,content:{rendered:"<p>"+__("The post content.","newspack-blocks")+"</p>"},date_gmt:t.toISOString(),excerpt:{rendered:"<p>"+__("The post excerpt.","newspack-blocks")+"</p>"},featured_media:"1",id:e,meta:{newspack_post_subtitle:__("Post Subtitle","newspack-blocks")},title:{rendered:__("Post Title","newspack-blocks")},newspack_article_classes:"type-post",newspack_author_info:[{display_name:__("Author Name","newspack-blocks"),avatar:'<div style="background: #36f;width: 40px;height: 40px;display: block;overflow: hidden;border-radius: 50%; max-width: 100%; max-height: 100%;"></div>',id:1,author_link:"/"}],newspack_category_info:__("Category","newspack-blocks"),newspack_featured_image_caption:__("Featured image caption","newspack-blocks"),newspack_featured_image_src:{large:"".concat(d,"/newspack-1024x536.jpg"),landscape:"".concat(d,"/newspack-800x600.jpg"),portrait:"".concat(d,"/newspack-600x800.jpg"),square:"".concat(d,"/newspack-800x800.jpg"),uncropped:"".concat(d,"/newspack-1024x536.jpg")},newspack_has_custom_excerpt:!1,newspack_post_sponsors:!1}},h=function(e){return(0,r.times)(e.postsToShow,f)},m=function(e,t){var n=t.clientId,r=t.attributes,a=(0,e("core/editor").getEditedPostAttribute)("blocks")||[],i=e("core/block-editor").getBlocks,s=p(a),l=i(),c=l.some((function(e){return"core/widget-area"===e.name})),u=0===s.length||s.indexOf(n)>=0||c,d=e(o.$),f=d.getPosts,m=d.getError;return{isEditorBlock:u,isUIDisabled:(0,d.isUIDisabled)(),error:m({clientId:n}),topBlocksClientIdsInOrder:l.map((function(e){return e.clientId})),latestPosts:u?f({clientId:n}):h(r)}},v=function(e,t){return{triggerReflow:t.isEditorBlock?e(o.$).reflow:function(){}}}},92:(e,t,n)=>{"use strict";var r=n(4981),a=n(9307),o=n(5609),i=n(5736),s=n(5861),l=n(885),c=n(2175),u=n(1984),p=n(6989),d=n.n(p),f=n(444);const h=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(f.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));var m,v=n(3967),g=n.n(v),__=i.__,y=(null===(m=window.newspack_blocks_data)||void 0===m?void 0:m.iframe_accepted_file_mimes)||[],b=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,i=e.onClose;return(0,a.createElement)(c.URLPopover,{onClose:i},(0,a.createElement)("form",{className:"wp-block-newspack-blocks-iframe__url-input-form",onSubmit:r},(0,a.createElement)("input",{className:"wp-block-newspack-blocks-iframe__url-input-form__url-input-field",type:"url","aria-label":__("URL"),placeholder:__("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(o.Button,{className:"wp-block-newspack-blocks-iframe__url-input-form__url-input-submit-button",icon:h,label:__("Apply"),type:"submit"})))};const w=function(e){var t=e.icon,n=e.label,r=e.src,i=e.onSelectURL,s=e.onSelectMedia,u=e.isUploadingArchive,p=e.archiveFolder,d=e.uploadIframeArchive,f=e.error,h=(0,a.useState)(!1),m=(0,l.Z)(h,2),v=m[0],w=m[1],k=(0,a.useState)(r),_=(0,l.Z)(k,2),E=_[0],S=_[1],x=function(e){S(e.target.value)},C=function(){w(!0)},T=function(){w(!1)},M=function(e){e.preventDefault(),E&&i&&(i(E),T())},P=function(e){s(e.id)};return(0,a.createElement)(o.Placeholder,{icon:(0,a.createElement)(c.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-newspack-blocks-iframe",instructions:__("Upload an asset folder (.zip), a document (PDF, Word, Excel sheet, or a PPT), pick one from your media library, or add one with a URL.","newspack-blocks")},f&&(0,a.createElement)(o.Notice,{status:"error",className:"wp-block-newspack-blocks-iframe-notice",isDismissible:!1},f),(0,a.createElement)("div",null,u?(0,a.createElement)(o.Spinner,null):(0,a.createElement)(o.FormFileUpload,{accept:y.join(","),onChange:function(e){var t=e.target.files;0<t.length&&d(t.item(0))},multiple:!1,render:function(e){var t,n,r=e.openFileDialog;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.Button,{isPrimary:!0,className:g()("wp-block-newspack-blocks-iframe__button","wp-block-newspack-blocks-iframe__upload-button"),onClick:r},__(p?"Update":"Upload","newspack-blocks")),(n=P,(0,a.createElement)(c.MediaUpload,{onSelect:n,allowedTypes:y,render:function(e){var t=e.open;return(0,a.createElement)(o.Button,{variant:"tertiary",onClick:t},__("Media Library","newspack-blocks"))}})),(t=""!==p,i&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-iframe__url-input-container"},(0,a.createElement)(o.Button,{isTertiary:!0,onClick:C,isPressed:v,variant:"tertiary"},__(t?"Update from URL":"Embed from URL","newspack-blocks")),v&&(0,a.createElement)(b,{src:E,onChange:x,onSubmit:M,onClose:T}))))}})))};var k=(0,a.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})),_=i.__,E=(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},(0,a.createElement)(o.Path,{d:"M12 18.8c-4.8 0-8.5-6.1-8.6-6.4l-.3-.4.2-.4c.2-.3 3.9-6.4 8.6-6.4 4.7 0 8.5 6.1 8.6 6.4l.2.4-.2.4c0 .2-3.7 6.4-8.5 6.4zM4.9 12c.9 1.3 3.8 5.2 7.1 5.2s6.3-4 7.1-5.2c-.9-1.3-3.8-5.3-7.1-5.3-3.3.1-6.3 4-7.1 5.3z"}),(0,a.createElement)(o.Path,{d:"M15 11.2c-.3.5-.8.8-1.4.8-.9 0-1.6-.7-1.6-1.6 0-.5.3-1 .7-1.3-.2 0-.5-.1-.7-.1-1.7 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.7 0 3.2-1.4 3.2-3.2 0-.3-.1-.7-.2-1z"}));const S=function(e){var t=e.attributes,n=e.setAttributes,r=_("Iframe","block title"),i=t.mode,p=t.src,f=t.archiveFolder,h=t.isFullScreen,m=t.height,v=t.width,g=(0,a.useState)(!0),y=(0,l.Z)(g,2),b=y[0],S=y[1],x=(0,a.useState)(),C=(0,l.Z)(x,2),T=C[0],M=C[1],P=(0,a.useState)(),A=(0,l.Z)(P,2),O=A[0],I=A[1],N=[{value:"px",label:"px"},{value:"%",label:"%"},{value:"em",label:"em"}],z=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),M(!0),e.prev=2,(r=new FormData).append("iframe_url",t),e.next=7,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-mode-from-url",method:"POST",body:r});case 7:a=e.sent,o=a.mode,n({mode:o,src:t}),S(!0),f&&R(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),I(e.t0.message||_("An error occured when uploading the iframe archive.","newspack-blocks"));case 17:M(!1);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(_x){return e.apply(this,arguments)}}(),D=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,o,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),M(!0),e.prev=2,(r=new FormData).append("archive_folder",f),r.append("iframe_file",t),e.next=8,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-archive",method:"POST",body:r});case 8:a=e.sent,o=a.src,i=a.dir,s=a.mode,n({mode:s,src:o,archiveFolder:i}),S(!0),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),I(e.t0.message||_("An error occured when uploading the iframe archive.","newspack-blocks"));case 19:M(!1);case 20:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){var r,a,o,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(null),M(!0),e.prev=2,(r=new FormData).append("media_id",t),e.next=7,d()({path:"/newspack-blocks/v1/newspack-blocks-iframe-archive-from-media",method:"POST",body:r});case 7:a=e.sent,o=a.src,i=a.dir,s=a.mode,n({mode:s,src:o,archiveFolder:i}),S(!0),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),I(e.t0.message||_("An error occured when setting the iframe from the archive media.","newspack-blocks"));case 18:M(!1);case 19:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){p&&f&&!p.includes(f)&&d()({path:"/newspack-blocks/v1/newspack-blocks-remove-iframe-archive",method:"DELETE",body:JSON.stringify({archive_folder:f})})},j=[{icon:(0,a.createElement)(u.Z,{icon:E}),title:_(b?"Hide iframe preview":"Show iframe preview","newspack-blocks"),onClick:function(){return S(!b)},isActive:b}];return(0,a.createElement)(a.Fragment,null,h&&(0,a.createElement)(o.Notice,{status:"warning",className:"wp-block-newspack-blocks-iframe-notice",isDismissible:!1},_("This block will take over the page content.","newspack-blocks")),p&&b?(0,a.createElement)("div",{className:"iframe-container"},(0,a.createElement)(o.FocusableIframe,{title:_("Newspack embedded iframe","newspack-blocks"),src:"document"===i?"https://docs.google.com/gview?embedded=true&url=".concat(encodeURIComponent(p)):p,style:{width:h?"100vw":v,height:h?"100vh":m,"max-width":"100%","max-height":"100%"}})):(0,a.createElement)(w,{icon:k,label:r,src:p,onSelectURL:z,onSelectMedia:L,isUploadingArchive:T,archiveFolder:f,uploadIframeArchive:D,error:O}),(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(o.Toolbar,{controls:p&&j})),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(o.PanelBody,{title:_("Iframe Settings","newspack-blocks"),initialOpen:!0},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.ToggleControl,{label:_("Fullscreen","newspack-blocks"),help:_("If enabled, the iframe will be full screen and hide all the post content.","newspack-blocks"),checked:h,onChange:function(e){return n({isFullScreen:e})},required:!0}),!h&&(0,a.createElement)("div",{className:"wp-block-newspack-blocks-iframe__unit-control"},(0,a.createElement)(o.__experimentalUnitControl,{label:_("Width","newspack-blocks"),onChange:function(e){return n({width:e})},value:v,units:N}),(0,a.createElement)(o.__experimentalUnitControl,{label:_("Height","newspack-blocks"),onChange:function(e){return n({height:e})},value:m,units:N}))))))},x=JSON.parse('{"u2":"iframe","W3":"newspack","Y4":{"className":{"type":"string","default":""},"src":{"type":"string","default":""},"archiveFolder":{"type":"string","default":""},"height":{"type":"string","default":"600px"},"width":{"type":"string","default":"100%"},"isFullScreen":{"type":"boolean","default":false},"mode":{"type":"string","default":"iframe"}}}');var C=i.__,T=x.u2,M=x.Y4,P=x.W3,A={title:C("Iframe","newspack-blocks"),icon:{src:k,foreground:"#36f"},category:P,keywords:[C("iframe","newspack-blocks"),C("project iframe","newspack-blocks")],description:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,C("Embed an iframe.","newspack-blocks")),(0,a.createElement)(o.ExternalLink,{href:"https://help.newspack.com/publishing-and-appearance/blocks/iframe-block/"},C("Support reference","newspack-blocks"))),attributes:M,supports:{html:!1,align:["wide","full"]},edit:S,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat(T),A)},9133:(e,t,n)=>{"use strict";n.d(t,{m:()=>u});var r,a=n(4942),o=n(9062),i=n(9307),s=n(5609),l=n(5736),__=l.__,c=(null===(r=window.newspack_blocks_data)||void 0===r?void 0:r.author_custom_fields)||[],u=function(e){var t=e.attributes,n=e.setAttributes,r=[{name:"Bio",label:__("Biographical info","newspack-blocks")},{name:"Social",label:__("Social links","newspack-blocks")},{name:"Email",label:__("Email address","newspack-blocks")},{name:"ArchiveLink",label:__("Link to author archive","newspack-blocks")}].concat((0,o.Z)(c));return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,__("Display the following fields:","newspack-blocks")),r.map((function(e){var r="show".concat(e.name);return(0,i.createElement)(s.ToggleControl,{key:e.name,label:e.label,checked:Boolean(t[r]),onChange:function(){return n((0,a.Z)({},r,!t[r]))}})})))}},1378:(e,t,n)=>{"use strict";n.r(t);var r=n(4981),a=n(9307),o=n(5609),i=n(5736),s=n(5048),l=n(3144),c=n(7326),u=n(136),p=n(8347),d=n(4942),f=n(6989),h=n.n(f),m=n(2175),v=n(6483),g=n(2629),y=n(9429),__=i.__;const b=function(e){(0,u.Z)(n,e);var t=(0,p.Z)(n);function n(e){var r;return(0,s.Z)(this,n),r=t.call(this,e),(0,d.Z)((0,c.Z)(r),"fetchCategorySuggestions",(function(e){return h()({path:(0,v.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,d.Z)((0,c.Z)(r),"fetchSavedCategories",(function(e){return h()({path:(0,v.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,g.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),r.state={isLoading:!1,error:"",embed:"",interactive:!1},r}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.refreshPreview()}},{key:"componentDidUpdate",value:function(e){var t=this.props.attributes,n=t.categories,r=t.videosToShow,a=e.attributes,o=a.categories,i=a.videosToShow;n===o&&r===i||this.refreshPreview()}},{key:"refreshPreview",value:function(){var e=this,t=this.props.attributes,n=t.categories,r=t.videosToShow,a=(0,v.addQueryArgs)("/newspack-blocks/v1/video-playlist",{categories:n,videosToShow:r});this.setState({isLoading:!0},(function(){h()({path:a}).then((function(t){var n=t.html;e.setState({embed:n,isLoading:!1})})).catch((function(t){e.setState({isLoading:!1,error:t.message})}))}))}},{key:"renderPlaceholder",value:function(){var e=this.state,t=e.isLoading,n=e.error,r=e.embed;return t?(0,a.createElement)(o.Placeholder,{icon:(0,a.createElement)(o.Spinner,null),className:"component-placeholder__align-center"}):n.length?(0,a.createElement)(o.Placeholder,{icon:"warning",label:__("Error","newspack-blocks"),instructions:n}):r.length?null:(0,a.createElement)(o.Placeholder,{icon:"warning",label:__("Error","newspack-blocks"),instructions:__("No videos found","newspack-blocks")})}},{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,i=n.categories,s=n.videosToShow,l=this.state,c=l.embed,u=l.isLoading,p=l.interactive;return(0,a.createElement)(a.Fragment,null,(u||""===c)&&this.renderPlaceholder(),!(u||""===c)&&(0,a.createElement)("div",{className:"wpbnbvp-preview"},(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:c}}),!p&&(0,a.createElement)("div",{className:"wpbnbvp__overlay",onMouseUp:function(){return e.hideOverlay()}})),(0,a.createElement)(m.InspectorControls,null,(0,a.createElement)(o.PanelBody,{title:__("Settings","newspack-blocks"),initialOpen:!0},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.RangeControl,{className:"videosToShow",label:__("Videos","newspack-blocks"),help:__("The maximum number of videos to pull from posts.","newspack-blocks"),value:s,onChange:function(e){return r({videosToShow:e})},min:1,max:30,required:!0}),(0,a.createElement)(y.Z,{key:"categories",tokens:i||[],onChange:function(e){return r({categories:e})},fetchSuggestions:this.fetchCategorySuggestions,fetchSavedInfo:this.fetchSavedCategories,label:__("Categories","newspack-blocks")})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),n}(a.Component);var w=i.__,k={title:w("YouTube Video Playlist","newspack-blocks"),icon:{src:(0,a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(o.Path,{d:"M13 10.5L8.833 8v5z"}),(0,a.createElement)(o.Path,{clipRule:"evenodd",d:"M4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.272 3.728 18 4.625 18h11.75c.897 0 1.625-.728 1.625-1.625V4.625C18 3.728 17.272 3 16.375 3zm11.75 1.5H4.625a.125.125 0 00-.125.125v11.75c0 .069.056.125.125.125h11.75a.125.125 0 00.125-.125V4.625a.125.125 0 00-.125-.125z",fillRule:"evenodd"}),(0,a.createElement)(o.Path,{d:"M20.25 8v11c0 .69-.56 1.25-1.249 1.25H6v1.5h13.001A2.749 2.749 0 0021.75 19V8z"})),foreground:"#36f"},category:"newspack",keywords:[w("video","newspack-blocks"),w("playlist","newspack-blocks"),w("youtube","newspack-blocks")],description:w("Embed a playlist of latest YouTube videos.","newspack-blocks"),attributes:{className:{type:"string"},categories:{type:"array",default:[]},videosToShow:{type:"integer",default:5}},supports:{html:!1,align:!0},edit:b,save:function(){return null}};(0,r.registerBlockType)("newspack-blocks/".concat("youtube-video-playlist"),k)},9429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(9062),a=n(5048),o=n(3144),i=n(7326),s=n(136),l=n(8347),c=n(4942),u=n(9307),p=n(2819),d=n(5609);const f=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(e){var r;return(0,a.Z)(this,n),r=t.call(this,e),(0,c.Z)((0,i.Z)(r),"isFetchingInfoOnLoad",(function(){var e=r.props,t=e.tokens,n=e.fetchSavedInfo;return Boolean(t.length&&n)})),r.state={suggestions:[],validValues:{},loading:r.isFetchingInfoOnLoad()},r.debouncedUpdateSuggestions=(0,p.debounce)(r.updateSuggestions,500),r}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.isFetchingInfoOnLoad()){var t=this.props,n=t.tokens;(0,t.fetchSavedInfo)(n).then((function(t){var n=e.state.validValues;t.forEach((function(e){n[e.value]=e.label})),e.setState({validValues:n,loading:!1})}))}}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}},{key:"getLabelsForValues",value:function(e){var t=this.state.validValues;return e.reduce((function(e,n){return t[n]?[].concat((0,r.Z)(e),[t[n]]):e}),[])}},{key:"getValuesForLabels",value:function(e){var t=this.state.validValues;return e.map((function(e){return Object.keys(t).find((function(n){return t[n]===e}))}))}},{key:"updateSuggestions",value:function(e){var t=this,n=this.props.fetchSuggestions;n&&this.setState({loading:!0},(function(){var r=n(e);r.then((function(e){if(t.suggestionsRequest===r){var n=t.state.validValues,a=[];e.forEach((function(e){var t=e.label.trim();a.indexOf(t)>=0&&(e.label="".concat(t," (").concat(e.value,")")),a.push(t),n[e.value]=t})),t.setState({suggestions:a,validValues:n,loading:!1})}})).catch((function(){t.suggestionsRequest===r&&t.setState({loading:!1})})),t.suggestionsRequest=r}))}},{key:"handleOnChange",value:function(e){(0,this.props.onChange)(this.getValuesForLabels(e))}},{key:"getTokens",value:function(){var e=this.props.tokens;return this.getLabelsForValues(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.help,r=t.label,a=void 0===r?"":r,o=this.state,i=o.suggestions,s=o.loading;return(0,u.createElement)("div",{className:"autocomplete-tokenfield"},(0,u.createElement)(d.FormTokenField,{value:this.getTokens(),suggestions:i,onChange:function(t){return e.handleOnChange(t)},onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},label:a}),s&&(0,u.createElement)(d.Spinner,null),n&&(0,u.createElement)("p",{className:"autocomplete-tokenfield__help"},n))}}]),n}(u.Component)},96:(e,t,n)=>{"use strict";n.d(t,{L:()=>c,H:()=>u});var r=n(9062),a=n(9307),o=n(5736),i=n(5609),s=n(9818),__=o.__,l=function(e){var t=e.options,n=e.values,o=e.onChange;return Array.isArray(t)?t.map((function(e){var t=e.name,s=e.slug;return(0,a.createElement)(i.PanelRow,{key:s},(0,a.createElement)(i.CheckboxControl,{label:t,checked:n.indexOf(s)>-1,onChange:function(e){var t=(0,r.Z)(new Set(n));e&&-1===t.indexOf(s)?t.push(s):!e&&t.indexOf(s)>-1&&t.splice(t.indexOf(s),1),o(t)}}))})):(0,a.createElement)(i.Spinner,null)},c=function(e){var t=e.attributes,n=e.setAttributes,r=(0,s.useSelect)((function(e){var t;return{availablePostTypes:null===(t=(0,e("core").getPostTypes)({per_page:-1}))||void 0===t?void 0:t.filter((function(e){return e.supports.newspack_blocks}))}})).availablePostTypes;return(0,a.createElement)(i.PanelBody,{title:__("Post Types","newspack-blocks")},(0,a.createElement)(l,{options:r,values:t.postType,onChange:function(e){return n({postType:e})}}))},u=function(e){var t=e.attributes,n=e.setAttributes;return(0,a.createElement)(i.PanelBody,{title:__("Additional Post Statuses","newspack-blocks")},(0,a.createElement)(i.PanelRow,null,(0,a.createElement)("i",null,__("Selection here has effect only for editors, regular users will only see published posts.","newspack-blocks"))),(0,a.createElement)(l,{values:t.includedPostStatuses,options:[{name:"Draft",slug:"draft"},{name:"Scheduled",slug:"future"}],onChange:function(e){return n({includedPostStatuses:e})}}))}},6967:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(9062),a=n(3144),o=n(5048),i=n(7326),s=n(136),l=n(8347),c=n(4942),u=n(9307),p=n(5736),d=n(5609),f=n(6989),h=n.n(f),m=n(6483),v=n(2629),g=n(9429),__=p.__,y=function(e){return(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")},b=function(e){return(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")},w=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(){var e;(0,o.Z)(this,n);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return e=t.call.apply(t,[this].concat(s)),(0,c.Z)((0,i.Z)(e),"state",{showAdvancedFilters:!1}),(0,c.Z)((0,i.Z)(e),"fetchPostSuggestions",(function(t){var n=e.props.postType,r=window.newspack_blocks_data.specific_posts_rest_url;return h()({url:(0,m.addQueryArgs)(r,{search:t,postsToShow:20,_fields:"id,title",type:"post",postType:n})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.title)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchSavedPosts",(function(t){var n=e.props.postType,r=window.newspack_blocks_data.posts_rest_url;return h()({url:(0,m.addQueryArgs)(r,{postsToShow:100,include:t.join(","),_fields:"id,title",postType:n})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.title.rendered)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchAuthorSuggestions",(function(e){var t=window.newspack_blocks_data.authors_rest_url;return h()({url:(0,m.addQueryArgs)(t,{search:e,per_page:20,fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no name)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchSavedAuthors",(function(e){var t=window.newspack_blocks_data.authors_rest_url;return h()({url:(0,m.addQueryArgs)(t,{per_page:100,include:e.join(","),fields:"id,name"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no name)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchCategorySuggestions",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/categories",{search:e,per_page:20,_fields:"id,name,parent",orderby:"count",order:"desc"})}).then((function(e){return Promise.all(e.map((function(e){return e.parent>0?h()({path:(0,m.addQueryArgs)("/wp/v2/categories/".concat(e.parent),{_fields:"name"})}).then((function(t){return{value:e.id,label:"".concat(y(e)," – ").concat(y(t))}})):Promise.resolve({value:e.id,label:y(e)})})))}))})),(0,c.Z)((0,i.Z)(e),"fetchSavedCategories",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/categories",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchTagSuggestions",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/tags",{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchSavedTags",(function(e){return h()({path:(0,m.addQueryArgs)("/wp/v2/tags",{per_page:100,_fields:"id,name",include:e.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"fetchCustomTaxonomiesSuggestions",(function(e,t){return h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e),{search:t,per_page:20,_fields:"id,name,parent",orderby:"count",order:"desc"})}).then((function(t){return Promise.all(t.map((function(t){return t.parent>0?h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e,"/").concat(t.parent),{_fields:"name"})}).then((function(e){return{value:t.id,label:"".concat(b(t)," – ").concat(b(e))}})):Promise.resolve({value:t.id,label:b(t)})})))}))})),(0,c.Z)((0,i.Z)(e),"fetchSavedCustomTaxonomies",(function(e,t){return h()({path:(0,m.addQueryArgs)("/wp/v2/".concat(e),{per_page:100,_fields:"id,name",include:t.join(",")})}).then((function(e){return e.map((function(e){return{value:e.id,label:(0,v.decodeEntities)(e.name)||__("(no title)","newspack-blocks")}}))}))})),(0,c.Z)((0,i.Z)(e),"render",(function(){var t,n=e.props,a=n.specificMode,o=n.onSpecificModeChange,i=n.specificPosts,s=n.onSpecificPostsChange,l=n.authors,c=n.onAuthorsChange,f=n.categories,h=n.onCategoriesChange,m=n.includeSubcategories,v=n.onIncludeSubcategoriesChange,y=n.tags,b=n.onTagsChange,w=n.customTaxonomies,k=n.onCustomTaxonomiesChange,_=n.tagExclusions,E=n.onTagExclusionsChange,S=n.categoryExclusions,x=n.onCategoryExclusionsChange,C=n.customTaxonomyExclusions,T=n.onCustomTaxonomyExclusionsChange,M=n.enableSpecific,P=e.state.showAdvancedFilters,A=null===(t=window.newspack_blocks_data)||void 0===t?void 0:t.custom_taxonomies,O=function(e,t,n,a){var o=e.filter((function(e){return e.slug!==n}));t(o=[].concat((0,r.Z)(o),[{slug:n,terms:a}]))},I=function(e,t){var n=e.find((function(e){return e.slug===t}));return n?n.terms:[]};return(0,u.createElement)(u.Fragment,null,M&&(0,u.createElement)(d.ToggleControl,{checked:a,onChange:o,label:__("Choose Specific Posts","newspack-blocks")}),a?(0,u.createElement)(g.Z,{tokens:i||[],onChange:s,fetchSuggestions:e.fetchPostSuggestions,fetchSavedInfo:e.fetchSavedPosts,label:__("Posts","newspack-blocks"),help:__("Begin typing post title, click autocomplete result to select.","newspack-blocks")}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(d.QueryControls,e.props),c&&(0,u.createElement)(g.Z,{tokens:l||[],onChange:c,fetchSuggestions:e.fetchAuthorSuggestions,fetchSavedInfo:e.fetchSavedAuthors,label:__("Authors","newspack-blocks")}),h&&(0,u.createElement)(g.Z,{tokens:f||[],onChange:h,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:__("Categories","newspack-blocks")}),v&&(0,u.createElement)(d.ToggleControl,{checked:m,onChange:v,label:__("Include subcategories ","newspack-blocks")}),b&&(0,u.createElement)(g.Z,{tokens:y||[],onChange:b,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:__("Tags","newspack-blocks")}),k&&A.map((function(t){return(0,u.createElement)(g.Z,{key:"".concat(w[t.slug],"-selector"),tokens:I(w,t.slug),onChange:function(e){O(w,k,t.slug,e)},fetchSuggestions:function(n){return e.fetchCustomTaxonomiesSuggestions(t.slug,n)},fetchSavedInfo:function(n){return e.fetchSavedCustomTaxonomies(t.slug,n)},label:t.label})})),E&&(0,u.createElement)("p",null,(0,u.createElement)(d.Button,{isLink:!0,onClick:function(){return e.setState({showAdvancedFilters:!P})}},__(P?"Hide Advanced Filters":"Show Advanced Filters","newspack-blocks"))),P&&(0,u.createElement)(u.Fragment,null,E&&(0,u.createElement)(g.Z,{tokens:_||[],onChange:E,fetchSuggestions:e.fetchTagSuggestions,fetchSavedInfo:e.fetchSavedTags,label:__("Excluded Tags","newspack-blocks")}),x&&(0,u.createElement)(g.Z,{tokens:S||[],onChange:x,fetchSuggestions:e.fetchCategorySuggestions,fetchSavedInfo:e.fetchSavedCategories,label:__("Excluded Categories","newspack-blocks")}),A&&T&&A.map((function(t){var n=t.label,r=t.slug;return(0,u.createElement)(g.Z,{fetchSavedInfo:function(t){return e.fetchSavedCustomTaxonomies(r,t)},fetchSuggestions:function(t){return e.fetchCustomTaxonomiesSuggestions(r,t)},key:"".concat(r,"-exclusions-selector"),label:(0,p.sprintf)(__("Excluded %s","newspack-blocks"),n),onChange:function(e){return O(C,T,r,e)},tokens:I(C,r)})})))))})),e}return(0,a.Z)(n)}(u.Component);w.defaultProps={enableSpecific:!0,specificPosts:[],authors:[],categories:[],tags:[],customTaxonomies:[],tagExclusions:[],customTaxonomyExclusions:[]};const k=w},5189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9307),a=n(5736),o=n(5609),__=a.__;const i=function(e){var t=e.attributes,n=e.setAttributes;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Post-Checkout Button","newspack-blocks"),help:__("After a successful purchase, a button will be presented to finish the process.","newspack-blocks"),value:t.afterSuccessBehavior,options:[{label:__("Close the modal","newspack-blocks"),value:""},{label:__("Go to a custom URL","newspack-blocks"),value:"custom"},{label:__("Go to the previous page","newspack-blocks"),value:"referrer"}],onChange:function(e){n({afterSuccessBehavior:e.toString()})}}),(0,r.createElement)(o.TextControl,{label:__("Button Label","newspack-blocks"),value:t.afterSuccessButtonLabel||"",onChange:function(e){return n({afterSuccessButtonLabel:e})}}),"custom"===t.afterSuccessBehavior&&(0,r.createElement)(o.TextControl,{label:__("Custom URL","newspack-blocks"),placeholder:__("https://example.com","newspack-blocks"),value:t.afterSuccessURL||"",onChange:function(e){return n({afterSuccessURL:e})}}))}},6896:(e,t,n)=>{"use strict";var r=n(9062),a=n(9307),o=n(4981),i=n(5609),s=n(3967),l=n.n(s);const c=function(e){var t=e.size,n=void 0===t?24:t,r=e.className;return(0,a.createElement)(i.SVG,{className:l()("newspack-logo",r),width:n,height:n,viewBox:"0 0 32 32"},(0,a.createElement)(i.Path,{d:"M16 32c8.836 0 16-7.164 16-16S24.836 0 16 0 0 7.164 0 16s7.163 16 16 16z",fill:"#36F"}),(0,a.createElement)(i.Path,{d:"M22.988 16.622h-1.72l-1.103-1.124h2.823v1.124zm0-3.31H18.02l-1.102-1.124h6.071v1.124zm0-3.31h-8.217l-1.103-1.125h9.32v1.125zm0 13.12L9.012 8.878v4.749l.069.071h-.07v9.426h3.451v-5.98l5.867 5.98h4.66z",fill:"#fff"}))};(0,o.setCategories)([].concat((0,r.Z)((0,o.getCategories)().filter((function(e){return"newspack"!==e.slug}))),[{slug:"newspack",title:"Newspack",icon:(0,a.createElement)(c,null)}])),(0,o.registerBlockStyle)("core/columns",{name:"borders",label:"Borders"}),(0,o.registerBlockStyle)("core/columns",{name:"first-col-to-second",label:"Move first column to second"}),(0,o.registerBlockStyle)("core/columns",{name:"first-col-to-third",label:"Move first column to third"}),(0,n(2694).addFilter)("blocks.registerBlockType","newspack-blocks",(function(e,t){if("core/group"===t){var n=e.supports.align;-1===n.indexOf("left")&&n.push("left"),-1===n.indexOf("right")&&n.push("right")}return e})),(0,o.registerBlockStyle)("core/group",{name:"border",label:"Border"});const u=window.wp.domReady;var p=["jetpack/donations","jetpack/subscriptions"];n.n(u)()((function(){p.forEach((function(e){(0,o.getBlockType)(e)&&(0,o.unregisterBlockType)(e)}))}))},2089:(e,t,n)=>{"use strict";n.d(t,{lW:()=>i,FX:()=>s,b2:()=>l,Q$:()=>c,fC:()=>u});var r=n(9062),a=n(9307),o=n(5736),_x=o._x,__=o.__,i=function(e){return e.map((function(e){return(0,a.createElement)("span",{className:"avatar author-avatar",key:e.id},(0,a.createElement)("a",{className:"url fn n",href:e.author_link},(0,a.createElement)(a.RawHTML,null,e.avatar)))}))},s=function(e){return(0,a.createElement)("span",{className:"byline"},(0,a.createElement)("span",{className:"author-prefix"},_x("by","post author","newspack-blocks"))," ",e.reduce((function(t,n,o){return[].concat((0,r.Z)(t),[(0,a.createElement)("span",{className:"author vcard",key:n.id},(0,a.createElement)("a",{className:"url fn n",href:n.author_link},n.display_name)),o<e.length-2&&", ",e.length>1&&o===e.length-2&&_x(" and ","post author","newspack-blocks")])}),[]))},l=function(e){return(0,a.createElement)("span",{className:"sponsor-logos"},e.map((function(e){return(0,a.createElement)(a.Fragment,{key:e.id},e.src&&(0,a.createElement)("a",{href:e.sponsor_url},(0,a.createElement)("img",{src:e.src,width:e.img_width,height:e.img_height,alt:e.sponsor_name})))})))},c=function(e){return(0,a.createElement)("span",{className:"byline sponsor-byline"},e[0].byline_prefix," ",e.reduce((function(t,n,o){return[].concat((0,r.Z)(t),[(0,a.createElement)("span",{className:"author",key:n.id},(0,a.createElement)("a",{href:n.author_link},n.sponsor_name)),o<e.length-2&&", ",e.length>1&&o===e.length-2&&_x(" and ","post author","newspack-blocks")])}),[]))},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"publish"!==e.post_status?(0,a.createElement)("div",{className:"newspack-preview-label"},{draft:__("Draft","newspack-blocks"),future:__("Scheduled","newspack-blocks")}[e.post_status]):null}},9196:e=>{"use strict";e.exports=window.React},2819:e=>{"use strict";e.exports=window.lodash},6292:e=>{"use strict";e.exports=window.moment},6989:e=>{"use strict";e.exports=window.wp.apiFetch},2175:e=>{"use strict";e.exports=window.wp.blockEditor},4981:e=>{"use strict";e.exports=window.wp.blocks},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},9818:e=>{"use strict";e.exports=window.wp.data},9771:e=>{"use strict";e.exports=window.wp.date},9307:e=>{"use strict";e.exports=window.wp.element},2694:e=>{"use strict";e.exports=window.wp.hooks},2629:e=>{"use strict";e.exports=window.wp.htmlEntities},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},4654:()=>{},3967:(e,t)=>{var n;
|
|
37
|
+
/*!
|
|
38
|
+
Copyright (c) 2018 Jed Watson.
|
|
39
|
+
Licensed under the MIT License (MIT), see
|
|
40
|
+
http://jedwatson.github.io/classnames
|
|
41
|
+
*/!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},907:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},5057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(907);function a(e){if(Array.isArray(e))return(0,r.Z)(e)}},7326:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>r})},5861:(e,t,n)=>{"use strict";function r(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function s(e){r(i,a,o,s,l,"next",e)}function l(e){r(i,a,o,s,l,"throw",e)}s(void 0)}))}}n.d(t,{Z:()=>a})},5048:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},3144:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:()=>a})},8347:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function a(e){return a="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},a(e)}n.d(t,{Z:()=>s});var o=n(7326);function i(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return i(this,n)}}},4942:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9611);function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},9199:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:()=>r})},2786:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},1413:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4942);function a(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},3366:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{Z:()=>r})},9611:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:()=>r})},885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(181);function a(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,a,o=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(s){i=!0,a=s}finally{try{_n||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||(0,r.Z)(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.")}()}},9062:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5057),a=n(9199),o=n(181),i=n(2786);function s(e){return(0,r.Z)(e)||(0,a.Z)(e)||(0,o.Z)(e)||(0,i.Z)()}},181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(907);function a(e,t){if(e){if("string"==typeof e)return(0,r.Z)(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)?(0,r.Z)(e,t):void 0}}},3357:e=>{"use strict";e.exports=JSON.parse('{"u2":"homepage-articles","W3":"newspack","Y4":{"className":{"type":"string","default":""},"showExcerpt":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55},"showReadMore":{"type":"boolean","default":false},"readMoreLabel":{"type":"string","default":"Keep reading"},"showDate":{"type":"boolean","default":true},"showImage":{"type":"boolean","default":true},"showCaption":{"type":"boolean","default":false},"disableImageLazyLoad":{"type":"boolean","default":false},"fetchPriority":{"type":"string","default":""},"imageShape":{"type":"string","default":"landscape"},"minHeight":{"type":"integer","default":0},"moreButton":{"type":"boolean","default":false},"moreButtonText":{"type":"string","default":""},"showAuthor":{"type":"boolean","default":true},"showAvatar":{"type":"boolean","default":true},"showCategory":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"integer","default":3},"colGap":{"type":"integer","default":3},"postsToShow":{"type":"integer","default":3},"mediaPosition":{"type":"string","default":"top"},"authors":{"type":"array","default":[],"items":{"type":"integer"}},"categories":{"type":"array","default":[],"items":{"type":"integer"}},"includeSubcategories":{"type":"boolean","default":true},"tags":{"type":"array","default":[],"items":{"type":"integer"}},"customTaxonomies":{"type":"array","default":[],"items":{"type":"object","properties":{"slug":{"type":"string"},"terms":{"type":"array","items":{"type":"integer"}}}}},"tagExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"categoryExclusions":{"type":"array","default":[],"items":{"type":"integer"}},"customTaxonomyExclusions":{"type":"array","default":[],"items":{"type":"object","properties":{"slug":{"type":"string"},"terms":{"type":"array","items":{"type":"integer"}}}}},"specificPosts":{"type":"array","default":[],"items":{"type":"integer"}},"typeScale":{"type":"integer","default":4},"imageScale":{"type":"integer","default":3},"mobileStack":{"type":"boolean","default":false},"sectionHeader":{"type":"string","default":""},"specificMode":{"type":"boolean","default":false},"textColor":{"type":"string","default":""},"customTextColor":{"type":"string","default":""},"singleMode":{"type":"boolean","default":false},"showSubtitle":{"type":"boolean","default":false},"postType":{"type":"array","default":["post"],"items":{"type":"string"}},"textAlign":{"type":"string","default":"left"},"includedPostStatuses":{"type":"array","default":["publish"],"items":{"type":"string"}},"deduplicate":{"type":"boolean","default":true}}}')}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,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.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})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(6896),n(7501),n(7362),n(5671),n(6573),n(9523),n(1341),n(92);var r=n(1378),a=window;for(var o in r)a[o]=r[o];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
|