diff --git a/Aeria/Aeria.php b/Aeria/Aeria.php index 412ba37..b4730ac 100755 --- a/Aeria/Aeria.php +++ b/Aeria/Aeria.php @@ -31,7 +31,7 @@ */ class Aeria extends Container { - const VERSION = '3.1.7'; + const VERSION = '3.1.8'; /** * Constructs the Aeria container. diff --git a/Aeria/Config/Config.php b/Aeria/Config/Config.php index c4560cc..6b8d825 100755 --- a/Aeria/Config/Config.php +++ b/Aeria/Config/Config.php @@ -193,9 +193,6 @@ public function getValidationStructure(): array 'capability' => $this->makeRegExValidator( '/^[a-z0-9_-]+$/' ), - 'parent' => $this->makeRegExValidator( - '/^[a-z0-9_-]+$/' - ), 'fields' => function ($value) { return [ 'result' => is_array($value), diff --git a/Aeria/Field/Fields/BaseField.php b/Aeria/Field/Fields/BaseField.php index 678c941..9c067cf 100644 --- a/Aeria/Field/Fields/BaseField.php +++ b/Aeria/Field/Fields/BaseField.php @@ -98,8 +98,8 @@ public function shouldBeChildOf(Node $possible_parent) public function getKey() { return $this->parent_key - .(!is_null($this->index) ? '-'.$this->index : '') - .(!is_null($this->id) ? '-'.$this->id : ''); + .(!is_null($this->index) ? '-'.$this->index : '') + .(!is_null($this->id) ? '-'.$this->id : ''); } /** @@ -142,23 +142,25 @@ public function getAdmin(array $saved_fields, array $errors) { if (isset($errors[$this->key])) { $result = [ - 'value' => $errors[$this->key]['value'], - 'error' => $errors[$this->key]['message'], + 'value' => $errors[$this->key]['value'], + 'error' => $errors[$this->key]['message'], ]; } else { $result = [ - 'value' => $this->get($saved_fields, true), + 'value' => $this->get($saved_fields, true), ]; } - if (is_null($result['value'])) { - return $this->config; - } - - return array_merge( + $config = array_merge( $this->config, $result ); + + $config = apply_filters('aeria_get_admin_base', $config); + $config = apply_filters('aeria_get_admin_'.$this->id, $config); + $config = apply_filters('aeria_get_admin_'.$this->key, $config); + + return $config; } /** diff --git a/Aeria/Field/Fields/SectionsField.php b/Aeria/Field/Fields/SectionsField.php index 8806bc4..86f6965 100644 --- a/Aeria/Field/Fields/SectionsField.php +++ b/Aeria/Field/Fields/SectionsField.php @@ -174,10 +174,10 @@ public function getAdmin(array $metas, array $errors) $children[] = array_merge( $section_config, [ - 'title' => $this->getTitle($type_index)->get($metas), - 'isDraft' => $this->getDraftMode($type_index)->get($metas), - 'accordionState' => $this->getAccordionStatus($type_index)->get($metas), - 'fields' => $fields, + 'title' => $this->getTitle($type_index)->get($metas), + 'isDraft' => $this->getDraftMode($type_index)->get($metas), + 'accordionState' => $this->getAccordionStatus($type_index)->get($metas), + 'fields' => $fields, ] ); } @@ -186,8 +186,8 @@ public function getAdmin(array $metas, array $errors) return array_merge( $this->config, [ - 'value' => $stored_value, - 'children' => $children, + 'value' => $stored_value, + 'children' => $children, ] ); } @@ -226,26 +226,32 @@ public function set($context_ID, $context_type, array $metas, array $new_values, )->set($context_ID, $context_type, $metas, $new_values, $validator_service, $query_service, $query_service); } // remove orphans - $this->deleteOrphanMeta($this->key.'-'.$type_index, $metas, $new_values); + $this->deleteOrphanMeta($this->key.'-'.$type_index, $metas, $new_values, $context_type); } } /** * Deletes the metas that lose a parent :(. * - * @param string $parent_key the parent's key - * @param array $metas the saved fields - * @param array $new_values the values we're saving + * @param string $parent_key the parent's key + * @param array $metas the saved fields + * @param array $new_values the values we're saving + * @param string $context_type the context type. Right now, options|meta * * @since Method available since Release 3.0.0 */ - private function deleteOrphanMeta($parent_key, $metas, $new_values) + private function deleteOrphanMeta($parent_key, $metas, $new_values, $context_type) { $oldFields = static::pregGrepKeys('/^'.$parent_key.'/', $metas); $newFields = static::pregGrepKeys('/^'.$parent_key.'/', $new_values); $deletableFields = array_diff_key($oldFields, $newFields); + foreach ($deletableFields as $deletableKey => $deletableField) { - delete_post_meta($new_values['post_ID'], $deletableKey); + if ($context_type === 'options') { + delete_option($deletableKey); + } else { + delete_post_meta($new_values['post_ID'], $deletableKey); + } } } diff --git a/Aeria/Field/Fields/SelectField.php b/Aeria/Field/Fields/SelectField.php index 7e8dce4..5dcae1f 100644 --- a/Aeria/Field/Fields/SelectField.php +++ b/Aeria/Field/Fields/SelectField.php @@ -66,24 +66,4 @@ public function get(array $saved_fields, bool $skip_filter = false) return $values; } - - /** - * Gets the field's value and its errors. - * - * @param array $saved_fields the FieldGroup's saved fields - * @param array $errors the saving errors - * - * @return array the field's config, hydrated with values and errors - * - * @since Method available since Release 3.0.0 - */ - public function getAdmin(array $saved_fields, array $errors) - { - $savedValues = parent::getAdmin($saved_fields, $errors, true); - - return array_merge( - $this->config, - $savedValues - ); - } } diff --git a/Aeria/Kernel/Tasks/CreateConfig.php b/Aeria/Kernel/Tasks/CreateConfig.php index 86567bb..2a3b5b9 100644 --- a/Aeria/Kernel/Tasks/CreateConfig.php +++ b/Aeria/Kernel/Tasks/CreateConfig.php @@ -30,7 +30,8 @@ public function do(array $args) { $args['config'] = $this->manipulateConfig($args['config']); $args['config'] = $this->checkSectionIds($args['config']); - $args['container']->make('config')->merge($args['config']); + $args['config'] = apply_filters('aeria_transform_config', $args['config']); + $args['container']->make('config')->load($args['config']); return $args; } @@ -39,6 +40,7 @@ private function checkSectionIds($tree) { foreach ($tree as $key => $value) { $tree[$key]['id'] = $key; + $tree[$key] = apply_filters('aeria_transform_section_'.$tree[$key]['id'], $tree[$key]); } return $tree; @@ -47,9 +49,6 @@ private function checkSectionIds($tree) private function manipulateConfig($tree) { foreach ($tree as $key => $value) { - if (is_array($tree[$key])) { - $tree[$key] = $this->manipulateConfig($tree[$key]); - } if ($key === 'section') { $tree[$key] = $this->checkSectionIds($tree[$key]); } @@ -58,6 +57,9 @@ private function manipulateConfig($tree) $tree[$key][$fieldKey] = $this->getRealFields($field_config); } } + if (is_array($tree[$key])) { + $tree[$key] = $this->manipulateConfig($tree[$key]); + } } return $tree; @@ -71,6 +73,11 @@ private function getRealFields($field_config) $field_config['fields'] = $this->getRealFields($field_config['fields']); } + if (isset($field_config['id'])) { + $field_config = apply_filters('aeria_before_transform_field_base', $field_config); + $field_config = apply_filters('aeria_before_transform_field_'.$field_config['id'], $field_config); + } + if (!isset($field_config['type'])) { return $field_config; } @@ -87,6 +94,9 @@ private function getRealFields($field_config) ? $field_type_class::transformConfig($field_config) : $field_config; + $new_field_config = apply_filters('aeria_after_transform_field_base', $new_field_config); + $new_field_config = apply_filters('aeria_after_transform_field_'.$new_field_config['id'], $new_field_config); + return $new_field_config; } } diff --git a/aeria.php b/aeria.php index a3151c9..d36ae0c 100755 --- a/aeria.php +++ b/aeria.php @@ -10,7 +10,7 @@ * Plugin Name: Aeria * Plugin URI: https://github.com/caffeinalab/aeria * Description: Aeria is a modular, lightweight, fast WordPress Application development kit. - * Version: 3.1.7 + * Version: 3.1.8 * Author: Caffeina * Author URI: https://caffeina.com * Text Domain: aeria diff --git a/assets/js/aeria.js b/assets/js/aeria.js index f094de3..76dc930 100644 --- a/assets/js/aeria.js +++ b/assets/js/aeria.js @@ -1,16 +1,16 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return 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=264)}([function(e,t,n){"use strict";e.exports=n(188)},function(e,t,n){e.exports=n(202)()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Ee})),n.d(t,"b",(function(){return je})),n.d(t,"c",(function(){return le}));var r=n(117),o=n(0),i=n.n(o),a=(n(177),n(88)),l=n(89),u=n(178),s=n(118),c=n.n(s);function f(){return(f=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Additional arguments: "+n.join(", "):""))}var S=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(b))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(b,"active"),r.setAttribute("data-styled-version","5.0.1");var a=k();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},C=function(){function e(e){var t=this.element=S(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&E(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=A&&(A=t+1),j.set(e,t),q.set(t,e)},R="style["+b+'][data-styled-version="5.0.1"]',L=/(?:\s*)?(.*?){((?:{[^}]*}|(?!{).*?)*)}/g,I=new RegExp("^"+b+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\]'),F=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i0&&(s+=e+",")})),r+=""+l+u+'{content:"'+s+'"}\n'}}}return r}(this)},e}(),H=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},W=function(e){return H(5381,e)};var K=/^\s*\/\/.*$/gm;function Y(e){var t,n,r,o=void 0===e?y:e,i=o.options,l=void 0===i?y:i,u=o.plugins,s=void 0===u?h:u,c=new a.a(l),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,l,u,s,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===s)return r+"/*|*/";break;case 3:switch(s){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),d=function(e,r,o){return r>0&&-1!==o.slice(0,r).indexOf(n)&&o.slice(r-n.length,r)!==n?"."+t:e};function g(e,o,i,a){void 0===a&&(a="&");var l=e.replace(K,""),u=o&&i?i+" "+o+" { "+l+" }":l;return t=a,n=o,r=new RegExp("\\"+n+"\\b","g"),c(i||!o?"":o,u)}return c.use([].concat(s,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,d))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),g.hash=s.length?s.reduce((function(e,t){return t.name||E(15),H(e,t.name)}),5381).toString():"",g}var $=i.a.createContext(),G=($.Consumer,i.a.createContext()),Z=(G.Consumer,new V),Q=Y();function X(){return Object(o.useContext)($)||Z}function J(){return Object(o.useContext)(G)||Q}var ee=function(){function e(e,t){var n=this;this.inject=function(e){e.hasNameForId(n.id,n.name)||e.insertRules(n.id,n.name,Q.apply(void 0,n.stringifyArgs))},this.toString=function(){return E(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.stringifyArgs=t}return e.prototype.getName=function(){return this.name},e}(),te=/([A-Z])/g,ne=/^ms-/;function re(e){return e.replace(te,"-$1").toLowerCase().replace(ne,"-ms-")}var oe=function(e){return null==e||!1===e||""===e},ie=function e(t,n){var r=[];return Object.keys(t).forEach((function(n){if(!oe(t[n])){if(d(t[n]))return r.push.apply(r,e(t[n],n)),r;if(g(t[n]))return r.push(re(n)+":",t[n],";"),r;r.push(re(n)+": "+function(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in l.a?String(t).trim():t+"px"}(n,t[n])+";")}return r})),n?[n+" {"].concat(r,["}"]):r};function ae(e,t,n){if(Array.isArray(e)){for(var r,o=[],i=0,a=e.length;i1?t-1:0),r=1;r1?t-1:0),r=1;r25?39:97))};function he(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=de(t%52)+n;return(de(t%52)+n).replace(pe,"$1-$2")}function ye(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(o,"."+i,void 0,r);t.insertRules(r,i,a)}return this.staticRulesId=i,i}for(var l=this.rules.length,u=H(this.baseHash,n.hash),s="",c=0;c>>0);if(!t.hasNameForId(r,h)){var y=n(s,"."+h,void 0,r);t.insertRules(r,h,y)}return h},e}(),ve=(new Set,function(e,t,n){return void 0===n&&(n=y),e.theme!==n.theme&&e.theme||t||n.theme}),me=/[[\].#*$><+~=|^:(),"'`-]+/g,be=/(^-|-$)/g;function we(e){return e.replace(me,"-").replace(be,"")}function xe(e){return"string"==typeof e&&!0}var Oe=function(e){return he(W(e)>>>0)};var ke=i.a.createContext();ke.Consumer;function Ee(e){var t=Object(o.useContext)(ke),n=Object(o.useMemo)((function(){return function(e,t){return e?g(e)?e(t):Array.isArray(e)||"object"!=typeof e?E(8):t?f({},t,{},e):e:E(14)}(e.theme,t)}),[e.theme,t]);return e.children?i.a.createElement(ke.Provider,{value:n},e.children):null}var Se={};function Ce(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,l=e.foldedComponentIds,s=e.styledComponentId,c=e.target;Object(o.useDebugValue)(s);var p=function(e,t,n){void 0===e&&(e=y);var r=f({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in g(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(ve(t,Object(o.useContext)(ke),a)||y,t,r),d=p[0],h=p[1],v=function(e,t,n,r){var i=X(),a=J(),l=e.isStatic&&!t?e.generateAndInjectStyles(y,i,a):e.generateAndInjectStyles(n,i,a);return Object(o.useDebugValue)(l),l}(i,r.length>0,d),m=n,b=h.as||t.as||c,w=xe(b),x=h!==t?f({},t,{},h):t,O=w||"as"in x||"forwardedAs"in x,k=O?{}:f({},x);if(O)for(var E in x)"forwardedAs"===E?k.as=x[E]:"as"===E||"forwardedAs"===E||w&&!Object(u.a)(E)||(k[E]=x[E]);return t.style&&h.style!==t.style&&(k.style=f({},t.style,{},h.style)),k.className=Array.prototype.concat(l,s,v!==s?v:null,t.className,h.className).filter(Boolean).join(" "),k.ref=m,Object(o.createElement)(b,k)}function _e(e,t,n){var r,o=m(e),a=!xe(e),l=t.displayName,u=void 0===l?function(e){return xe(e)?"styled."+e:"Styled("+v(e)+")"}(e):l,s=t.componentId,p=void 0===s?function(e,t){var n="string"!=typeof e?"sc":we(e);Se[n]=(Se[n]||0)+1;var r=n+"-"+Oe(n+Se[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):s,d=t.attrs,y=void 0===d?h:d,g=t.displayName&&t.componentId?we(t.displayName)+"-"+t.componentId:t.componentId||p,b=o&&e.attrs?Array.prototype.concat(e.attrs,y).filter(Boolean):y,w=new ge(o?e.componentStyle.rules.concat(n):n,g),x=function(e,t){return Ce(r,e,t)};return x.displayName=u,(r=i.a.forwardRef(x)).attrs=b,r.componentStyle=w,r.displayName=u,r.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):h,r.styledComponentId=g,r.target=o?e.target:e,r.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(xe(e)?e:we(v(e)));return _e(e,f({},o,{attrs:b,componentId:i}),n)},Object.defineProperty(r,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?fe({},e.defaultProps,t):t}}),r.toString=function(){return"."+r.styledComponentId},a&&c()(r,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,self:!0,styledComponentId:!0,target:!0,withComponent:!0}),r}var Pe=function(e){return function e(t,n,o){if(void 0===o&&(o=y),!Object(r.isValidElementType)(n))return E(1,String(n));var i=function(){return t(n,o,le.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,f({},o,{},r))},i.attrs=function(r){return e(t,n,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(_e,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Pe[e]=Pe(e)}));var Te=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ye(e)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(ae(this.rules,t,n).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){V.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri;)o.push(arguments[i++]);if(r=t,(d(t)||void 0!==e)&&!ie(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,W.apply(null,o)}});H.prototype[B]||_(H.prototype,B,H.prototype.valueOf),R(H,"Symbol"),q[F]=!0},function(e,t,n){var r=n(20),o=n(47).f,i=n(43),a=n(44),l=n(96),u=n(123),s=n(103);e.exports=function(e,t){var n,c,f,p,d,h=e.target,y=e.global,g=e.stat;if(n=y?r:g?r[h]||l(h,{}):(r[h]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(d=o(n,c))&&d.value:n[c],!s(y?c:h+(g?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),a(n,c,p,e)}}},function(e,t,n){"use strict";var r=n(4),o=n(24),i=n(20),a=n(26),l=n(23),u=n(29).f,s=n(123),c=i.Symbol;if(o&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var f={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new c(e):void 0===e?c():c(e);return""===e&&(f[t]=!0),t};s(p,c);var d=p.prototype=c.prototype;d.constructor=p;var h=d.toString,y="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var e=l(this)?this.valueOf():this,t=h.call(e);if(a(f,e))return"";var n=y?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){"use strict";var r=n(42),o=n(108),i=n(66),a=n(61),l=n(135),u=a.set,s=a.getterFor("Array Iterator");e.exports=l(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var r=n(4),o=n(24);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(29).f})},function(e,t,n){var r=n(111),o=n(44),i=n(195);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(140).charAt,o=n(61),i=n(135),a=o.set,l=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=l(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(20),o=n(129),i=n(6),a=n(43),l=n(21),u=l("iterator"),s=l("toStringTag"),c=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[s]||a(d,s,f),o[f])for(var h in i)if(d[h]!==i[h])try{a(d,h,i[h])}catch(e){d[h]=i[h]}}}},function(e,t,n){n(134)("iterator")},function(e,t,n){var r=n(44),o=Date.prototype,i=o.toString,a=o.getTime;new Date(NaN)+""!="Invalid Date"&&r(o,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){"use strict";var r=n(44),o=n(27),i=n(18),a=n(139),l=RegExp.prototype,u=l.toString,s=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),c="toString"!=u.name;(s||c)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in l)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){n(4)({target:"Object",stat:!0,sham:!n(24)},{create:n(54)})},function(e,t,n){var r=n(4),o=n(18),i=n(35),a=n(109),l=n(137);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!l},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){n(4)({target:"Object",stat:!0},{setPrototypeOf:n(110)})},function(e,t,n){var r=n(4),o=n(48),i=n(50),a=n(27),l=n(23),u=n(54),s=n(196),c=n(18),f=o("Reflect","construct"),p=c((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),d=!c((function(){f((function(){}))})),h=p||d;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(d&&!p)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var o=n.prototype,c=u(l(o)?o:Object.prototype),h=Function.apply.call(e,c,t);return l(h)?h:c}})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,l],c=0;(u=new Error(t.replace(/%s/g,(function(){return s[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(70))},function(e,t,n){var r=n(20),o=n(98),i=n(26),a=n(72),l=n(105),u=n(128),s=o("wks"),c=r.Symbol,f=u?c:c&&c.withoutSetter||a;e.exports=function(e){return i(s,e)||(l&&i(c,e)?s[e]=c[e]:s[e]=f("Symbol."+e)),s[e]}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(189)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(4),o=n(187);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(23);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(4),o=n(127);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){var r=n(24),o=n(121),i=n(27),a=n(51),l=Object.defineProperty;t.f=r?l:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(20),o=n(129),i=n(127),a=n(43);for(var l in o){var u=r[l],s=u&&u.prototype;if(s&&s.forEach!==i)try{a(s,"forEach",i)}catch(e){s.forEach=i}}},function(e,t,n){var r=n(4),o=n(35),i=n(75);r({target:"Object",stat:!0,forced:n(18)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";var r=n(4),o=n(18),i=n(64),a=n(23),l=n(35),u=n(36),s=n(67),c=n(104),f=n(65),p=n(21),d=n(106),h=p("isConcatSpreadable"),y=d>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!y||!g},{concat:function(e){var t,n,r,o,i,a=l(this),f=c(a,0),p=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(f,p++,i)}return f.length=p,f}})},function(e,t,n){var r=n(4),o=n(24);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(131)})},function(e,t,n){"use strict";var r=n(158),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function l(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function s(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(24),o=n(18),i=n(26),a=Object.defineProperty,l={},u=function(e){throw e};e.exports=function(e,t){if(i(l,e))return l[e];t||(t={});var n=[][e],s=!!i(t,"ACCESSORS")&&t.ACCESSORS,c=i(t,0)?t[0]:u,f=i(t,1)?t[1]:void 0;return l[e]=!!n&&!o((function(){if(s&&!r)return!0;var e={length:-1};s?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,c,f)}))}},function(e,t,n){"use strict";var r=n(4),o=n(49).filter,i=n(65),a=n(37),l=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!l||!u},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(4),o=n(18),i=n(42),a=n(47).f,l=n(24),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!l||u,sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){var r=n(4),o=n(24),i=n(124),a=n(42),l=n(47),u=n(67);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=l.f,s=i(r),c={},f=0;s.length>f;)void 0!==(n=o(r,t=s[f++]))&&u(c,t,n);return c}})},function(e,t,n){"use strict";var r=n(4),o=n(49).map,i=n(65),a=n(37),l=i("map"),u=a("map");r({target:"Array",proto:!0,forced:!l||!u},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(60),o=n(46);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(24),o=n(29),i=n(59);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(20),o=n(43),i=n(26),a=n(96),l=n(97),u=n(61),s=u.get,c=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,l){var u=!!l&&!!l.unsafe,s=!!l&&!!l.enumerable,p=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),c(n).source=f.join("string"==typeof t?t:"")),e!==r?(u?!p&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||l(this)}))},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(24),o=n(94),i=n(59),a=n(42),l=n(51),u=n(26),s=n(121),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=l(t,!0),s)try{return c(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){var r=n(125),o=n(20),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(74),o=n(60),i=n(35),a=n(36),l=n(104),u=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,c=4==e,f=6==e,p=5==e||f;return function(d,h,y,g){for(var v,m,b=i(d),w=o(b),x=r(h,y,3),O=a(w.length),k=0,E=g||l,S=t?E(d,O):n?E(d,0):void 0;O>k;k++)if((p||k in w)&&(m=x(v=w[k],k,b),e))if(t)S[k]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:u.call(S,v)}else if(c)return!1;return f?-1:s||c?c:S}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(23);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){"use strict";var r=n(18);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r,o=n(27),i=n(131),a=n(101),l=n(63),u=n(132),s=n(95),c=n(71),f=c("IE_PROTO"),p=function(){},d=function(e){return"