9 lines
74 KiB
JavaScript
Executable File
9 lines
74 KiB
JavaScript
Executable File
(()=>{var __webpack_modules__={8679:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var reactIs=__webpack_require__(9864),REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};function getStatics(component){return reactIs.isMemo(component)?MEMO_STATICS:TYPE_STATICS[component.$$typeof]||REACT_STATICS}TYPE_STATICS[reactIs.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;var defineProperty=Object.defineProperty,getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,getPrototypeOf=Object.getPrototypeOf,objectPrototype=Object.prototype;module.exports=function hoistNonReactStatics(targetComponent,sourceComponent,blacklist){if("string"!=typeof sourceComponent){objectPrototype&&(inheritedComponent=getPrototypeOf(sourceComponent))&&inheritedComponent!==objectPrototype&&hoistNonReactStatics(targetComponent,inheritedComponent,blacklist);for(var inheritedComponent,keys=getOwnPropertyNames(sourceComponent),targetStatics=(getOwnPropertySymbols&&(keys=keys.concat(getOwnPropertySymbols(sourceComponent))),getStatics(targetComponent)),sourceStatics=getStatics(sourceComponent),i=0;i<keys.length;++i){var key=keys[i];if(!(KNOWN_STATICS[key]||blacklist&&blacklist[key]||sourceStatics&&sourceStatics[key]||targetStatics&&targetStatics[key])){var descriptor=getOwnPropertyDescriptor(sourceComponent,key);try{defineProperty(targetComponent,key,descriptor)}catch(e){}}}}return targetComponent}},4779:(module,__unused_webpack_exports,__webpack_require__)=>{var isarray=__webpack_require__(6173),PATH_REGEXP=(module.exports=pathToRegexp,module.exports.parse=parse,module.exports.compile=function(str,options){return tokensToFunction(parse(str,options),options)},module.exports.tokensToFunction=tokensToFunction,module.exports.tokensToRegExp=tokensToRegExp,new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g"));function parse(str,options){for(var tokens=[],key=0,index=0,path="",defaultDelimiter=options&&options.delimiter||"/";null!=(res=PATH_REGEXP.exec(str));){var capture,group,modifier,asterisk,res,m=res[0],escaped=res[1],offset=res.index;path+=str.slice(index,offset),index=offset+m.length,escaped?path+=escaped[1]:(offset=str[index],m=res[2],escaped=res[3],capture=res[4],group=res[5],modifier=res[6],asterisk=res[7],offset=(path&&(tokens.push(path),path=""),null!=m&&null!=offset&&offset!==m),res=res[2]||defaultDelimiter,tokens.push({name:escaped||key++,prefix:m||"",delimiter:res,optional:"?"===modifier||"*"===modifier,repeat:"+"===modifier||"*"===modifier,partial:offset,asterisk:!!asterisk,pattern:(escaped=capture||group)?escaped.replace(/([=!:$\/()])/g,"\\$1"):asterisk?".*":"[^"+escapeString(res)+"]+?"}))}return index<str.length&&(path+=str.substr(index)),path&&tokens.push(path),tokens}function encodeURIComponentPretty(str){return encodeURI(str).replace(/[\/?#]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}function tokensToFunction(tokens,options){for(var matches=new Array(tokens.length),i=0;i<tokens.length;i++)"object"==typeof tokens[i]&&(matches[i]=new RegExp("^(?:"+tokens[i].pattern+")$",flags(options)));return function(obj,opts){for(var path="",data=obj||{},encode=(opts||{}).pretty?encodeURIComponentPretty:encodeURIComponent,i=0;i<tokens.length;i++){var token=tokens[i];if("string"==typeof token)path+=token;else{var segment,value=data[token.name];if(null==value){if(token.optional){token.partial&&(path+=token.prefix);continue}throw new TypeError('Expected "'+token.name+'" to be defined')}if(isarray(value)){if(!token.repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but received `'+JSON.stringify(value)+"`");if(0===value.length){if(token.optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){if(segment=encode(value[j]),!matches[i].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'", but received `'+JSON.stringify(segment)+"`");path+=(0===j?token.prefix:token.delimiter)+segment}}else{if(segment=token.asterisk?encodeURI(value).replace(/[?#]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()}):encode(value),!matches[i].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but received "'+segment+'"');path+=token.prefix+segment}}}return path}}function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function attachKeys(re,keys){return re.keys=keys,re}function flags(options){return options&&options.sensitive?"":"i"}function tokensToRegExp(tokens,keys,options){isarray(keys)||(options=keys||options,keys=[]);for(var strict=(options=options||{}).strict,end=!1!==options.end,route="",i=0;i<tokens.length;i++){var prefix,capture,token=tokens[i];"string"==typeof token?route+=escapeString(token):(prefix=escapeString(token.prefix),capture="(?:"+token.pattern+")",keys.push(token),token.repeat&&(capture+="(?:"+prefix+capture+")*"),route+=capture=token.optional?token.partial?prefix+"("+capture+")?":"(?:"+prefix+"("+capture+"))?":prefix+"("+capture+")")}var delimiter=escapeString(options.delimiter||"/"),endsWithDelimiter=route.slice(-delimiter.length)===delimiter;return strict||(route=(endsWithDelimiter?route.slice(0,-delimiter.length):route)+"(?:"+delimiter+"(?=$))?"),route+=end?"$":strict&&endsWithDelimiter?"":"(?="+delimiter+"|$)",attachKeys(new RegExp("^"+route,flags(options)),keys)}function pathToRegexp(path,keys,options){return isarray(keys)||(options=keys||options,keys=[]),options=options||{},path instanceof RegExp?function(path,keys){var groups=path.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return attachKeys(path,keys)}(path,keys):(isarray(path)?function(path,keys,options){for(var parts=[],i=0;i<path.length;i++)parts.push(pathToRegexp(path[i],keys,options).source);return attachKeys(new RegExp("(?:"+parts.join("|")+")",flags(options)),keys)}:function(path,keys,options){return tokensToRegExp(parse(path,options),keys,options)})(path,keys,options)}},6173:module=>{module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},2703:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var ReactPropTypesSecret=__webpack_require__(414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,module.exports=function(){function shim(props,propName,componentName,location,propFullName,secret){if(secret!==ReactPropTypesSecret)throw(secret=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")).name="Invariant Violation",secret}function getShim(){return shim}var ReactPropTypes={array:shim.isRequired=shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return ReactPropTypes.PropTypes=ReactPropTypes}},5697:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__(2703)()},414:module=>{"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9921:(__unused_webpack_module,exports)=>{"use strict";
|
|
/** @license React v16.13.1
|
|
* react-is.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var b="function"==typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;function z(a){if("object"==typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l,exports.ConcurrentMode=m,exports.ContextConsumer=k,exports.ContextProvider=h,exports.Element=c,exports.ForwardRef=n,exports.Fragment=e,exports.Lazy=t,exports.Memo=r,exports.Portal=d,exports.Profiler=g,exports.StrictMode=f,exports.Suspense=p,exports.isAsyncMode=function(a){return A(a)||z(a)===l},exports.isConcurrentMode=A,exports.isContextConsumer=function(a){return z(a)===k},exports.isContextProvider=function(a){return z(a)===h},exports.isElement=function(a){return"object"==typeof a&&null!==a&&a.$$typeof===c},exports.isForwardRef=function(a){return z(a)===n},exports.isFragment=function(a){return z(a)===e},exports.isLazy=function(a){return z(a)===t},exports.isMemo=function(a){return z(a)===r},exports.isPortal=function(a){return z(a)===d},exports.isProfiler=function(a){return z(a)===g},exports.isStrictMode=function(a){return z(a)===f},exports.isSuspense=function(a){return z(a)===p},exports.isValidElementType=function(a){return"string"==typeof a||"function"==typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"==typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)},exports.typeOf=z},9864:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__(9921)}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];return void 0!==cachedModule||(cachedModule=__webpack_module_cache__[moduleId]={exports:{}},__webpack_modules__[moduleId](cachedModule,cachedModule.exports,__webpack_require__)),cachedModule.exports}__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop);(()=>{"use strict";const external_wp_element_namespaceObject=window.wp.element;var external_wp_apiFetch_namespaceObject=window.wp.apiFetch,external_wp_apiFetch_default=__webpack_require__.n(external_wp_apiFetch_namespaceObject);function set_rating(ev){ev.target.parentElement.innerText=(0,external_wp_i18n_namespaceObject.__)("Thanks :)","blockart"),external_wp_apiFetch_default()({path:"wp/v2/settings",method:"PUT",body:JSON.stringify({_blockart_admin_footer_text_rated:!0})}).then(function(){var el=document.getElementById("footer-left");null!==el&&(el.innerText=(0,external_wp_i18n_namespaceObject.__)("Thank you for creating with BlockArt.","blockart"))}).catch(function(e){console.warn(e)})}const external_wp_i18n_namespaceObject=window.wp.i18n;function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o})(o,p)}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),_setPrototypeOf(subClass.prototype.constructor=subClass,superClass)}const external_React_namespaceObject=window.React;var external_React_default=__webpack_require__.n(external_React_namespaceObject);function extends_extends(){return(extends_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var key,source=arguments[i];for(key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target}).apply(this,arguments)}function isAbsolute(pathname){return"/"===pathname.charAt(0)}function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1)list[i]=list[k];list.pop()}const resolve_pathname=function(to,from){void 0===from&&(from="");var toParts=to&&to.split("/")||[],fromParts=from&&from.split("/")||[],isToAbs=to&&isAbsolute(to),from=from&&isAbsolute(from),isToAbs=isToAbs||from;if(to&&isAbsolute(to)?fromParts=toParts:toParts.length&&(fromParts.pop(),fromParts=fromParts.concat(toParts)),!fromParts.length)return"/";to=!!fromParts.length&&("."===(from=fromParts[fromParts.length-1])||".."===from||""===from);for(var up=0,i=fromParts.length;0<=i;i--){var part=fromParts[i];"."===part?spliceOne(fromParts,i):".."===part?(spliceOne(fromParts,i),up++):up&&(spliceOne(fromParts,i),up--)}if(!isToAbs)for(;up--;)fromParts.unshift("..");return!isToAbs||""===fromParts[0]||fromParts[0]&&isAbsolute(fromParts[0])||fromParts.unshift(""),toParts=fromParts.join("/"),to&&"/"!==toParts.substr(-1)&&(toParts+="/"),toParts};var isProduction=!0,prefix="Invariant failed";function tiny_invariant_esm_invariant(condition,message){if(!condition){if(isProduction)throw new Error(prefix);condition="function"==typeof message?message():message;throw new Error(condition?prefix+": "+condition:prefix)}}function addLeadingSlash(path){return"/"===path.charAt(0)?path:"/"+path}function stripLeadingSlash(path){return"/"===path.charAt(0)?path.substr(1):path}function stripBasename(path,prefix){return function(path,prefix){return 0===path.toLowerCase().indexOf(prefix.toLowerCase())&&-1!=="/?#".indexOf(path.charAt(prefix.length))}(path,prefix)?path.substr(prefix.length):path}function stripTrailingSlash(path){return"/"===path.charAt(path.length-1)?path.slice(0,-1):path}function createPath(location){var pathname=location.pathname,search=location.search,location=location.hash,pathname=pathname||"/";return search&&"?"!==search&&(pathname+="?"===search.charAt(0)?search:"?"+search),location&&"#"!==location&&(pathname+="#"===location.charAt(0)?location:"#"+location),pathname}function history_createLocation(path,state,key,currentLocation){var location;"string"==typeof path?(location=function(path){var search="",hash="",hashIndex=(path=path||"/").indexOf("#");return-1!==hashIndex&&(hash=path.substr(hashIndex),path=path.substr(0,hashIndex)),-1!==(hashIndex=path.indexOf("?"))&&(search=path.substr(hashIndex),path=path.substr(0,hashIndex)),{pathname:path,search:"?"===search?"":search,hash:"#"===hash?"":hash}}(path)).state=state:(void 0===(location=extends_extends({},path)).pathname&&(location.pathname=""),location.search?"?"!==location.search.charAt(0)&&(location.search="?"+location.search):location.search="",location.hash?"#"!==location.hash.charAt(0)&&(location.hash="#"+location.hash):location.hash="",void 0!==state&&void 0===location.state&&(location.state=state));try{location.pathname=decodeURI(location.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+location.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return key&&(location.key=key),currentLocation?location.pathname?"/"!==location.pathname.charAt(0)&&(location.pathname=resolve_pathname(location.pathname,currentLocation.pathname)):location.pathname=currentLocation.pathname:location.pathname||(location.pathname="/"),location}function createTransitionManager(){var prompt=null;var listeners=[];return{setPrompt:function(nextPrompt){return prompt=nextPrompt,function(){prompt===nextPrompt&&(prompt=null)}},confirmTransitionTo:function(location,action,getUserConfirmation,callback){null!=prompt?"string"==typeof(location="function"==typeof prompt?prompt(location,action):prompt)?"function"==typeof getUserConfirmation?getUserConfirmation(location,callback):callback(!0):callback(!1!==location):callback(!0)},appendListener:function(fn){var isActive=!0;function listener(){isActive&&fn.apply(void 0,arguments)}return listeners.push(listener),function(){isActive=!1,listeners=listeners.filter(function(item){return item!==listener})}},notifyListeners:function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];listeners.forEach(function(listener){return listener.apply(void 0,args)})}}}var canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);function getConfirmation(message,callback){callback(window.confirm(message))}var HashChangeEvent$1="hashchange",HashPathCoders={hashbang:{encodePath:function(path){return"!"===path.charAt(0)?path:"!/"+stripLeadingSlash(path)},decodePath:function(path){return"!"===path.charAt(0)?path.substr(1):path}},noslash:{encodePath:stripLeadingSlash,decodePath:addLeadingSlash},slash:{encodePath:addLeadingSlash,decodePath:addLeadingSlash}};function stripHash(url){var hashIndex=url.indexOf("#");return-1===hashIndex?url:url.slice(0,hashIndex)}function getHashPath(){var href=window.location.href,hashIndex=href.indexOf("#");return-1===hashIndex?"":href.substring(hashIndex+1)}function replaceHashPath(path){window.location.replace(stripHash(window.location.href)+"#"+path)}function createHashHistory(props){void 0===props&&(props={}),canUseDOM||tiny_invariant_esm_invariant(!1);var globalHistory=window.history,_props=(window.navigator.userAgent.indexOf("Firefox"),props),_props$getUserConfirm=_props.getUserConfirmation,getUserConfirmation=void 0===_props$getUserConfirm?getConfirmation:_props$getUserConfirm,_props$getUserConfirm=_props.hashType,_props=void 0===_props$getUserConfirm?"slash":_props$getUserConfirm,basename=props.basename?stripTrailingSlash(addLeadingSlash(props.basename)):"",_props$getUserConfirm=HashPathCoders[_props],encodePath=_props$getUserConfirm.encodePath,decodePath=_props$getUserConfirm.decodePath;function getDOMLocation(){var path=decodePath(getHashPath());return history_createLocation(path=basename?stripBasename(path,basename):path)}var transitionManager=createTransitionManager();function setState(nextState){extends_extends(history,nextState),history.length=globalHistory.length,transitionManager.notifyListeners(history.location,history.action)}var forceNextPop=!1,ignorePath=null;function handleHashChange(){var b,path=getHashPath(),encodedPath=encodePath(path);path!==encodedPath?replaceHashPath(encodedPath):(path=getDOMLocation(),encodedPath=history.location,!forceNextPop&&(b=path,(encodedPath=encodedPath).pathname===b.pathname&&encodedPath.search===b.search&&encodedPath.hash===b.hash)||ignorePath===createPath(path)||(ignorePath=null,function(location){forceNextPop?(forceNextPop=!1,setState()):transitionManager.confirmTransitionTo(location,"POP",getUserConfirmation,function(ok){var toLocation;ok?setState({action:"POP",location:location}):(ok=location,toLocation=history.location,-1===(toLocation=allPaths.lastIndexOf(createPath(toLocation)))&&(toLocation=0),ok=allPaths.lastIndexOf(createPath(ok)),(toLocation-=ok=-1===ok?0:ok)&&(forceNextPop=!0,go(toLocation)))})}(path)))}var props=getHashPath(),_props=encodePath(props),_props$getUserConfirm=(props!==_props&&replaceHashPath(_props),getDOMLocation()),allPaths=[createPath(_props$getUserConfirm)];function go(n){globalHistory.go(n)}var listenerCount=0;function checkDOMListeners(delta){1===(listenerCount+=delta)&&1===delta?window.addEventListener(HashChangeEvent$1,handleHashChange):0===listenerCount&&window.removeEventListener(HashChangeEvent$1,handleHashChange)}var isBlocked=!1;var history={length:globalHistory.length,action:"POP",location:_props$getUserConfirm,createHref:function(location){var baseTag=document.querySelector("base"),href="";return(href=baseTag&&baseTag.getAttribute("href")?stripHash(window.location.href):href)+"#"+encodePath(basename+createPath(location))},push:function(path,state){var location=history_createLocation(path,void 0,void 0,history.location);transitionManager.confirmTransitionTo(location,"PUSH",getUserConfirmation,function(ok){var encodedPath;ok&&(ok=createPath(location),encodedPath=encodePath(basename+ok),getHashPath()!==encodedPath?(ignorePath=ok,function(path){window.location.hash=path}(encodedPath),encodedPath=allPaths.lastIndexOf(createPath(history.location)),(encodedPath=allPaths.slice(0,encodedPath+1)).push(ok),allPaths=encodedPath,setState({action:"PUSH",location:location})):setState())})},replace:function(path,state){var location=history_createLocation(path,void 0,void 0,history.location);transitionManager.confirmTransitionTo(location,"REPLACE",getUserConfirmation,function(ok){var encodedPath;ok&&(ok=createPath(location),encodedPath=encodePath(basename+ok),getHashPath()!==encodedPath&&(ignorePath=ok,replaceHashPath(encodedPath)),-1!==(encodedPath=allPaths.indexOf(createPath(history.location)))&&(allPaths[encodedPath]=ok),setState({action:"REPLACE",location:location}))})},go:go,goBack:function(){go(-1)},goForward:function(){go(1)},block:function(prompt){var unblock=transitionManager.setPrompt(prompt=void 0===prompt?!1:prompt);return isBlocked||(checkDOMListeners(1),isBlocked=!0),function(){return isBlocked&&(isBlocked=!1,checkDOMListeners(-1)),unblock()}},listen:function(listener){var unlisten=transitionManager.appendListener(listener);return checkDOMListeners(1),function(){checkDOMListeners(-1),unlisten()}}};return history}var external_wp_apiFetch_namespaceObject=__webpack_require__(5697),prop_types_default=__webpack_require__.n(external_wp_apiFetch_namespaceObject),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:{};const esm=external_React_default().createContext||function(defaultValue,calculateChangedBits){var _Consumer$contextType,contextProp="__create-react-context-"+(commonjsGlobal[key="__global_unique_id__"]=(commonjsGlobal[key]||0)+1)+"__",key=function(_Component){function Provider(){var value,handlers,_this=_Component.apply(this,arguments)||this;return _this.emitter=(value=_this.props.value,handlers=[],{on:function(handler){handlers.push(handler)},off:function(handler){handlers=handlers.filter(function(h){return h!==handler})},get:function(){return value},set:function(newValue,changedBits){value=newValue,handlers.forEach(function(handler){return handler(value,changedBits)})}}),_this}_inheritsLoose(Provider,_Component);var _proto=Provider.prototype;return _proto.getChildContext=function(){var _ref={};return _ref[contextProp]=this.emitter,_ref},_proto.componentWillReceiveProps=function(nextProps){var oldValue,newValue,x,y;this.props.value!==nextProps.value&&(oldValue=this.props.value,newValue=nextProps.value,((x=oldValue)===(y=newValue)?0===x&&1/x!=1/y:x==x||y==y)&&(x="function"==typeof calculateChangedBits?calculateChangedBits(oldValue,newValue):1073741823,0!==(x|=0)&&this.emitter.set(nextProps.value,x)))},_proto.render=function(){return this.props.children},Provider}(external_React_namespaceObject.Component),_Provider$childContex=(key.childContextTypes=((_Provider$childContex={})[contextProp]=prop_types_default().object.isRequired,_Provider$childContex),function(_Component2){function Consumer(){var _this2=_Component2.apply(this,arguments)||this;return _this2.state={value:_this2.getValue()},_this2.onUpdate=function(newValue,changedBits){0!=((0|_this2.observedBits)&changedBits)&&_this2.setState({value:_this2.getValue()})},_this2}_inheritsLoose(Consumer,_Component2);var _proto2=Consumer.prototype;return _proto2.componentWillReceiveProps=function(nextProps){nextProps=nextProps.observedBits;this.observedBits=null==nextProps?1073741823:nextProps},_proto2.componentDidMount=function(){this.context[contextProp]&&this.context[contextProp].on(this.onUpdate);var observedBits=this.props.observedBits;this.observedBits=null==observedBits?1073741823:observedBits},_proto2.componentWillUnmount=function(){this.context[contextProp]&&this.context[contextProp].off(this.onUpdate)},_proto2.getValue=function(){return this.context[contextProp]?this.context[contextProp].get():defaultValue},_proto2.render=function(){return children=this.props.children,(Array.isArray(children)?children[0]:children)(this.state.value);var children},Consumer}(external_React_namespaceObject.Component));return _Provider$childContex.contextTypes=((_Consumer$contextType={})[contextProp]=prop_types_default().object,_Consumer$contextType),{Provider:key,Consumer:_Provider$childContex}};var external_wp_apiFetch_namespaceObject=__webpack_require__(4779),path_to_regexp_default=__webpack_require__.n(external_wp_apiFetch_namespaceObject);__webpack_require__(9864);function objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};for(var key,target={},sourceKeys=Object.keys(source),i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function createNamedContext(name){var context=esm();return context.displayName=name,context}__webpack_require__(8679);var historyContext=createNamedContext("Router-History"),context=createNamedContext("Router"),Router=function(_React$Component){function Router(props){var _this=_React$Component.call(this,props)||this;return _this.state={location:props.history.location},_this._isMounted=!1,_this._pendingLocation=null,props.staticContext||(_this.unlisten=props.history.listen(function(location){_this._pendingLocation=location})),_this}_inheritsLoose(Router,_React$Component),Router.computeRootMatch=function(pathname){return{path:"/",url:"/",params:{},isExact:"/"===pathname}};var _proto=Router.prototype;return _proto.componentDidMount=function(){var _this2=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(location){_this2._isMounted&&_this2.setState({location:location})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},_proto.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},_proto.render=function(){return external_React_default().createElement(context.Provider,{value:{history:this.props.history,location:this.state.location,match:Router.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},external_React_default().createElement(historyContext.Provider,{children:this.props.children||null,value:this.props.history}))},Router}(external_React_default().Component);external_React_default().Component,external_React_default().Component;var cache$1={},cacheLimit$1=1e4,cacheCount$1=0;function matchPath(pathname,options){var options=options="string"!=typeof(options=void 0===options?{}:options)&&!Array.isArray(options)?options:{path:options},path=options.path,_options$exact=options.exact,exact=void 0!==_options$exact&&_options$exact,_options$exact=options.strict,strict=void 0!==_options$exact&&_options$exact,_options$exact=options.sensitive,sensitive=void 0!==_options$exact&&_options$exact;return[].concat(path).reduce(function(matched,path){var url,values,regexp;return path||""===path?matched||(regexp=(matched=function(path,options){var keys,cacheKey=""+options.end+options.strict+options.sensitive;return(cacheKey=cache$1[cacheKey]||(cache$1[cacheKey]={}))[path]||(keys=[],options={regexp:path_to_regexp_default()(path,keys,options),keys:keys},cacheCount$1<cacheLimit$1&&(cacheKey[path]=options,cacheCount$1++),options)}(path,{end:exact,strict:strict,sensitive:sensitive})).regexp,matched=matched.keys,!(regexp=regexp.exec(pathname))||(url=regexp[0],values=regexp.slice(1),regexp=pathname===url,exact&&!regexp)?null:{path:path,url:"/"===path&&""===url?"/":url,isExact:regexp,params:matched.reduce(function(memo,key,index){return memo[key.name]=values[index],memo},{})}):null},null)}var Route=function(_React$Component){function Route(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(Route,_React$Component),Route.prototype.render=function(){var _this=this;return external_React_default().createElement(context.Consumer,null,function(context$1){context$1||tiny_invariant_esm_invariant(!1);var location=_this.props.location||context$1.location,location=extends_extends({},context$1,{location:location,match:_this.props.computedMatch||(_this.props.path?matchPath(location.pathname,_this.props):context$1.match)}),context$1=_this.props,children=context$1.children,component=context$1.component,context$1=context$1.render;return Array.isArray(children)&&function(children){return 0===external_React_default().Children.count(children)}(children)&&(children=null),external_React_default().createElement(context.Provider,{value:location},location.match?children?"function"==typeof children?children(location):children:component?external_React_default().createElement(component,location):context$1?context$1(location):null:"function"==typeof children?children(location):null)})},Route}(external_React_default().Component);external_React_default().Component;var Switch=function(_React$Component){function Switch(){return _React$Component.apply(this,arguments)||this}return _inheritsLoose(Switch,_React$Component),Switch.prototype.render=function(){var _this=this;return external_React_default().createElement(context.Consumer,null,function(context){context||tiny_invariant_esm_invariant(!1);var element,match,location=_this.props.location||context.location;return external_React_default().Children.forEach(_this.props.children,function(child){var path;null==match&&external_React_default().isValidElement(child)&&(path=(element=child).props.path||child.props.from,match=path?matchPath(location.pathname,extends_extends({},child.props,{path:path})):context.match)}),match?external_React_default().cloneElement(element,{location:location,computedMatch:match}):null})},Switch}(external_React_default().Component);external_React_default().useContext;external_React_default().Component;function resolveToLocation(to,currentLocation){return"function"==typeof to?to(currentLocation):to}function normalizeToLocation(to,currentLocation){return"string"==typeof to?history_createLocation(to,null,null,currentLocation):to}function forwardRefShim(C){return C}var HashRouter=function(_React$Component){function HashRouter(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return(_this=_React$Component.call.apply(_React$Component,[this].concat(args))||this).history=createHashHistory(_this.props),_this}return _inheritsLoose(HashRouter,_React$Component),HashRouter.prototype.render=function(){return external_React_default().createElement(Router,{history:this.history,children:this.props.children})},HashRouter}(external_React_default().Component),forwardRef=external_React_default().forwardRef;function forwardRefShim$1(C){return C}var LinkAnchor=(forwardRef=void 0===forwardRef?forwardRefShim:forwardRef)(function(_ref,forwardedRef){var innerRef=_ref.innerRef,navigate=_ref.navigate,_onClick=_ref.onClick,_ref=objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref,["innerRef","navigate","onClick"]),target=_ref.target,_ref=extends_extends({},_ref,{onClick:function(event){try{_onClick&&_onClick(event)}catch(ex){throw event.preventDefault(),ex}event.defaultPrevented||0!==event.button||target&&"_self"!==target||function(event){return event.metaKey||event.altKey||event.ctrlKey||event.shiftKey}(event)||(event.preventDefault(),navigate())}});return _ref.ref=forwardRefShim!==forwardRef&&forwardedRef||innerRef,external_React_default().createElement("a",_ref)}),Link=forwardRef(function(_ref2,forwardedRef){var _ref2$component=_ref2.component,component=void 0===_ref2$component?LinkAnchor:_ref2$component,replace=_ref2.replace,to=_ref2.to,innerRef=_ref2.innerRef,rest=objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2,["component","replace","to","innerRef"]);return external_React_default().createElement(context.Consumer,null,function(context){context||tiny_invariant_esm_invariant(!1);var history=context.history,location=normalizeToLocation(resolveToLocation(to,context.location),context.location),location=location?history.createHref(location):"",location=extends_extends({},rest,{href:location,navigate:function(){var location=resolveToLocation(to,context.location),isDuplicateNavigation=createPath(context.location)===createPath(normalizeToLocation(location));(replace||isDuplicateNavigation?history.replace:history.push)(location)}});return forwardRefShim!==forwardRef?location.ref=forwardedRef||innerRef:location.innerRef=innerRef,external_React_default().createElement(component,location)})}),forwardRef$1=external_React_default().forwardRef;var NavLink=(forwardRef$1=void 0===forwardRef$1?forwardRefShim$1:forwardRef$1)(function(_ref,forwardedRef){var _ref$ariaCurrent=_ref["aria-current"],ariaCurrent=void 0===_ref$ariaCurrent?"page":_ref$ariaCurrent,_ref$ariaCurrent=_ref.activeClassName,activeClassName=void 0===_ref$ariaCurrent?"active":_ref$ariaCurrent,activeStyle=_ref.activeStyle,classNameProp=_ref.className,exact=_ref.exact,isActiveProp=_ref.isActive,locationProp=_ref.location,sensitive=_ref.sensitive,strict=_ref.strict,styleProp=_ref.style,to=_ref.to,innerRef=_ref.innerRef,rest=objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return external_React_default().createElement(context.Consumer,null,function(context){context||tiny_invariant_esm_invariant(!1);var context=locationProp||context.location,toLocation=normalizeToLocation(resolveToLocation(to,context),context),path=toLocation.pathname,path=path&&path.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),path=path?matchPath(context.pathname,{path:path,exact:exact,sensitive:sensitive,strict:strict}):null,context=!!(isActiveProp?isActiveProp(path,context):path),path="function"==typeof classNameProp?classNameProp(context):classNameProp,style="function"==typeof styleProp?styleProp(context):styleProp,context=(context&&(path=function(){for(var _len=arguments.length,classnames=new Array(_len),_key=0;_key<_len;_key++)classnames[_key]=arguments[_key];return classnames.filter(function(i){return i}).join(" ")}(path,activeClassName),style=extends_extends({},style,activeStyle)),extends_extends({"aria-current":context&&ariaCurrent||null,className:path,style:style,to:toLocation},rest));return forwardRefShim$1!==forwardRef$1?context.ref=forwardedRef||innerRef:context.innerRef=innerRef,external_React_default().createElement(Link,context)})});function getting_started(){return use_current_css_class('#toplevel_page_blockart a[href="admin.php?page=blockart#/getting-started"]:not(.toplevel_page_blockart)'),React.createElement("div",{className:"blockart-welcome"},React.createElement("div",{className:"blockart-welcome-header"},React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M22 22H2V2h20zM3 21h18V3H3z",fill:"#0369fc"}),React.createElement("path",{d:"M13.46 10l-1.39-5-1.39 5zm.92 3H9.77l-1 4.46V19h6.4v-1.52z",fill:"#005cff",fillRule:"evenodd"})),React.createElement("h2",null,(0,external_wp_i18n_namespaceObject.__)("GETTING STARTED","blockart")),React.createElement("a",{href:_BLOCKART_ADMIN_.adminURL},React.createElement("svg",{width:"11",height:"11",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M12 10.6L3.4 2 2 3.3l8.6 8.6L2 20.4l1.4 1.4 8.6-8.5 8.5 8.5 1.4-1.4-8.5-8.5L22 3.5l-1.4-1.3-8.6 8.4z",fill:"#72777C"})))),React.createElement("div",{className:"blockart-welcome-content"},React.createElement("h2",null,(0,external_wp_i18n_namespaceObject.__)("Welcome to BlockArt","blockart")),React.createElement("p",null,(0,external_wp_i18n_namespaceObject.__)("BlockArt is a collection of Gutenberg blocks that you can use to create posts and pages. Try it by creating a new page or read our documentation to get started.","blockart")),React.createElement("div",{className:"blockart-welcome-content-cta"},React.createElement("a",{className:"blockart-welcome-btn",href:_BLOCKART_ADMIN_.adminURL+"post-new.php?post_type=page&blockart-onboarding=true"},(0,external_wp_i18n_namespaceObject.__)("Create Your First Page","blockart")),React.createElement("a",{className:"blockart-welcome-btn",href:"https://docs.wpblockart.com/",target:"_blank",rel:"noreferrer"},(0,external_wp_i18n_namespaceObject.__)("View Documentation","blockart")))),React.createElement("div",{className:"blockart-welcome-footer"},React.createElement("h2",null,(0,external_wp_i18n_namespaceObject.__)("Need help?","blockart")),React.createElement("p",null,(0,external_wp_i18n_namespaceObject.__)("Our support team is always here to help you out. If you got any queries or confusion regarding BlockArt, please reach us out by clicking the button below:","blockart")),React.createElement("a",{className:"blockart-welcome-btn",href:"https://wpblockart.com/contact/",target:"_blank",rel:"noreferrer"},(0,external_wp_i18n_namespaceObject.__)("Contact Us","blockart"))))}const use_current_css_class=function(selector){(0,external_wp_element_namespaceObject.useEffect)(function(){var _menu$parentElement,menu=document.querySelector(selector);if(menu)return null!=menu&&null!=(_menu$parentElement=menu.parentElement)&&null!=(_menu$parentElement=_menu$parentElement.classList)&&_menu$parentElement.add("current"),function(){var _menu$parentElement2;null!=menu&&null!=(_menu$parentElement2=menu.parentElement)&&null!=(_menu$parentElement2=_menu$parentElement2.classList)&&_menu$parentElement2.remove("current")}},[])};function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function(o,minLen){var n;if(o)return"string"==typeof o?_arrayLikeToArray(o,minLen):"Map"===(n="Object"===(n=Object.prototype.toString.call(o).slice(8,-1))&&o.constructor?o.constructor.name:n)||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}(arr,i)||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.")}()}const external_wp_components_namespaceObject=window.wp.components;const clsx_m=function(){for(var e,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(e=function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}(e))&&(n&&(n+=" "),n+=e);return n},external_ReactDOM_namespaceObject=window.ReactDOM;function react_toastify_esm_extends(){return(react_toastify_esm_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var key,source=arguments[i];for(key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target}).apply(this,arguments)}function react_toastify_esm_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};for(var key,target={},sourceKeys=Object.keys(source),i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function isNum(v){return"number"==typeof v&&!isNaN(v)}function isBool(v){return"boolean"==typeof v}function isStr(v){return"string"==typeof v}function isFn(v){return"function"==typeof v}function parseClassName(v){return isStr(v)||isFn(v)?v:null}function isToastIdValid(toastId){return 0===toastId||toastId}var canUseDom=!("undefined"==typeof window||!window.document||!window.document.createElement);function canBeRendered(content){return(0,external_React_namespaceObject.isValidElement)(content)||isStr(content)||isFn(content)||isNum(content)}var external_wp_apiFetch_namespaceObject={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function cssTransition(_ref){var enter=_ref.enter,exit=_ref.exit,_ref$appendPosition=_ref.appendPosition,appendPosition=void 0!==_ref$appendPosition&&_ref$appendPosition,_ref$appendPosition=_ref.collapse,collapse=void 0===_ref$appendPosition||_ref$appendPosition,_ref$appendPosition=_ref.collapseDuration,collapseDuration=void 0===_ref$appendPosition?300:_ref$appendPosition;return function(_ref2){var children=_ref2.children,position=_ref2.position,preventExitTransition=_ref2.preventExitTransition,done=_ref2.done,nodeRef=_ref2.nodeRef,isIn=_ref2.isIn,enterClassName=appendPosition?enter+"--"+position:enter,exitClassName=appendPosition?exit+"--"+position:exit,baseClassName=(0,external_React_namespaceObject.useRef)(),animationStep=(0,external_React_namespaceObject.useRef)(0);function onEntered(e){e.target===nodeRef.current&&((e=nodeRef.current).dispatchEvent(new Event("d")),e.removeEventListener("animationend",onEntered),e.removeEventListener("animationcancel",onEntered),0===animationStep.current&&(e.className=baseClassName.current))}function onExited(){var node=nodeRef.current;node.removeEventListener("animationend",onExited),collapse?function(node,done,duration){void 0===duration&&(duration=300);var scrollHeight=node.scrollHeight,style=node.style;requestAnimationFrame(function(){style.minHeight="initial",style.height=scrollHeight+"px",style.transition="all "+duration+"ms",requestAnimationFrame(function(){style.height="0",style.padding="0",style.margin="0",setTimeout(done,duration)})})}(node,done,collapseDuration):done()}return(0,external_React_namespaceObject.useLayoutEffect)(function(){var node;node=nodeRef.current,baseClassName.current=node.className,node.className+=" "+enterClassName,node.addEventListener("animationend",onEntered),node.addEventListener("animationcancel",onEntered)},[]),(0,external_React_namespaceObject.useEffect)(function(){var node;isIn||(preventExitTransition?onExited():(animationStep.current=1,(node=nodeRef.current).className+=" "+exitClassName,node.addEventListener("animationend",onExited)))},[isIn]),external_React_default().createElement(external_React_default().Fragment,null,children)}}var eventManager={list:new Map,emitQueue:new Map,on:function(event,callback){return this.list.has(event)||this.list.set(event,[]),this.list.get(event).push(callback),this},off:function(event,callback){var cb;return callback?(cb=this.list.get(event).filter(function(cb){return cb!==callback}),this.list.set(event,cb)):this.list.delete(event),this},cancelEmit:function(event){var timers=this.emitQueue.get(event);return timers&&(timers.forEach(clearTimeout),this.emitQueue.delete(event)),this},emit:function(event){for(var _this=this,_len=arguments.length,args=new Array(1<_len?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];this.list.has(event)&&this.list.get(event).forEach(function(callback){var timer=setTimeout(function(){callback.apply(void 0,args)},0);_this.emitQueue.has(event)||_this.emitQueue.set(event,[]),_this.emitQueue.get(event).push(timer)})}},_excluded=["delay","staleId"];function useToastContainer(props){function isToastActive(id){return-1!==toastIds.indexOf(id)}var forceUpdate=(0,external_React_namespaceObject.useReducer)(function(x){return x+1},0)[1],_useState=(0,external_React_namespaceObject.useState)([]),toastIds=_useState[0],setToastIds=_useState[1],containerRef=(0,external_React_namespaceObject.useRef)(null),toastToRender=(0,external_React_namespaceObject.useRef)(new Map).current,instance=(0,external_React_namespaceObject.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:props,containerId:null,isToastActive:isToastActive,getToast:function(id){return toastToRender.get(id)}}).current;function clearWaitingQueue(_ref){_ref=_ref.containerId;!instance.props.limit||_ref&&instance.containerId!==_ref||(instance.count-=instance.queue.length,instance.queue=[])}function removeToast(toastId){setToastIds(function(state){return isToastIdValid(toastId)?state.filter(function(id){return id!==toastId}):[]})}function dequeueToast(){var _instance$queue$shift=instance.queue.shift();appendToast(_instance$queue$shift.toastContent,_instance$queue$shift.toastProps,_instance$queue$shift.staleId)}function buildToast(content,_ref2){var toastId,data,props,closeToast,isNotAnUpdate,toastProps,updateId,containerAutoClose,toastContent,delay=_ref2.delay,staleId=_ref2.staleId,_ref2=react_toastify_esm_objectWithoutPropertiesLoose(_ref2,_excluded);canBeRendered(content)&&!function(options){return!containerRef.current||instance.props.enableMultiContainer&&options.containerId!==instance.props.containerId||toastToRender.has(options.toastId)&&null==options.updateId}(_ref2)&&(toastId=_ref2.toastId,updateId=_ref2.updateId,data=_ref2.data,props=instance.props,closeToast=function(){return removeToast(toastId)},(isNotAnUpdate=null==updateId)&&instance.count++,toastProps={toastId:toastId,updateId:updateId,isLoading:_ref2.isLoading,theme:_ref2.theme||props.theme,icon:(null!=_ref2.icon?_ref2:props).icon,isIn:!1,key:_ref2.key||instance.toastKey++,type:_ref2.type,closeToast:closeToast,closeButton:_ref2.closeButton,rtl:props.rtl,position:_ref2.position||props.position,transition:_ref2.transition||props.transition,className:parseClassName(_ref2.className||props.toastClassName),bodyClassName:parseClassName(_ref2.bodyClassName||props.bodyClassName),style:_ref2.style||props.toastStyle,bodyStyle:_ref2.bodyStyle||props.bodyStyle,onClick:_ref2.onClick||props.onClick,pauseOnHover:(isBool(_ref2.pauseOnHover)?_ref2:props).pauseOnHover,pauseOnFocusLoss:(isBool(_ref2.pauseOnFocusLoss)?_ref2:props).pauseOnFocusLoss,draggable:(isBool(_ref2.draggable)?_ref2:props).draggable,draggablePercent:_ref2.draggablePercent||props.draggablePercent,draggableDirection:_ref2.draggableDirection||props.draggableDirection,closeOnClick:(isBool(_ref2.closeOnClick)?_ref2:props).closeOnClick,progressClassName:parseClassName(_ref2.progressClassName||props.progressClassName),progressStyle:_ref2.progressStyle||props.progressStyle,autoClose:!_ref2.isLoading&&(updateId=_ref2.autoClose,containerAutoClose=props.autoClose,!1===updateId||isNum(updateId)&&0<updateId?updateId:containerAutoClose),hideProgressBar:(isBool(_ref2.hideProgressBar)?_ref2:props).hideProgressBar,progress:_ref2.progress,role:_ref2.role||props.role,deleteToast:function(){toastToRender.delete(toastId);var queueLen=instance.queue.length;if(instance.count=isToastIdValid(toastId)?instance.count-1:instance.count-instance.displayedToast,instance.count<0&&(instance.count=0),0<queueLen){var freeSlot=isToastIdValid(toastId)?1:instance.props.limit;if(1===queueLen||1===freeSlot)instance.displayedToast++,dequeueToast();else{var toDequeue=queueLen<freeSlot?queueLen:freeSlot;instance.displayedToast=toDequeue;for(var i=0;i<toDequeue;i++)dequeueToast()}}else forceUpdate()}},isFn(_ref2.onOpen)&&(toastProps.onOpen=_ref2.onOpen),isFn(_ref2.onClose)&&(toastProps.onClose=_ref2.onClose),toastProps.closeButton=props.closeButton,!1===_ref2.closeButton||canBeRendered(_ref2.closeButton)?toastProps.closeButton=_ref2.closeButton:!0===_ref2.closeButton&&(toastProps.closeButton=!canBeRendered(props.closeButton)||props.closeButton),toastContent=content,(0,external_React_namespaceObject.isValidElement)(content)&&!isStr(content.type)?toastContent=(0,external_React_namespaceObject.cloneElement)(content,{closeToast:closeToast,toastProps:toastProps,data:data}):isFn(content)&&(toastContent=content({closeToast:closeToast,toastProps:toastProps,data:data})),props.limit&&0<props.limit&&instance.count>props.limit&&isNotAnUpdate?instance.queue.push({toastContent:toastContent,toastProps:toastProps,staleId:staleId}):isNum(delay)&&0<delay?setTimeout(function(){appendToast(toastContent,toastProps,staleId)},delay):appendToast(toastContent,toastProps,staleId))}function appendToast(content,toastProps,staleId){var toastId=toastProps.toastId;staleId&&toastToRender.delete(staleId),toastToRender.set(toastId,{content:content,props:toastProps}),setToastIds(function(state){return[].concat(state,[toastId]).filter(function(id){return id!==staleId})})}return(0,external_React_namespaceObject.useEffect)(function(){return instance.containerId=props.containerId,eventManager.cancelEmit(3).on(0,buildToast).on(1,function(toastId){return containerRef.current&&removeToast(toastId)}).on(5,clearWaitingQueue).emit(2,instance),function(){return eventManager.emit(3,instance)}},[]),(0,external_React_namespaceObject.useEffect)(function(){instance.isToastActive=isToastActive,instance.displayedToast=toastIds.length,eventManager.emit(4,toastIds.length,props.containerId)},[toastIds]),(0,external_React_namespaceObject.useEffect)(function(){instance.props=props}),{getToastToRender:function(cb){var toRender=new Map,collection=Array.from(toastToRender.values());return props.newestOnTop&&collection.reverse(),collection.forEach(function(toast){var position=toast.props.position;toRender.has(position)||toRender.set(position,[]),toRender.get(position).push(toast)}),Array.from(toRender,function(p){return cb(p[0],p[1])})},containerRef:containerRef,isToastActive:isToastActive}}function getX(e){return(e.targetTouches&&1<=e.targetTouches.length?e.targetTouches[0]:e).clientX}function getY(e){return(e.targetTouches&&1<=e.targetTouches.length?e.targetTouches[0]:e).clientY}function useToast(props){var _useState=(0,external_React_namespaceObject.useState)(!1),isRunning=_useState[0],setIsRunning=_useState[1],_useState=(0,external_React_namespaceObject.useState)(!1),preventExitTransition=_useState[0],setPreventExitTransition=_useState[1],toastRef=(0,external_React_namespaceObject.useRef)(null),drag=(0,external_React_namespaceObject.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,syncProps=(0,external_React_namespaceObject.useRef)(props),_useState=props.autoClose,pauseOnHover=props.pauseOnHover,closeToast=props.closeToast,onClick=props.onClick,closeOnClick=props.closeOnClick;function onDragStart(e){var toast;props.draggable&&(drag.didMove=!1,document.addEventListener("mousemove",onDragMove),document.addEventListener("mouseup",onDragEnd),document.addEventListener("touchmove",onDragMove),document.addEventListener("touchend",onDragEnd),toast=toastRef.current,drag.canCloseOnClick=!0,drag.canDrag=!0,drag.boundingRect=toast.getBoundingClientRect(),toast.style.transition="",drag.x=getX(e.nativeEvent),drag.y=getY(e.nativeEvent),"x"===props.draggableDirection?(drag.start=drag.x,drag.removalDistance=toast.offsetWidth*(props.draggablePercent/100)):(drag.start=drag.y,drag.removalDistance=toast.offsetHeight*(80===props.draggablePercent?1.5*props.draggablePercent:props.draggablePercent/100)))}function onDragTransitionEnd(){var top,bottom,left,_drag$boundingRect;drag.boundingRect&&(top=(_drag$boundingRect=drag.boundingRect).top,bottom=_drag$boundingRect.bottom,left=_drag$boundingRect.left,_drag$boundingRect=_drag$boundingRect.right,(props.pauseOnHover&&drag.x>=left&&drag.x<=_drag$boundingRect&&drag.y>=top&&drag.y<=bottom?pauseToast:playToast)())}function playToast(){setIsRunning(!0)}function pauseToast(){setIsRunning(!1)}function onDragMove(e){var toast=toastRef.current;drag.canDrag&&toast&&(drag.didMove=!0,isRunning&&pauseToast(),drag.x=getX(e),drag.y=getY(e),"x"===props.draggableDirection?drag.delta=drag.x-drag.start:drag.delta=drag.y-drag.start,drag.start!==drag.x&&(drag.canCloseOnClick=!1),toast.style.transform="translate"+props.draggableDirection+"("+drag.delta+"px)",toast.style.opacity=""+(1-Math.abs(drag.delta/drag.removalDistance)))}function onDragEnd(){document.removeEventListener("mousemove",onDragMove),document.removeEventListener("mouseup",onDragEnd),document.removeEventListener("touchmove",onDragMove),document.removeEventListener("touchend",onDragEnd);var toast=toastRef.current;drag.canDrag&&drag.didMove&&toast&&(drag.canDrag=!1,Math.abs(drag.delta)>drag.removalDistance?(setPreventExitTransition(!0),props.closeToast()):(toast.style.transition="transform 0.2s, opacity 0.2s",toast.style.transform="translate"+props.draggableDirection+"(0)",toast.style.opacity="1"))}(0,external_React_namespaceObject.useEffect)(function(){syncProps.current=props}),(0,external_React_namespaceObject.useEffect)(function(){return toastRef.current&&toastRef.current.addEventListener("d",playToast,{once:!0}),isFn(props.onOpen)&&props.onOpen((0,external_React_namespaceObject.isValidElement)(props.children)&&props.children.props),function(){var props=syncProps.current;isFn(props.onClose)&&props.onClose((0,external_React_namespaceObject.isValidElement)(props.children)&&props.children.props)}},[]),(0,external_React_namespaceObject.useEffect)(function(){props.pauseOnFocusLoss&&(document.hasFocus()||pauseToast(),window.addEventListener("focus",playToast),window.addEventListener("blur",pauseToast));return function(){props.pauseOnFocusLoss&&(window.removeEventListener("focus",playToast),window.removeEventListener("blur",pauseToast))}},[props.pauseOnFocusLoss]);var eventHandlers={onMouseDown:onDragStart,onTouchStart:onDragStart,onMouseUp:onDragTransitionEnd,onTouchEnd:onDragTransitionEnd};return _useState&&pauseOnHover&&(eventHandlers.onMouseEnter=pauseToast,eventHandlers.onMouseLeave=playToast),closeOnClick&&(eventHandlers.onClick=function(e){onClick&&onClick(e),drag.canCloseOnClick&&closeToast()}),{playToast:playToast,pauseToast:pauseToast,isRunning:isRunning,preventExitTransition:preventExitTransition,toastRef:toastRef,eventHandlers:eventHandlers}}function CloseButton(_ref){var closeToast=_ref.closeToast,theme=_ref.theme,_ref=_ref.ariaLabel,_ref=void 0===_ref?"close":_ref;return(0,external_React_namespaceObject.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+theme,type:"button",onClick:function(e){e.stopPropagation(),closeToast(e)},"aria-label":_ref},(0,external_React_namespaceObject.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,external_React_namespaceObject.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function ProgressBar(_ref){var delay=_ref.delay,isRunning=_ref.isRunning,closeToast=_ref.closeToast,type=_ref.type,hide=_ref.hide,className=_ref.className,userStyle=_ref.style,controlledProgress=_ref.controlledProgress,progress=_ref.progress,rtl=_ref.rtl,isIn=_ref.isIn,_ref=_ref.theme,userStyle=react_toastify_esm_extends({},userStyle,{animationDuration:delay+"ms",animationPlayState:isRunning?"running":"paused",opacity:hide?0:1}),isRunning=(controlledProgress&&(userStyle.transform="scaleX("+progress+")"),clsx_m("Toastify__progress-bar",controlledProgress?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+_ref,"Toastify__progress-bar--"+type,((delay={})["Toastify__progress-bar--rtl"]=rtl,delay))),_ref=isFn(className)?className({rtl:rtl,type:type,defaultClassName:isRunning}):clsx_m(isRunning,className),rtl=((delay={})[controlledProgress&&1<=progress?"onTransitionEnd":"onAnimationEnd"]=controlledProgress&&progress<1?null:function(){isIn&&closeToast()},delay);return(0,external_React_namespaceObject.createElement)("div",Object.assign({role:"progressbar","aria-hidden":hide?"true":"false","aria-label":"notification timer",className:_ref,style:userStyle},rtl))}ProgressBar.defaultProps={type:TYPE.DEFAULT,hide:!1};function Svg(_ref){var theme=_ref.theme,type=_ref.type,_ref=react_toastify_esm_objectWithoutPropertiesLoose(_ref,_excluded$1);return(0,external_React_namespaceObject.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===theme?"currentColor":"var(--toastify-icon-color-"+type+")"},_ref))}var _excluded$1=["theme","type"];function Toast(props){var isRunning=(_useToast=useToast(props)).isRunning,preventExitTransition=_useToast.preventExitTransition,toastRef=_useToast.toastRef,_useToast=_useToast.eventHandlers,closeButton=props.closeButton,children=props.children,autoClose=props.autoClose,onClick=props.onClick,type=props.type,hideProgressBar=props.hideProgressBar,closeToast=props.closeToast,Transition=props.transition,position=props.position,className=props.className,style=props.style,bodyClassName=props.bodyClassName,bodyStyle=props.bodyStyle,progressClassName=props.progressClassName,progressStyle=props.progressStyle,updateId=props.updateId,role=props.role,progress=props.progress,rtl=props.rtl,toastId=props.toastId,deleteToast=props.deleteToast,isIn=props.isIn,isLoading=props.isLoading,icon=props.icon,theme=props.theme,props=clsx_m("Toastify__toast","Toastify__toast-theme--"+theme,"Toastify__toast--"+type,((props={})["Toastify__toast--rtl"]=rtl,props)),props=isFn(className)?className({rtl:rtl,position:position,type:type,defaultClassName:props}):clsx_m(props,className),className=!!progress,maybeIcon=Icons[type],iconProps={theme:theme,type:type},maybeIcon=maybeIcon&&maybeIcon(iconProps);return!1===icon?maybeIcon=void 0:isFn(icon)?maybeIcon=icon(iconProps):(0,external_React_namespaceObject.isValidElement)(icon)?maybeIcon=(0,external_React_namespaceObject.cloneElement)(icon,iconProps):isStr(icon)?maybeIcon=icon:isLoading&&(maybeIcon=Icons.spinner()),(0,external_React_namespaceObject.createElement)(Transition,{isIn:isIn,done:deleteToast,position:position,preventExitTransition:preventExitTransition,nodeRef:toastRef},(0,external_React_namespaceObject.createElement)("div",Object.assign({id:toastId,onClick:onClick,className:props},_useToast,{style:style,ref:toastRef}),(0,external_React_namespaceObject.createElement)("div",Object.assign({},isIn&&{role:role},{className:isFn(bodyClassName)?bodyClassName({type:type}):clsx_m("Toastify__toast-body",bodyClassName),style:bodyStyle}),maybeIcon&&(0,external_React_namespaceObject.createElement)("div",{className:clsx_m("Toastify__toast-icon",((iconProps={})["Toastify--animate-icon Toastify__zoom-enter"]=!isLoading,iconProps))},maybeIcon),(0,external_React_namespaceObject.createElement)("div",null,children)),function(closeButton){var props;if(closeButton)return props={closeToast:closeToast,type:type,theme:theme},isFn(closeButton)?closeButton(props):(0,external_React_namespaceObject.isValidElement)(closeButton)?(0,external_React_namespaceObject.cloneElement)(closeButton,props):void 0}(closeButton),(autoClose||className)&&(0,external_React_namespaceObject.createElement)(ProgressBar,Object.assign({},updateId&&!className?{key:"pb-"+updateId}:{},{rtl:rtl,theme:theme,delay:autoClose,isRunning:isRunning,isIn:isIn,closeToast:closeToast,hide:hideProgressBar,type:type,style:progressStyle,className:progressClassName,controlledProgress:className,progress:progress}))))}var latestInstance,containerDomNode,containerConfig,Icons={info:function(props){return(0,external_React_namespaceObject.createElement)(Svg,Object.assign({},props),(0,external_React_namespaceObject.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(props){return(0,external_React_namespaceObject.createElement)(Svg,Object.assign({},props),(0,external_React_namespaceObject.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(props){return(0,external_React_namespaceObject.createElement)(Svg,Object.assign({},props),(0,external_React_namespaceObject.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(props){return(0,external_React_namespaceObject.createElement)(Svg,Object.assign({},props),(0,external_React_namespaceObject.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return(0,external_React_namespaceObject.createElement)("div",{className:"Toastify__spinner"})}},Slide=cssTransition({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),ToastContainer=function(props){var _useToastContainer=useToastContainer(props),getToastToRender=_useToastContainer.getToastToRender,containerRef=_useToastContainer.containerRef,isToastActive=_useToastContainer.isToastActive,className=props.className,style=props.style,rtl=props.rtl,_useToastContainer=props.containerId;return(0,external_React_namespaceObject.createElement)("div",{ref:containerRef,className:"Toastify",id:_useToastContainer},getToastToRender(function(position,toastList){var containerStyle=toastList.length?react_toastify_esm_extends({},style):react_toastify_esm_extends({},style,{pointerEvents:"none"});return(0,external_React_namespaceObject.createElement)("div",{className:function(position){var _cx=clsx_m("Toastify__toast-container","Toastify__toast-container--"+position,((_cx={})["Toastify__toast-container--rtl"]=rtl,_cx));return isFn(className)?className({position:position,rtl:rtl,defaultClassName:_cx}):clsx_m(_cx,parseClassName(className))}(position),style:containerStyle,key:"container-"+position},toastList.map(function(_ref){var content=_ref.content,_ref=_ref.props;return(0,external_React_namespaceObject.createElement)(Toast,Object.assign({},_ref,{isIn:isToastActive(_ref.toastId),key:"toast-"+_ref.key,closeButton:!0===_ref.closeButton?CloseButton:_ref.closeButton}),content)}))}))},containers=(ToastContainer.defaultProps={position:external_wp_apiFetch_namespaceObject.TOP_RIGHT,transition:cssTransition({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:CloseButton,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"},new Map),queue=[],lazy=!1;function generateToastId(){return Math.random().toString(36).substring(2,9)}function dispatchToast(content,options){return 0<containers.size?eventManager.emit(0,content,options):(queue.push({content:content,options:options}),lazy&&canUseDom&&(lazy=!1,containerDomNode=document.createElement("div"),document.body.appendChild(containerDomNode),(0,external_ReactDOM_namespaceObject.render)((0,external_React_namespaceObject.createElement)(ToastContainer,Object.assign({},containerConfig)),containerDomNode))),options.toastId}function mergeOptions(type,options){return react_toastify_esm_extends({},options,{type:options&&options.type||type,toastId:function(options){return options&&(isStr(options.toastId)||isNum(options.toastId))?options.toastId:generateToastId()}(options)})}function createToastByType(type){return function(content,options){return dispatchToast(content,mergeOptions(type,options))}}function toast(content,options){return dispatchToast(content,mergeOptions(TYPE.DEFAULT,options))}function ownKeys(object,enumerableOnly){var symbols,keys=Object.keys(object);return Object.getOwnPropertySymbols&&(symbols=Object.getOwnPropertySymbols(object),enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)),keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){!function(obj,key,value){key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}toast.loading=function(content,options){return dispatchToast(content,mergeOptions(TYPE.DEFAULT,react_toastify_esm_extends({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},options)))},toast.promise=function(promise,_ref2,options){function resolver(type,input,result){if(null!=input)return type=react_toastify_esm_extends({type:type},resetParams,options,{data:result}),input=isStr(input)?{render:input}:input,id?toast.update(id,react_toastify_esm_extends({},type,input)):toast(input.render,react_toastify_esm_extends({},type,input)),result;toast.dismiss(id)}var id,pending=_ref2.pending,error=_ref2.error,success=_ref2.success,resetParams=(pending&&(id=isStr(pending)?toast.loading(pending,options):toast.loading(pending.render,react_toastify_esm_extends({},options,pending))),{isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null});return(_ref2=isFn(promise)?promise():promise).then(function(result){return resolver("success",success,result)}).catch(function(err){return resolver("error",error,err)}),_ref2},toast.success=createToastByType(TYPE.SUCCESS),toast.info=createToastByType(TYPE.INFO),toast.error=createToastByType(TYPE.ERROR),toast.warning=createToastByType(TYPE.WARNING),toast.warn=toast.warning,toast.dark=function(content,options){return dispatchToast(content,mergeOptions(TYPE.DEFAULT,react_toastify_esm_extends({theme:"dark"},options)))},toast.dismiss=function(id){return eventManager.emit(1,id)},toast.clearWaitingQueue=function(params){return eventManager.emit(5,params=void 0===params?{}:params)},toast.isActive=function(id){var isToastActive=!1;return containers.forEach(function(container){container.isToastActive&&container.isToastActive(id)&&(isToastActive=!0)}),isToastActive},toast.update=function(toastId,options){void 0===options&&(options={}),setTimeout(function(){var oldOptions,toast=function(toastId,_ref){return _ref=_ref.containerId,(_ref=containers.get(_ref||latestInstance))?_ref.getToast(toastId):null}(toastId,options);toast&&(oldOptions=toast.props,toast=toast.content,(oldOptions=react_toastify_esm_extends({},oldOptions,options,{toastId:options.toastId||toastId,updateId:generateToastId()})).toastId!==toastId&&(oldOptions.staleId=toastId),toast=oldOptions.render||toast,delete oldOptions.render,dispatchToast(toast,oldOptions))},0)},toast.done=function(id){toast.update(id,{progress:1})},toast.onChange=function(callback){return isFn(callback)&&eventManager.on(4,callback),function(){isFn(callback)&&eventManager.off(4,callback)}},toast.configure=function(config){lazy=!0,containerConfig=config=void 0===config?{}:config},toast.POSITION=external_wp_apiFetch_namespaceObject,toast.TYPE=TYPE,eventManager.on(2,function(containerInstance){latestInstance=containerInstance.containerId||containerInstance,containers.set(latestInstance,containerInstance),queue.forEach(function(item){eventManager.emit(0,item.content,item.options)}),queue=[]}).on(3,function(containerInstance){containers.delete(containerInstance.containerId||containerInstance),0===containers.size&&eventManager.off(0).off(1).off(5),canUseDom&&containerDomNode&&document.body.removeChild(containerDomNode)});function settings(){var _useState2=_slicedToArray((0,external_wp_element_namespaceObject.useState)({isSaving:!1,dynamicCSSPrintMethod:_BLOCKART_ADMIN_.cssPrintMethod||"inline"}),2),_useState2$=_useState2[0],isSaving=_useState2$.isSaving,dynamicCSSPrintMethod=_useState2$.dynamicCSSPrintMethod,setState=_useState2[1],toastOptions=(use_current_css_class('#toplevel_page_blockart a[href="admin.php?page=blockart#/settings"]'),{position:toast.POSITION.BOTTOM_CENTER,pauseOnHover:!1,hideProgressBar:!0,autoClose:3e3,transition:Slide});return React.createElement("div",{className:"blockart-settings"},React.createElement("div",{className:"blockart-settings-header"},React.createElement("div",{className:"blockart-settings-container"},React.createElement("div",{className:"blockart-settings-logo"},React.createElement(external_wp_components_namespaceObject.Icon,{className:"blockart-settings-icon",size:50,icon:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M22,22H2V2H22ZM3,21H21V3H3Z",style:{fill:"#0369fc"}}),React.createElement("path",{d:"M13.46,10,12.07,5l-1.39,5Zm.92,3H9.77l-1,4.46V19h6.4V17.48Z",style:{fill:"#005cff",fillRule:"evenodd"}}))})),React.createElement("div",{className:"blockart-settings-nav"},React.createElement(NavLink,{to:"/settings",activeClassName:"is-active"},React.createElement(external_wp_components_namespaceObject.Icon,{className:"blockart-settings-icon",icon:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M12 16c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"}),React.createElement("path",{d:"M2.8 16.1l1 1.7c.5.9 1.8 1.3 2.7.7l.5-.3c.6.5 1.2.8 1.9 1.1v.7c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2v-.6c.7-.3 1.3-.7 1.9-1.1l.5.3c.9.5 2.2.2 2.7-.7l1-1.7c.6-1 .2-2.2-.7-2.7l-.5-.3c.1-.7.1-1.5 0-2.2l.5-.3c1-.6 1.3-1.8.7-2.7l-1-1.7c-.5-.9-1.8-1.3-2.7-.7l-.5.3c-.6-.5-1.2-.8-1.9-1.1V4c0-1.1-.9-2-2-2h-2C9.9 2 9 2.9 9 4v.6c-.7.3-1.3.7-1.9 1.1l-.5-.3c-.9-.5-2.2-.2-2.8.7l-1 1.7c-.6 1-.2 2.2.7 2.7l.5.3c-.1.7-.1 1.5 0 2.2l-.5.3c-.9.7-1.2 1.9-.7 2.8zm3.4-2.7c-.1-.5-.2-.9-.2-1.4 0-.5.1-.9.2-1.4.1-.4-.1-.9-.5-1.1l-1.1-.6 1-1.7 1.1.7c.4.1.9.1 1.2-.2.7-.7 1.5-1.2 2.4-1.4.4-.1.7-.5.7-1V4h2v1.3c0 .4.3.8.7 1 .9.3 1.7.8 2.4 1.4.3.3.8.3 1.2.1l1.1-.7 1 1.7-1.1.6c-.4.2-.6.7-.5 1.1.1.5.2.9.2 1.4 0 .5-.1.9-.2 1.4-.1.4.1.9.5 1.1l1.1.6-1 1.7-1.1-.7c-.4-.2-.9-.2-1.2.1-.7.6-1.5 1.1-2.4 1.4-.4.1-.7.5-.7 1v1.3h-2v-1.3c0-.4-.3-.8-.7-1-.9-.3-1.7-.8-2.4-1.4-.3-.1-.8-.1-1.2.1l-1.1.7-1-1.7 1.1-.7c.4-.2.6-.7.5-1.1z"}))}),React.createElement(external_wp_components_namespaceObject.Icon,{type:"controlIcon",name:"cog"}),(0,external_wp_i18n_namespaceObject.__)("Settings","blockart"))))),React.createElement("div",{className:"blockart-settings-content"},React.createElement("div",{className:"blockart-settings-container"},React.createElement("label",{htmlFor:"blockart-dynamic-css-print-method"},(0,external_wp_i18n_namespaceObject.__)("Dynamic CSS print method","blockart")),React.createElement("select",{name:"blockart-dynamic-css-print-method",id:"blockart-dynamic-css-print-method",defaultValue:dynamicCSSPrintMethod,onChange:function(e){return setState(function(prev){return _objectSpread(_objectSpread({},prev),{},{dynamicCSSPrintMethod:e.target.value})})}},React.createElement("option",{value:"internal-css"},(0,external_wp_i18n_namespaceObject.__)("Internal CSS","blockart")),React.createElement("option",{value:"external-css-file"},(0,external_wp_i18n_namespaceObject.__)("External CSS File","blockart"))),React.createElement("button",{className:"blockart-settings-save",disabled:isSaving,onClick:function(){setState(function(prev){return _objectSpread(_objectSpread({},prev),{},{isSaving:!0})}),external_wp_apiFetch_default()({path:"wp/v2/settings",method:"PUT",body:JSON.stringify({_blockart_dynamic_css_print_method:dynamicCSSPrintMethod})}).then(function(){toast.success((0,external_wp_i18n_namespaceObject.__)("Settings saved successfully!","blockart"),toastOptions)}).catch(function(e){toast.error("".concat(e.code,": ").concat(e.message),toastOptions)}).finally(function(){setState(function(prev){return _objectSpread(_objectSpread({},prev),{},{isSaving:!1})})})}},isSaving&&React.createElement(external_wp_components_namespaceObject.Spinner,null),React.createElement("span",{className:"blockart-settings-save-text"},(0,external_wp_i18n_namespaceObject.__)("Save Settings","blockart"))),React.createElement(ToastContainer,null))))}function app(){return(0,external_wp_element_namespaceObject.useEffect)(function(){var _menu$classList,menu=document.querySelector('#toplevel_page_blockart a[href="admin.php?page=blockart#/settings"].menu-top');menu&&(null!=menu&&null!=(_menu$classList=menu.classList)&&_menu$classList.contains("wp-not-current-submenu")&&(menu.classList.remove("wp-not-current-submenu"),menu.classList.add("wp-has-current-submenu"),menu.classList.add("wp-menu-open"),menu.setAttribute("aria-haspop","false")),null!=menu&&null!=(_menu$classList=menu.parentElement)&&null!=(_menu$classList=_menu$classList.classList)&&_menu$classList.contains("wp-not-current-submenu")&&(menu.parentElement.classList.remove("wp-not-current-submenu"),menu.parentElement.classList.add("wp-has-current-submenu"),menu.parentElement.classList.add("wp-menu-open")))},[]),(0,external_wp_element_namespaceObject.useEffect)(function(){var el=document.querySelector("a.blockart-rating-link");if(null!==el&&!_BLOCKART_ADMIN_.isRated)return el.addEventListener("click",set_rating),function(){el.removeEventListener("click",set_rating)}},[]),React.createElement(HashRouter,null,React.createElement(Switch,null,React.createElement(Route,{path:"/getting-started",component:getting_started,exact:!0}),React.createElement(Route,{path:"/settings",component:settings,exact:!0})))}external_wp_apiFetch_namespaceObject=document.getElementById("blockart");external_wp_apiFetch_namespaceObject&&(0,external_wp_element_namespaceObject.render)(React.createElement(app,null),external_wp_apiFetch_namespaceObject)})()})(); |