/*! For license information please see main.859d152e.js.LICENSE.txt */
(()=>{var e={918:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},9589:(e,t,n)=>{"use strict";t.__esModule=!0;var r=n(5043),o=(s(r),s(n(5173))),i=s(n(7668));s(n(6440));function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=1073741823;t.default=function(e,t){var n,s,d="__create-react-context-"+(0,i.default)()+"__",h=function(e){function n(){var t,r;a(this,n);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=r=l(this,e.call.apply(e,[this].concat(i))),r.emitter=function(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}(r.props.value),l(r,t)}return c(n,e),n.prototype.getChildContext=function(){var e;return(e={})[d]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,r=e.value,o=void 0;!function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}(n,r)?(o="function"===typeof t?t(n,r):u,0!==(o|=0)&&this.emitter.set(e.value,o)):o=0}},n.prototype.render=function(){return this.props.children},n}(r.Component);h.childContextTypes=((n={})[d]=o.default.object.isRequired,n);var p=function(t){function n(){var e,r;a(this,n);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return e=r=l(this,t.call.apply(t,[this].concat(i))),r.state={value:r.getValue()},r.onUpdate=function(e,t){0!==((0|r.observedBits)&t)&&r.setState({value:r.getValue()})},l(r,e)}return c(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?u:t},n.prototype.componentDidMount=function(){this.context[d]&&this.context[d].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?u:e},n.prototype.componentWillUnmount=function(){this.context[d]&&this.context[d].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[d]?this.context[d].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return p.contextTypes=((s={})[d]=o.default.object,s),{Provider:h,Consumer:p}},e.exports=t.default},6947:(e,t,n)=>{"use strict";t.__esModule=!0;var r=i(n(5043)),o=i(n(9589));function i(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||o.default,e.exports=t.default},4371:(e,t,n)=>{"use strict";var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5043),s=(r=i)&&r.__esModule?r:{default:r};t.A=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,i=void 0===r?24:r,a=e.height,l=void 0===a?24:a,c=e.style,u=void 0===c?{}:c,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return s.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:i,height:l},u)},d),s.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},9128:(e,t,n)=>{"use strict";var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5043),s=(r=i)&&r.__esModule?r:{default:r};t.A=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,i=void 0===r?24:r,a=e.height,l=void 0===a?24:a,c=e.style,u=void 0===c?{}:c,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return s.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:n,width:i,height:l},u)},d),s.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},6995:e=>{"use strict";function t(){return null}function n(){return t}t.isRequired=t,e.exports={and:n,between:n,booleanSome:n,childrenHavePropXorChildren:n,childrenOf:n,childrenOfType:n,childrenSequenceOf:n,componentWithName:n,disallowedIf:n,elementType:n,empty:n,explicitNull:n,forbidExtraProps:Object,integer:n,keysOf:n,mutuallyExclusiveProps:n,mutuallyExclusiveTrueProps:n,nChildren:n,nonNegativeInteger:t,nonNegativeNumber:n,numericString:n,object:n,or:n,predicate:n,range:n,ref:n,requiredBy:n,restrictedProp:n,sequenceOf:n,shape:n,stringEndsWith:n,stringStartsWith:n,uniqueArray:n,uniqueArrayOf:n,valuesOf:n,withShape:n}},9156:(e,t,n)=>{e.exports=n(6995)},3717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9558);t.default=function(e){var t=[];return{files:t,variables:function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Array.isArray(n)?n:Object.assign({},n);return Object.keys(i).forEach((function(n){var s=i[n],a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o),[n]).join(".");if((0,r.isUploadFile)(s)||(0,r.isFileList)(s)){var l=(0,r.isFileList)(s)?Array.prototype.slice.call(s):s;t.push({file:l,name:a}),i[n]=a}else(0,r.isObject)(s)&&(i[n]=e(s,a))})),i}(e)}}},7165:(e,t,n)=>{"use strict";t.d=void 0;var r=n(9558);var o=n(5637),i=n(1644),s=l(n(7544)),a=l(n(3717));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var t=e.uri,n=e.headers,l=e.fetch,c=e.credentials;return new o.ApolloLink((function(e,u){if("undefined"!==typeof FormData&&(0,r.isObject)(e.variables)){var d=(0,a.default)(e.variables),h=d.variables,p=d.files;if(p.length>0){var f=e.getContext(),m=f.headers,g=new FormData;g.append("query",(0,i.print)(e.query)),g.append("variables",JSON.stringify(h)),p.forEach((function(e){var t=e.name,n=e.file;return g.append(t,n)}));var v={method:"POST",headers:Object.assign({},m,n),body:g,credentials:c};if(v=Object.assign(f.fetchOptions||{},v),l)return new o.Observable((function(n){l(t,v).then((function(t){return e.setContext({response:t}),t})).then((0,o.parseAndCheckHttpResponse)(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e)}))}));var y="include"===c;return(0,s.default)({uri:t,body:g,headers:Object.assign({},m,n),withCredentials:y,crossDomain:y})}}return u(e)}))};t.d=function(e){return(0,o.concat)(c(e),new o.HttpLink(e))}},7544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6699),o=n(5079);t.default=function(e){return(0,r.ajax)({url:e.uri,body:e.body,method:"POST",headers:e.headers,withCredentials:e.withCredentials,crossDomain:e.crossDomain}).pipe((0,o.map)((function(e){return e.response})))}},9558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isObject=function(e){return null!==e&&"object"===("undefined"===typeof e?"undefined":n(e))},t.isFileList=function(e){return"undefined"!==typeof FileList&&e instanceof FileList},t.isUploadFile=function(e){return"undefined"!==typeof File&&e instanceof File||"undefined"!==typeof Blob&&e instanceof Blob||e instanceof r};var r=t.ReactNativeFile=function e(t){var n=t.uri,r=t.type,o=t.name;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.uri=n,this.type=r,this.name=o};r.list=function(e){return e.map((function(e){return new r(e)}))}},9814:(e,t,n)=>{"use strict";function r(e){i.length||(o(),!0),i[i.length]=e}e.exports=r;var o,i=[],s=0;function a(){for(;s<i.length;){var e=s;if(s+=1,i[e].call(),s>1024){for(var t=0,n=i.length-s;t<n;t++)i[t]=i[t+s];i.length-=s,s=0}}i.length=0,s=0,!1}var l="undefined"!==typeof n.g?n.g:self,c=l.MutationObserver||l.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}o="function"===typeof c?function(e){var t=1,n=new c(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(a):u(a),r.requestFlush=o,r.makeRequestCallFromTimer=u},2028:(e,t,n)=>{"use strict";var r=n(2),o=n(1712),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&i(e,".prototype.")>-1?o(n):n}},1712:(e,t,n)=>{"use strict";var r=n(3864),o=n(2),i=n(5438),s=n(2521),a=o("%Function.prototype.apply%"),l=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(l,a),u=n(2090),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new s("a function is required");var t=c(r,l,arguments);return i(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},6590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addEventListener:()=>c});var r=!("undefined"===typeof window||!window.document||!window.document.createElement);var o=void 0;function i(){return void 0===o&&(o=function(){if(!r)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(o){}return e}()),o}function s(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function a(e){this.target=e,this.events={}}a.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(0|n.capture)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},a.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},a.prototype.add=function(e,t,n){var r=this,o=this.getEventHandlers(e,n);s(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,o.handleEvent,n)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,s(o);var a=o.nextHandlers.indexOf(t);o.nextHandlers.splice(a,1),0===o.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,o.handleEvent,n),o.handleEvent=void 0)}}};var l="__consolidated_events_handlers__";function c(e,t,n,r){e[l]||(e[l]=new a(e));var o=function(e){if(e)return i()?e:!!e.capture}(r);return e[l].add(t,n,o)}},8287:(e,t,n)=>{var r=n(2678),o=n(8317),i=n(2702),s=n(3290),a=n(2488),l=n(3913),c=Date.prototype.getTime;function u(e,t,n){var p=n||{};return!!(p.strict?i(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?p.strict?i(e,t):e==t:function(e,t,n){var i,p;if(typeof e!==typeof t)return!1;if(d(e)||d(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e)!==o(t))return!1;var f=s(e),m=s(t);if(f!==m)return!1;if(f||m)return e.source===t.source&&a(e)===a(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var g=h(e),v=h(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}if(typeof e!==typeof t)return!1;try{var y=r(e),b=r(t)}catch(x){return!1}if(y.length!==b.length)return!1;for(y.sort(),b.sort(),i=y.length-1;i>=0;i--)if(y[i]!=b[i])return!1;for(i=y.length-1;i>=0;i--)if(!u(e[p=y[i]],t[p],n))return!1;return!0}(e,t,p))}function d(e){return null===e||void 0===e}function h(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=u},4992:(e,t,n)=>{"use strict";var r=n(2090),o=n(2557),i=n(2521),s=n(5558);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new i("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!s&&s(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===a&&d?d.enumerable:!a,value:n,writable:null===l&&d?d.writable:!l});else{if(!u&&(a||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1779:(e,t,n)=>{"use strict";var r=n(2678),o="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=n(4992),l=n(2101)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!==typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;l?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],n[i[a]])};u.supportsDescriptors=!!l,e.exports=u},6836:e=>{"use strict";e.exports=function(e){if(arguments.length<1)throw new TypeError("1 argument is required");if("object"!==typeof e)throw new TypeError("Argument 1 (\u201dother\u201c) to Node.contains must be an instance of Node");var t=e;do{if(this===t)return!0;t&&(t=t.parentNode)}while(t);return!1}},4208:(e,t,n)=>{"use strict";var r=n(1779),o=n(6836),i=n(5009),s=i(),a=function(e,t){return s.apply(e,[t])};r(a,{getPolyfill:i,implementation:o,shim:n(8607)}),e.exports=a},5009:(e,t,n)=>{"use strict";var r=n(6836);e.exports=function(){if("undefined"!==typeof document){if(document.contains)return document.contains;if(document.body&&document.body.contains)try{if("boolean"===typeof document.body.contains.call(document,""))return document.body.contains}catch(e){}}return r}},8607:(e,t,n)=>{"use strict";var r=n(1779),o=n(5009);e.exports=function(){var e=o();return"undefined"!==typeof document&&(r(document,{contains:e},{contains:function(){return document.contains!==e}}),"undefined"!==typeof Element&&r(Element.prototype,{contains:e},{contains:function(){return Element.prototype.contains!==e}})),e}},9066:(e,t,n)=>{"use strict";var r=n(4994);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(4483));e.exports=t.default},4483:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},6403:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"===typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},2090:(e,t,n)=>{"use strict";var r=n(2)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},9820:e=>{"use strict";e.exports=EvalError},9304:e=>{"use strict";e.exports=Error},1725:e=>{"use strict";e.exports=RangeError},5077:e=>{"use strict";e.exports=ReferenceError},2557:e=>{"use strict";e.exports=SyntaxError},2521:e=>{"use strict";e.exports=TypeError},713:e=>{"use strict";e.exports=URIError},3240:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"===typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(f&&o&&(s(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&s(r)?r:{},a(d,{name:n,newValue:e(f,u,o)})):"undefined"!==typeof o&&a(d,{name:n,newValue:o}));return d}},2450:function(e,t,n){var r,o,i;o=[],void 0===(i="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,n){var a=s.URL||s.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):o(l.href)?r(e,t,n):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,s){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,s),n);else if(o(e))r(e,n,s);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var i="application/octet-stream"===e.type,l=/constructor/i.test(s.HTMLElement)||s.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&l||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(e)}else{var d=s.URL||s.webkitURL,h=d.createObjectURL(e);o?o.location=h:location.href=h,o=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});s.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,o):r)||(e.exports=i)},7724:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!==typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n}(arguments,1),a=n(0,o.length-s.length),l=[],c=0;c<a;c++)l[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(l,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(s,arguments));return Object(t)===t?t:this}return o.apply(e,r(s,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},3864:(e,t,n)=>{"use strict";var r=n(7724);e.exports=Function.prototype.bind||r},7699:e=>{"use strict";var t=function(){return"string"===typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(o){n=null}t.functionsHaveConfigurableNames=function(){if(!t()||!n)return!1;var e=n((function(){}),"name");return!!e&&!!e.configurable};var r=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"===typeof r&&""!==function(){}.bind().name},e.exports=t},2:(e,t,n)=>{"use strict";var r,o=n(9304),i=n(9820),s=n(1725),a=n(5077),l=n(2557),c=n(2521),u=n(713),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(P){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,g=n(2108)(),v=n(951)(),y=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),b={},x="undefined"!==typeof Uint8Array&&y?y(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&y?y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":b,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&y?y(y([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&g&&y?y((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&g&&y?y((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&y?y(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":x,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(y)try{null.error}catch(P){var S=y(y(P));w["%Error.prototype%"]=S}var C=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&y&&(n=y(o.prototype))}return w[t]=n,n},j={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=n(3864),k=n(4384),N=_.call(Function.call,Array.prototype.concat),E=_.call(Function.apply,Array.prototype.splice),T=_.call(Function.call,String.prototype.replace),O=_.call(Function.call,String.prototype.slice),I=_.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,M=function(e,t){var n,r=e;if(k(j,r)&&(r="%"+(n=j[r])[0]+"%"),k(w,r)){var o=w[r];if(o===b&&(o=C(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=O(e,0,1),n=O(e,-1);if("%"===t&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return T(e,R,(function(e,t,n,o){r[r.length]=n?T(o,A,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=M("%"+r+"%",t),i=o.name,s=o.value,a=!1,u=o.alias;u&&(r=u[0],E(n,N([0,1],u)));for(var d=1,h=!0;d<n.length;d+=1){var f=n[d],m=O(f,0,1),g=O(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==f&&h||(a=!0),k(w,i="%"+(r+="."+f)+"%"))s=w[i];else if(null!=s){if(!(f in s)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&d+1>=n.length){var v=p(s,f);s=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:s[f]}else h=k(s,f),s=s[f];h&&!a&&(w[i]=s)}}return s}},5558:(e,t,n)=>{"use strict";var r=n(2)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},5859:(e,t,n)=>{"use strict";n.d(t,{qj:()=>ae,gi:()=>ie,VC:()=>se,J1:()=>re,Nh:()=>oe});var r=n(6326);function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}"function"===typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"===typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var i="function"===typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function s(e,t){for(var n,r=/\r\n|[\n\r]/g,o=1,i=t+1;(n=r.exec(e.body))&&n.index<t;)o+=1,i=t+1-(n.index+n[0].length);return{line:o,column:i}}function a(e){return l(e.source,s(e.source,e.start))}function l(e,t){var n=e.locationOffset.column-1,r=u(n)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?n:0,l=t.column+a,d="".concat(e.name,":").concat(s,":").concat(l,"\n"),h=r.split(/\r\n|[\n\r]/g),p=h[o];if(p.length>120){for(var f=Math.floor(l/80),m=l%80,g=[],v=0;v<p.length;v+=80)g.push(p.slice(v,v+80));return d+c([["".concat(s),g[0]]].concat(g.slice(1,f+1).map((function(e){return["",e]})),[[" ",u(m-1)+"^"],["",g[f+1]]]))}return d+c([["".concat(s-1),h[o-1]],["".concat(s),p],["",u(l-1)+"^"],["".concat(s+1),h[o+1]]])}function c(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],o=e[1];return u(n-(t=r).length)+t+(o?" | "+o:" |")})).join("\n")}function u(e){return Array(e+1).join(" ")}function d(e){return d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return!t||"object"!==d(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){var t="function"===typeof Map?new Map:void 0;return v=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return y(e,arguments,w(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),x(r,e)},v(e)}function y(e,t,n){return y=b()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&x(o,n.prototype),o},y.apply(null,arguments)}function b(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(u,e);var t,n,r,c=function(e){var t=b();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}(u);function u(e,t,n,r,i,a,l){var d,f,v,y;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(y=c.call(this,e)).name="GraphQLError",y.originalError=null!==a&&void 0!==a?a:void 0,y.nodes=C(Array.isArray(t)?t:t?[t]:void 0);for(var b=[],x=0,w=null!==(S=y.nodes)&&void 0!==S?S:[];x<w.length;x++){var S,j=w[x].loc;null!=j&&b.push(j)}b=C(b),y.source=null!==n&&void 0!==n?n:null===(d=b)||void 0===d?void 0:d[0].source,y.positions=null!==r&&void 0!==r?r:null===(f=b)||void 0===f?void 0:f.map((function(e){return e.start})),y.locations=r&&n?r.map((function(e){return s(n,e)})):null===(v=b)||void 0===v?void 0:v.map((function(e){return s(e.source,e.start)})),y.path=null!==i&&void 0!==i?i:void 0;var _,k=null===a||void 0===a?void 0:a.extensions;return null==l&&("object"==o(_=k)&&null!==_)?y.extensions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},k):y.extensions=null!==l&&void 0!==l?l:{},Object.defineProperties(g(y),{message:{enumerable:!0},locations:{enumerable:null!=y.locations},path:{enumerable:null!=y.path},extensions:{enumerable:null!=y.extensions&&Object.keys(y.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!==a&&void 0!==a&&a.stack?(Object.defineProperty(g(y),"stack",{value:a.stack,writable:!0,configurable:!0}),m(y)):(Error.captureStackTrace?Error.captureStackTrace(g(y),u):Object.defineProperty(g(y),"stack",{value:Error().stack,writable:!0,configurable:!0}),y)}return t=u,(n=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var o=r[n];o.loc&&(t+="\n\n"+a(o.loc))}else if(e.source&&e.locations)for(var i=0,s=e.locations;i<s.length;i++){var c=s[i];t+="\n\n"+l(e.source,c)}return t}(this)}},{key:i,get:function(){return"Object"}}])&&f(t.prototype,n),r&&f(t,r),u}(v(Error));function C(e){return void 0===e||0===e.length?void 0:e}function j(e,t,n){return new S("Syntax Error: ".concat(n),void 0,e,[t])}var _=n(4705),k=n(2402),N=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),E=n(9788);function T(e,t){if(!Boolean(e))throw new Error(t)}const O=function(e,t){return e instanceof t};function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var R=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"===typeof e||T(0,"Body must be a string. Received: ".concat((0,E.A)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||T(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||T(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:i,get:function(){return"Source"}}])&&I(t.prototype,n),r&&I(t,r),e}();var A=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),M=n(7312),P=function(){function e(e){var t=new k.ou(N.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==N.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=F(this,e)}while(e.kind===N.COMMENT);return e},e}();function D(e){return isNaN(e)?N.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function F(e,t){for(var n=e.source,r=n.body,o=r.length,i=t.end;i<o;){var s=r.charCodeAt(i),a=e.line,l=1+i-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 33:return new k.ou(N.BANG,i,i+1,a,l,t);case 35:return B(n,i,a,l,t);case 36:return new k.ou(N.DOLLAR,i,i+1,a,l,t);case 38:return new k.ou(N.AMP,i,i+1,a,l,t);case 40:return new k.ou(N.PAREN_L,i,i+1,a,l,t);case 41:return new k.ou(N.PAREN_R,i,i+1,a,l,t);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return new k.ou(N.SPREAD,i,i+3,a,l,t);break;case 58:return new k.ou(N.COLON,i,i+1,a,l,t);case 61:return new k.ou(N.EQUALS,i,i+1,a,l,t);case 64:return new k.ou(N.AT,i,i+1,a,l,t);case 91:return new k.ou(N.BRACKET_L,i,i+1,a,l,t);case 93:return new k.ou(N.BRACKET_R,i,i+1,a,l,t);case 123:return new k.ou(N.BRACE_L,i,i+1,a,l,t);case 124:return new k.ou(N.PIPE,i,i+1,a,l,t);case 125:return new k.ou(N.BRACE_R,i,i+1,a,l,t);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?q(n,i,a,l,t,e):$(n,i,a,l,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return U(n,i,s,a,l,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return H(n,i,a,l,t)}throw j(n,i,L(s))}var c=e.line,u=1+i-e.lineStart;return new k.ou(N.EOF,o,o,c,u,t)}function L(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(D(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(D(e),".")}function B(e,t,n,r,o){var i,s=e.body,a=t;do{i=s.charCodeAt(++a)}while(!isNaN(i)&&(i>31||9===i));return new k.ou(N.COMMENT,t,a,n,r,o,s.slice(t+1,a))}function U(e,t,n,r,o,i){var s=e.body,a=n,l=t,c=!1;if(45===a&&(a=s.charCodeAt(++l)),48===a){if((a=s.charCodeAt(++l))>=48&&a<=57)throw j(e,l,"Invalid number, unexpected digit after 0: ".concat(D(a),"."))}else l=G(e,l,a),a=s.charCodeAt(l);if(46===a&&(c=!0,a=s.charCodeAt(++l),l=G(e,l,a),a=s.charCodeAt(l)),69!==a&&101!==a||(c=!0,43!==(a=s.charCodeAt(++l))&&45!==a||(a=s.charCodeAt(++l)),l=G(e,l,a),a=s.charCodeAt(l)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw j(e,l,"Invalid number, expected digit but got: ".concat(D(a),"."));return new k.ou(c?N.FLOAT:N.INT,t,l,r,o,i,s.slice(t,l))}function G(e,t,n){var r=e.body,o=t,i=n;if(i>=48&&i<=57){do{i=r.charCodeAt(++o)}while(i>=48&&i<=57);return o}throw j(e,o,"Invalid number, expected digit but got: ".concat(D(i),"."))}function $(e,t,n,r,o){for(var i=e.body,s=t+1,a=s,l=0,c="";s<i.length&&!isNaN(l=i.charCodeAt(s))&&10!==l&&13!==l;){if(34===l)return c+=i.slice(a,s),new k.ou(N.STRING,t,s+1,n,r,o,c);if(l<32&&9!==l)throw j(e,s,"Invalid character within String: ".concat(D(l),"."));if(++s,92===l){switch(c+=i.slice(a,s-1),l=i.charCodeAt(s)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var u=z(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(u<0){var d=i.slice(s+1,s+5);throw j(e,s,"Invalid character escape sequence: \\u".concat(d,"."))}c+=String.fromCharCode(u),s+=4;break;default:throw j(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}a=++s}}throw j(e,s,"Unterminated string.")}function q(e,t,n,r,o,i){for(var s=e.body,a=t+3,l=a,c=0,u="";a<s.length&&!isNaN(c=s.charCodeAt(a));){if(34===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return u+=s.slice(l,a),new k.ou(N.BLOCK_STRING,t,a+3,n,r,o,(0,M.i$)(u));if(c<32&&9!==c&&10!==c&&13!==c)throw j(e,a,"Invalid character within String: ".concat(D(c),"."));10===c?(++a,++i.line,i.lineStart=a):13===c?(10===s.charCodeAt(a+1)?a+=2:++a,++i.line,i.lineStart=a):92===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(u+=s.slice(l,a)+'"""',l=a+=4):++a}throw j(e,a,"Unterminated string.")}function z(e,t,n,r){return V(e)<<12|V(t)<<8|V(n)<<4|V(r)}function V(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function H(e,t,n,r,o){for(var i=e.body,s=i.length,a=t+1,l=0;a!==s&&!isNaN(l=i.charCodeAt(a))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++a;return new k.ou(N.NAME,t,a,n,r,o,i.slice(t,a))}var W=function(){function e(e,t){var n=function(e){return O(e,R)}(e)?e:new R(e);this._lexer=new P(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(N.NAME);return{kind:_.b.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:_.b.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(N.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(N.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(N.BRACE_L))return{kind:_.b.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(N.NAME)&&(t=this.parseName()),{kind:_.b.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(N.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:_.b.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(N.DOLLAR),{kind:_.b.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:_.b.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(N.COLON)?(e=r,t=this.parseName()):t=r,{kind:_.b.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,t,N.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(N.COLON),{kind:_.b.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:_.b.ARGUMENT,name:this.parseName(),value:(this.expectToken(N.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(N.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(N.NAME)?{kind:_.b.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:_.b.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:_.b.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:_.b.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case N.BRACKET_L:return this.parseList(e);case N.BRACE_L:return this.parseObject(e);case N.INT:return this._lexer.advance(),{kind:_.b.INT,value:t.value,loc:this.loc(t)};case N.FLOAT:return this._lexer.advance(),{kind:_.b.FLOAT,value:t.value,loc:this.loc(t)};case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:_.b.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:_.b.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:_.b.NULL,loc:this.loc(t)};default:return{kind:_.b.ENUM,value:t.value,loc:this.loc(t)}}case N.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:_.b.STRING,value:e.value,block:e.kind===N.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:_.b.LIST,values:this.any(N.BRACKET_L,(function(){return t.parseValueLiteral(e)}),N.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:_.b.OBJECT,fields:this.any(N.BRACE_L,(function(){return t.parseObjectField(e)}),N.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(N.COLON),{kind:_.b.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(N.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(N.AT),{kind:_.b.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(N.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(N.BRACKET_R),e={kind:_.b.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(N.BANG)?{kind:_.b.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:_.b.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===N.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return{kind:_.b.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(N.COLON);var n=this.parseNamedType();return{kind:_.b.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:_.b.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:_.b.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(N.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(N.AMP)||this.peek(N.NAME));return t}return this.delimitedMany(N.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(N.BRACE_L)&&this._lexer.lookahead().kind===N.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(N.COLON);var o=this.parseTypeReference(),i=this.parseDirectives(!0);return{kind:_.b.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:i,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(N.COLON);var r,o=this.parseTypeReference();this.expectOptionalToken(N.EQUALS)&&(r=this.parseValueLiteral(!0));var i=this.parseDirectives(!0);return{kind:_.b.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:i,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:_.b.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:_.b.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:_.b.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:_.b.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:_.b.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===N.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:_.b.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:_.b.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:_.b.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:_.b.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:_.b.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:_.b.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:_.b.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);var n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return{kind:_.b.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:i,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==A[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new k.aZ(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw j(this._lexer.source,t.start,"Expected ".concat(Q(e),", found ").concat(Y(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==N.NAME||t.value!==e)throw j(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(Y(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===N.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!==e&&void 0!==e?e:this._lexer.token;return j(this._lexer.source,t.start,"Unexpected ".concat(Y(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function Y(e){var t=e.value;return Q(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Q(e){return function(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}(e)?'"'.concat(e,'"'):e}var J=new Map,K=new Map,X=!0,Z=!1;function ee(e){return e.replace(/[\s,]+/g," ").trim()}function te(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,o=ee((s=e.loc).source.body.substring(s.start,s.end)),i=K.get(r);i&&!i.has(o)?X&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):i||K.set(r,i=new Set),i.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var s})),(0,r.Cl)((0,r.Cl)({},e),{definitions:n})}function ne(e){var t=ee(e);if(!J.has(t)){var n=function(e,t){return new W(e,t).parseDocument()}(e,{experimentalFragmentVariables:Z,allowLegacyFragmentVariables:Z});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");J.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"===typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(te(n)))}return J.get(t)}function re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"===typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),ne(r)}function oe(){J.clear(),K.clear()}function ie(){X=!1}function se(){Z=!0}function ae(){Z=!1}var le,ce=re,ue=oe,de=ie,he=se,pe=ae;(le=re||(re={})).gql=ce,le.resetCaches=ue,le.disableFragmentWarnings=de,le.enableExperimentalFragmentVariables=he,le.disableExperimentalFragmentVariables=pe,re.default=re},7668:(e,t,n)=>{"use strict";var r="__global_unique_id__";e.exports=function(){return n.g[r]=(n.g[r]||0)+1}},2101:(e,t,n)=>{"use strict";var r=n(2090),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},951:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},2108:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(9534);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},9534:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4635:(e,t,n)=>{"use strict";var r=n(9534);e.exports=function(){return r()&&!!Symbol.toStringTag}},4384:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(3864);e.exports=i.call(r,o)},219:(e,t,n)=>{"use strict";var r=n(2086),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=p(n);o&&o!==f&&e(t,o,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var v=s[g];if(!i[v]&&(!r||!r[v])&&(!m||!m[v])&&(!a||!a[v])){var y=h(n,v);try{c(t,v,y)}catch(b){}}}}return t}},4403:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){y(r)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function S(){var e=f(),n=y(o);if(n){if(w(),!y(i))return v("property missing ':'");var r=y(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(a),l}}return b(),function(){var e,t=[];for(x(t);e=S();)!1!==e&&(t.push(e),x(t));return t}()}},8317:(e,t,n)=>{"use strict";var r=n(4635)(),o=n(2028)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},3913:(e,t,n)=>{"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i=n(4635)();e.exports=function(e){return"object"===typeof e&&null!==e&&(i?function(e){try{return r.call(e),!0}catch(t){return!1}}(e):"[object Date]"===o.call(e))}},3290:(e,t,n)=>{"use strict";var r,o,i,s,a=n(2028),l=n(4635)();if(l){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};s={toString:c,valueOf:c},"symbol"===typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),d=Object.getOwnPropertyDescriptor;e.exports=l?function(e){if(!e||"object"!==typeof e)return!1;var t=d(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,s)}catch(n){return n===i}}:function(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&"[object RegExp]"===u(e)}},4333:(e,t,n)=>{var r=9007199254740991,o="[object Arguments]",i="[object Function]",s="[object GeneratorFunction]",a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=a||l||Function("return this")();function u(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var d=Object.prototype,h=d.hasOwnProperty,p=d.toString,f=c.Symbol,m=d.propertyIsEnumerable,g=f?f.isConcatSpreadable:void 0,v=Math.max;function y(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=b),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?y(a,t-1,n,r,o):u(o,a):r||(o[o.length]=a)}return o}function b(e){return x(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?p.call(e):"";return t==i||t==s}(e)}(e)}(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||p.call(e)==o)}(e)||!!(g&&e&&e[g])}var x=Array.isArray;var w=function(e){return t=function(t){var n=(t=y(t,1)).length,r=n;for(e&&t.reverse();r--;)if("function"!=typeof t[r])throw new TypeError("Expected a function");return function(){for(var e=0,r=n?t[e].apply(this,arguments):arguments[0];++e<n;)r=t[e].call(this,r);return r}},n=v(void 0===n?t.length-1:n,0),function(){for(var e=arguments,r=-1,o=v(e.length-n,0),i=Array(o);++r<o;)i[r]=e[n+r];r=-1;for(var s=Array(n+1);++r<n;)s[r]=e[r];return s[n]=i,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(t,this,s)};var t,n}(!0);e.exports=w},2043:(e,t,n)=>{var r="__lodash_hash_undefined__",o=1/0,i="[object Function]",s="[object GeneratorFunction]",a="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,g=f||m||Function("return this")();var v=Array.prototype,y=Function.prototype,b=Object.prototype,x=g["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),S=y.toString,C=b.hasOwnProperty,j=b.toString,_=RegExp("^"+S.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=g.Symbol,N=v.splice,E=B(g,"Map"),T=B(Object,"create"),O=k?k.prototype:void 0,I=O?O.toString:void 0;function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!==n&&r!==r)return o;return-1}function D(e,t){var n;t=function(e,t){if(q(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||V(e))return!0;return c.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:q(n=t)?n:U(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[G(t[r++])];return r&&r==o?e:void 0}function F(e){if(!z(e)||(t=e,w&&w in t))return!1;var t,n=function(e){var t=z(e)?j.call(e):"";return t==i||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?_:p;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function L(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function B(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}R.prototype.clear=function(){this.__data__=T?T(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(T){var n=t[e];return n===r?void 0:n}return C.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return T?void 0!==t[e]:C.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=T&&void 0===t?r:t,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(e){var t=this.__data__,n=P(t,e);return!(n<0)&&(n==t.length-1?t.pop():N.call(t,n,1),!0)},A.prototype.get=function(e){var t=this.__data__,n=P(t,e);return n<0?void 0:t[n][1]},A.prototype.has=function(e){return P(this.__data__,e)>-1},A.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},M.prototype.clear=function(){this.__data__={hash:new R,map:new(E||A),string:new R}},M.prototype.delete=function(e){return L(this,e).delete(e)},M.prototype.get=function(e){return L(this,e).get(e)},M.prototype.has=function(e){return L(this,e).has(e)},M.prototype.set=function(e,t){return L(this,e).set(e,t),this};var U=$((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return I?I.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,o){n.push(r?o.replace(h,"$1"):t||e)})),n}));function G(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function $(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new($.Cache||M),n}$.Cache=M;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&j.call(e)==a}e.exports=function(e,t,n){var r=null==e?void 0:D(e,t);return void 0===r?n:r}},7685:(e,t,n)=>{var r=n(7937)(n(6552),"DataView");e.exports=r},8724:(e,t,n)=>{var r=n(7615),o=n(5051),i=n(2154),s=n(8734),a=n(2662);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},7160:(e,t,n)=>{var r=n(7563),o=n(9935),i=n(4190),s=n(1946),a=n(1714);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},5204:(e,t,n)=>{var r=n(7937)(n(6552),"Map");e.exports=r},4816:(e,t,n)=>{var r=n(9632),o=n(7159),i=n(438),s=n(9394),a=n(6874);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},5387:(e,t,n)=>{var r=n(7937)(n(6552),"Promise");e.exports=r},2070:(e,t,n)=>{var r=n(7937)(n(6552),"Set");e.exports=r},8902:(e,t,n)=>{var r=n(4816),o=n(6179),i=n(6704);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,e.exports=s},5538:(e,t,n)=>{var r=n(7160),o=n(4545),i=n(793),s=n(7760),a=n(3892),l=n(6788);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},9812:(e,t,n)=>{var r=n(6552).Symbol;e.exports=r},2929:(e,t,n)=>{var r=n(6552).Uint8Array;e.exports=r},6600:(e,t,n)=>{var r=n(7937)(n(6552),"WeakMap");e.exports=r},726:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},7529:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}},3204:(e,t,n)=>{var r=n(3343),o=n(2777),i=n(4052),s=n(4543),a=n(9194),l=n(1268),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),d=!n&&!u&&s(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},149:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},8895:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2587:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},8420:(e,t,n)=>{var r=n(1775),o=n(3211),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];i.call(e,t)&&o(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},1340:(e,t,n)=>{var r=n(3211);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},1104:(e,t,n)=>{var r=n(6614),o=n(8673);e.exports=function(e,t){return e&&r(t,o(t),e)}},5119:(e,t,n)=>{var r=n(6614),o=n(474);e.exports=function(e,t){return e&&r(t,o(t),e)}},1775:(e,t,n)=>{var r=n(5654);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},7132:(e,t,n)=>{var r=n(5538),o=n(726),i=n(8420),s=n(1104),a=n(5119),l=n(4353),c=n(1980),u=n(8124),d=n(9075),h=n(9395),p=n(8592),f=n(6924),m=n(8268),g=n(8630),v=n(310),y=n(4052),b=n(4543),x=n(7887),w=n(6686),S=n(5921),C=n(8673),j=n(474),_="[object Arguments]",k="[object Function]",N="[object Object]",E={};E[_]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[N]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[k]=E["[object WeakMap]"]=!1,e.exports=function e(t,n,T,O,I,R){var A,M=1&n,P=2&n,D=4&n;if(T&&(A=I?T(t,O,I,R):T(t)),void 0!==A)return A;if(!w(t))return t;var F=y(t);if(F){if(A=m(t),!M)return c(t,A)}else{var L=f(t),B=L==k||"[object GeneratorFunction]"==L;if(b(t))return l(t,M);if(L==N||L==_||B&&!I){if(A=P||B?{}:v(t),!M)return P?d(t,a(A,t)):u(t,s(A,t))}else{if(!E[L])return I?t:{};A=g(t,L,M)}}R||(R=new r);var U=R.get(t);if(U)return U;R.set(t,A),S(t)?t.forEach((function(r){A.add(e(r,n,T,r,t,R))})):x(t)&&t.forEach((function(r,o){A.set(o,e(r,n,T,o,t,R))}));var G=F?void 0:(D?P?p:h:P?j:C)(t);return o(G||t,(function(r,o){G&&(r=t[o=r]),i(A,o,e(r,n,T,o,t,R))})),A}},1817:(e,t,n)=>{var r=n(6686),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},5652:(e,t,n)=>{var r=n(4664),o=n(6516)(r);e.exports=o},4258:(e,t,n)=>{var r=n(5906)();e.exports=r},4664:(e,t,n)=>{var r=n(4258),o=n(8673);e.exports=function(e,t){return e&&r(e,t,o)}},2969:(e,t,n)=>{var r=n(5324),o=n(914);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},4262:(e,t,n)=>{var r=n(8895),o=n(4052);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},6913:(e,t,n)=>{var r=n(9812),o=n(4552),i=n(6095),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},7894:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},5193:(e,t,n)=>{var r=n(6913),o=n(2761);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},6989:(e,t,n)=>{var r=n(6399),o=n(2761);e.exports=function e(t,n,i,s,a){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,s,e,a))}},6399:(e,t,n)=>{var r=n(5538),o=n(3668),i=n(9987),s=n(5752),a=n(6924),l=n(4052),c=n(4543),u=n(1268),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),b=l(t),x=y?h:a(e),w=b?h:a(t),S=(x=x==d?p:x)==p,C=(w=w==d?p:w)==p,j=x==w;if(j&&c(e)){if(!c(t))return!1;y=!0,S=!1}if(j&&!S)return v||(v=new r),y||u(e)?o(e,t,n,m,g,v):i(e,t,x,n,m,g,v);if(!(1&n)){var _=S&&f.call(e,"__wrapped__"),k=C&&f.call(t,"__wrapped__");if(_||k){var N=_?e.value():e,E=k?t.value():t;return v||(v=new r),g(N,E,n,m,v)}}return!!j&&(v||(v=new r),s(e,t,n,m,g,v))}},5791:(e,t,n)=>{var r=n(6924),o=n(2761);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},6532:(e,t,n)=>{var r=n(5538),o=n(6989);e.exports=function(e,t,n,i){var s=n.length,a=s,l=!i;if(null==e)return!a;for(e=Object(e);s--;){var c=n[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=n[s])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(i)var f=i(d,h,u,e,t,p);if(!(void 0===f?o(h,d,3,i,p):f))return!1}}return!0}},6954:(e,t,n)=>{var r=n(1629),o=n(7857),i=n(6686),s=n(6996),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:a).test(s(e))}},449:(e,t,n)=>{var r=n(6924),o=n(2761);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},5428:(e,t,n)=>{var r=n(6913),o=n(6173),i=n(2761),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[r(e)]}},9096:(e,t,n)=>{var r=n(9256),o=n(5029),i=n(3279),s=n(4052),a=n(3932);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):r(e):a(e)}},3713:(e,t,n)=>{var r=n(6140),o=n(1143),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},8122:(e,t,n)=>{var r=n(6686),o=n(6140),i=n(3516),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},8883:(e,t,n)=>{var r=n(5652),o=n(6571);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},9256:(e,t,n)=>{var r=n(6532),o=n(3781),i=n(1310);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},5029:(e,t,n)=>{var r=n(6989),o=n(3097),i=n(3366),s=n(2597),a=n(9417),l=n(1310),c=n(914);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(n){var s=o(n,e);return void 0===s&&s===t?i(n,e):r(t,s,3)}}},396:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},2866:(e,t,n)=>{var r=n(2969);e.exports=function(e){return function(t){return r(t,e)}}},3343:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8541:(e,t,n)=>{var r=n(9812),o=n(149),i=n(4052),s=n(9841),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},7574:e=>{e.exports=function(e){return function(t){return e(t)}}},8114:e=>{e.exports=function(e,t){return e.has(t)}},5111:(e,t,n)=>{var r=n(3279);e.exports=function(e){return"function"==typeof e?e:r}},5324:(e,t,n)=>{var r=n(4052),o=n(2597),i=n(4079),s=n(1069);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(s(e))}},1516:(e,t,n)=>{var r=n(2929);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4353:(e,t,n)=>{e=n.nmd(e);var r=n(6552),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},6806:(e,t,n)=>{var r=n(1516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},8962:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},1295:(e,t,n)=>{var r=n(9812),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},8710:(e,t,n)=>{var r=n(1516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1980:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},6614:(e,t,n)=>{var r=n(8420),o=n(1775);e.exports=function(e,t,n,i){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=i?i(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?o(n,c,u):r(n,c,u)}return n}},8124:(e,t,n)=>{var r=n(6614),o=n(9621);e.exports=function(e,t){return r(e,o(e),t)}},9075:(e,t,n)=>{var r=n(6614),o=n(3945);e.exports=function(e,t){return r(e,o(e),t)}},3440:(e,t,n)=>{var r=n(6552)["__core-js_shared__"];e.exports=r},6516:(e,t,n)=>{var r=n(6571);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&!1!==o(a[s],s,a););return n}}},5906:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}}},5654:(e,t,n)=>{var r=n(7937),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},3668:(e,t,n)=>{var r=n(8902),o=n(2587),i=n(8114);e.exports=function(e,t,n,s,a,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var v=e[f],y=t[f];if(s)var b=c?s(y,v,f,t,e,l):s(v,y,f,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(v===e||a(v,e,n,s,l)))return g.push(t)}))){m=!1;break}}else if(v!==y&&!a(v,y,n,s,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},9987:(e,t,n)=>{var r=n(9812),o=n(2929),i=n(3211),s=n(3668),a=n(4160),l=n(2074),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=s(p(e),p(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},5752:(e,t,n)=>{var r=n(9395),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,s,a){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:o.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d<u;){var v=e[h=c[d]],y=t[h];if(i)var b=l?i(y,v,h,t,e,a):i(v,y,h,e,t,a);if(!(void 0===b?v===y||s(v,y,n,i,a):b)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var x=e.constructor,w=t.constructor;x==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(m=!1)}return a.delete(e),a.delete(t),m}},7105:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},9395:(e,t,n)=>{var r=n(4262),o=n(9621),i=n(8673);e.exports=function(e){return r(e,i,o)}},8592:(e,t,n)=>{var r=n(4262),o=n(3945),i=n(474);e.exports=function(e){return r(e,i,o)}},241:(e,t,n)=>{var r=n(705);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},3781:(e,t,n)=>{var r=n(9417),o=n(8673);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,r(s)]}return t}},7937:(e,t,n)=>{var r=n(6954),o=n(4657);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},5990:(e,t,n)=>{var r=n(3028)(Object.getPrototypeOf,Object);e.exports=r},4552:(e,t,n)=>{var r=n(9812),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(l){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}},9621:(e,t,n)=>{var r=n(7529),o=n(7828),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return i.call(e,t)})))}:o;e.exports=a},3945:(e,t,n)=>{var r=n(8895),o=n(5990),i=n(9621),s=n(7828),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:s;e.exports=a},6924:(e,t,n)=>{var r=n(7685),o=n(5204),i=n(5387),s=n(2070),a=n(6600),l=n(6913),c=n(6996),u="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(r),g=c(o),v=c(i),y=c(s),b=c(a),x=l;(r&&x(new r(new ArrayBuffer(1)))!=f||o&&x(new o)!=u||i&&x(i.resolve())!=d||s&&x(new s)!=h||a&&x(new a)!=p)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case g:return u;case v:return d;case y:return h;case b:return p}return t}),e.exports=x},4657:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9057:(e,t,n)=>{var r=n(5324),o=n(2777),i=n(4052),s=n(9194),a=n(6173),l=n(914);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&a(u)&&s(h,u)&&(i(e)||o(e))}},7615:(e,t,n)=>{var r=n(5575);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},5051:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},2154:(e,t,n)=>{var r=n(5575),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},8734:(e,t,n)=>{var r=n(5575),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2662:(e,t,n)=>{var r=n(5575);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8268:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},8630:(e,t,n)=>{var r=n(1516),o=n(6806),i=n(8962),s=n(1295),a=n(8710);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return s(e)}}},310:(e,t,n)=>{var r=n(1817),o=n(5990),i=n(6140);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},9194:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},2597:(e,t,n)=>{var r=n(4052),o=n(9841),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},705:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7857:(e,t,n)=>{var r=n(3440),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},6140:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9417:(e,t,n)=>{var r=n(6686);e.exports=function(e){return e===e&&!r(e)}},7563:e=>{e.exports=function(){this.__data__=[],this.size=0}},9935:(e,t,n)=>{var r=n(1340),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},4190:(e,t,n)=>{var r=n(1340);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},1946:(e,t,n)=>{var r=n(1340);e.exports=function(e){return r(this.__data__,e)>-1}},1714:(e,t,n)=>{var r=n(1340);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},9632:(e,t,n)=>{var r=n(8724),o=n(7160),i=n(5204);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7159:(e,t,n)=>{var r=n(241);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},438:(e,t,n)=>{var r=n(241);e.exports=function(e){return r(this,e).get(e)}},9394:(e,t,n)=>{var r=n(241);e.exports=function(e){return r(this,e).has(e)}},6874:(e,t,n)=>{var r=n(241);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},4160:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},1310:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},8259:(e,t,n)=>{var r=n(5797);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},5575:(e,t,n)=>{var r=n(7937)(Object,"create");e.exports=r},1143:(e,t,n)=>{var r=n(3028)(Object.keys,Object);e.exports=r},3516:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6832:(e,t,n)=>{e=n.nmd(e);var r=n(7105),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&r.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=a},6095:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3028:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},6552:(e,t,n)=>{var r=n(7105),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},6179:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},6704:e=>{e.exports=function(e){return this.__data__.has(e)}},2074:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},4545:(e,t,n)=>{var r=n(7160);e.exports=function(){this.__data__=new r,this.size=0}},793:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7760:e=>{e.exports=function(e){return this.__data__.get(e)}},3892:e=>{e.exports=function(e){return this.__data__.has(e)}},6788:(e,t,n)=>{var r=n(7160),o=n(5204),i=n(4816);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}},4079:(e,t,n)=>{var r=n(8259),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=s},914:(e,t,n)=>{var r=n(9841);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},6996:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},6434:(e,t,n)=>{var r=n(7132);e.exports=function(e){return r(e,5)}},3211:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},840:(e,t,n)=>{var r=n(4664),o=n(5111);e.exports=function(e,t){return e&&r(e,o(t))}},3097:(e,t,n)=>{var r=n(2969);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},3366:(e,t,n)=>{var r=n(7894),o=n(9057);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3279:e=>{e.exports=function(e){return e}},2777:(e,t,n)=>{var r=n(5193),o=n(2761),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},4052:e=>{var t=Array.isArray;e.exports=t},6571:(e,t,n)=>{var r=n(1629),o=n(6173);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4543:(e,t,n)=>{e=n.nmd(e);var r=n(6552),o=n(14),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},1629:(e,t,n)=>{var r=n(6913),o=n(6686);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},6173:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7887:(e,t,n)=>{var r=n(5791),o=n(7574),i=n(6832),s=i&&i.isMap,a=s?o(s):r;e.exports=a},6686:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2761:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},2322:(e,t,n)=>{var r=n(6913),o=n(5990),i=n(2761),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},5921:(e,t,n)=>{var r=n(449),o=n(7574),i=n(6832),s=i&&i.isSet,a=s?o(s):r;e.exports=a},620:(e,t,n)=>{var r=n(6913),o=n(4052),i=n(2761);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},9841:(e,t,n)=>{var r=n(6913),o=n(2761);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1268:(e,t,n)=>{var r=n(5428),o=n(7574),i=n(6832),s=i&&i.isTypedArray,a=s?o(s):r;e.exports=a},8673:(e,t,n)=>{var r=n(3204),o=n(3713),i=n(6571);e.exports=function(e){return i(e)?r(e):o(e)}},474:(e,t,n)=>{var r=n(3204),o=n(8122),i=n(6571);e.exports=function(e){return i(e)?r(e,!0):o(e)}},3536:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,c=32,u=64,d=128,h=256,p=1/0,f=9007199254740991,m=NaN,g=4294967295,v=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",u],["rearg",h]],y="[object Arguments]",b="[object Array]",x="[object Boolean]",w="[object Date]",S="[object Error]",C="[object Function]",j="[object GeneratorFunction]",_="[object Map]",k="[object Number]",N="[object Object]",E="[object Promise]",T="[object RegExp]",O="[object Set]",I="[object String]",R="[object Symbol]",A="[object WeakMap]",M="[object ArrayBuffer]",P="[object DataView]",D="[object Float32Array]",F="[object Float64Array]",L="[object Int8Array]",B="[object Int16Array]",U="[object Int32Array]",G="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,J=RegExp(Y.source),K=RegExp(Q.source),X=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),se=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Se=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Ne="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="['\u2019]",Re="["+je+"]",Ae="["+Oe+"]",Me="["+_e+"]",Pe="\\d+",De="["+ke+"]",Fe="["+Ne+"]",Le="[^"+je+Oe+Pe+ke+Ne+Ee+"]",Be="\\ud83c[\\udffb-\\udfff]",Ue="[^"+je+"]",Ge="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ee+"]",ze="\\u200d",Ve="(?:"+Fe+"|"+Le+")",He="(?:"+qe+"|"+Le+")",We="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Me+"|"+Be+")"+"?",Je="["+Te+"]?",Ke=Je+Qe+("(?:"+ze+"(?:"+[Ue,Ge,$e].join("|")+")"+Je+Qe+")*"),Xe="(?:"+[De,Ge,$e].join("|")+")"+Ke,Ze="(?:"+[Ue+Me+"?",Me,Ge,$e,Re].join("|")+")",et=RegExp(Ie,"g"),tt=RegExp(Me,"g"),nt=RegExp(Be+"(?="+Be+")|"+Ze+Ke,"g"),rt=RegExp([qe+"?"+Fe+"+"+We+"(?="+[Ae,qe,"$"].join("|")+")",He+"+"+Ye+"(?="+[Ae,qe+Ve,"$"].join("|")+")",qe+"?"+Ve+"+"+We,qe+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Xe].join("|"),"g"),ot=RegExp("["+ze+je+_e+Te+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[D]=lt[F]=lt[L]=lt[B]=lt[U]=lt[G]=lt[$]=lt[q]=lt[z]=!0,lt[y]=lt[b]=lt[M]=lt[x]=lt[P]=lt[w]=lt[S]=lt[C]=lt[_]=lt[k]=lt[N]=lt[T]=lt[O]=lt[I]=lt[A]=!1;var ct={};ct[y]=ct[b]=ct[M]=ct[P]=ct[x]=ct[w]=ct[D]=ct[F]=ct[L]=ct[B]=ct[U]=ct[_]=ct[k]=ct[N]=ct[T]=ct[O]=ct[I]=ct[R]=ct[G]=ct[$]=ct[q]=ct[z]=!0,ct[S]=ct[C]=ct[A]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ht=parseInt,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ft||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===gt,bt=yt&&pt.process,xt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),wt=xt&&xt.isArrayBuffer,St=xt&&xt.isDate,Ct=xt&&xt.isMap,jt=xt&&xt.isRegExp,_t=xt&&xt.isSet,kt=xt&&xt.isTypedArray;function Nt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Et(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(r,s,n(s),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function At(e,t){return!!(null==e?0:e.length)&&qt(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Ft(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Lt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ut=Wt("length");function Gt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function $t(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function qt(e,t,n){return t===t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):$t(e,Vt,n)}function zt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Vt(e){return e!==e}function Ht(e,t){var n=null==e?0:e.length;return n?Jt(e,t)/n:m}function Wt(e){return function(t){return null==t?o:t[e]}}function Yt(e){return function(t){return null==e?o:e[t]}}function Qt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Jt(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);s!==o&&(n=n===o?s:n+s)}return n}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,gn(e)+1).replace(se,""):e}function Zt(e){return function(t){return e(t)}}function en(e,t){return Pt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&qt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&qt(t,e[n],0)>-1;);return n}var on=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),sn=Yt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+ut[e]}function ln(e){return ot.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,i[o++]=n)}return i}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return ln(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Ut(e)}function mn(e){return ln(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=Yt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,st))).Array,r=t.Date,ae=t.Error,je=t.Function,_e=t.Math,ke=t.Object,Ne=t.RegExp,Ee=t.String,Te=t.TypeError,Oe=n.prototype,Ie=je.prototype,Re=ke.prototype,Ae=t["__core-js_shared__"],Me=Ie.toString,Pe=Re.hasOwnProperty,De=0,Fe=function(){var e=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=Re.toString,Be=Me.call(ke),Ue=mt._,Ge=Ne("^"+Me.call(Pe).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=yt?t.Buffer:o,qe=t.Symbol,ze=t.Uint8Array,Ve=$e?$e.allocUnsafe:o,He=un(ke.getPrototypeOf,ke),We=ke.create,Ye=Re.propertyIsEnumerable,Qe=Oe.splice,Je=qe?qe.isConcatSpreadable:o,Ke=qe?qe.iterator:o,Xe=qe?qe.toStringTag:o,Ze=function(){try{var e=hi(ke,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ot=r&&r.now!==mt.Date.now&&r.now,ut=t.setTimeout!==mt.setTimeout&&t.setTimeout,pt=_e.ceil,ft=_e.floor,gt=ke.getOwnPropertySymbols,vt=$e?$e.isBuffer:o,bt=t.isFinite,xt=Oe.join,Ut=un(ke.keys,ke),Yt=_e.max,bn=_e.min,xn=r.now,wn=t.parseInt,Sn=_e.random,Cn=Oe.reverse,jn=hi(t,"DataView"),_n=hi(t,"Map"),kn=hi(t,"Promise"),Nn=hi(t,"Set"),En=hi(t,"WeakMap"),Tn=hi(ke,"create"),On=En&&new En,In={},Rn=Li(jn),An=Li(_n),Mn=Li(kn),Pn=Li(Nn),Dn=Li(En),Fn=qe?qe.prototype:o,Ln=Fn?Fn.valueOf:o,Bn=Fn?Fn.toString:o;function Un(e){if(ta(e)&&!zs(e)&&!(e instanceof zn)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Bi(e)}return new qn(e)}var Gn=function(){function e(){}return function(t){if(!ea(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function $n(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Jn(e,t){var n=zs(e),r=!n&&qs(e),o=!n&&!r&&Ys(e),i=!n&&!r&&!o&&ca(e),s=n||r||o||i,a=s?Kt(e.length,Ee):[],l=a.length;for(var c in e)!t&&!Pe.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(c,l))||a.push(c);return a}function Kn(e){var t=e.length;return t?e[Yr(0,t-1)]:o}function Xn(e,t){return Pi(Oo(e),ar(t,0,e.length))}function Zn(e){return Pi(Oo(e))}function er(e,t,n){(n!==o&&!Us(e[t],n)||n===o&&!(t in e))&&ir(e,t,n)}function tr(e,t,n){var r=e[t];Pe.call(e,t)&&Us(r,n)&&(n!==o||t in e)||ir(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Us(e[n][0],t))return n;return-1}function rr(e,t,n,r){return hr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function or(e,t){return e&&Io(t,Ia(t),e)}function ir(e,t,n){"__proto__"==t&&Ze?Ze(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var r=-1,i=t.length,s=n(i),a=null==e;++r<i;)s[r]=a?o:ka(e,t[r]);return s}function ar(e,t,n){return e===e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function lr(e,t,n,r,i,s){var a,l=1&t,c=2&t,u=4&t;if(n&&(a=i?n(e,r,i,s):n(e)),a!==o)return a;if(!ea(e))return e;var d=zs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Oo(e,a)}else{var h=mi(e),p=h==C||h==j;if(Ys(e))return jo(e,l);if(h==N||h==y||p&&!i){if(a=c||p?{}:vi(e),!l)return c?function(e,t){return Io(e,fi(e),t)}(e,function(e,t){return e&&Io(t,Ra(t),e)}(a,e)):function(e,t){return Io(e,pi(e),t)}(e,or(a,e))}else{if(!ct[h])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case M:return _o(e);case x:case w:return new r(+e);case P:return function(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case F:case L:case B:case U:case G:case $:case q:case z:return ko(e,n);case _:return new r;case k:case I:return new r(e);case T:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new r;case R:return o=e,Ln?ke(Ln.call(o)):{}}var o}(e,h,l)}}s||(s=new Qn);var f=s.get(e);if(f)return f;s.set(e,a),sa(e)?e.forEach((function(r){a.add(lr(r,t,n,r,e,s))})):na(e)&&e.forEach((function(r,o){a.set(o,lr(r,t,n,o,e,s))}));var m=d?o:(u?c?ii:oi:c?Ra:Ia)(e);return Tt(m||e,(function(r,o){m&&(r=e[o=r]),tr(a,o,lr(r,t,n,o,e,s))})),a}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=ke(e);r--;){var i=n[r],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Te(i);return Ii((function(){e.apply(o,n)}),t)}function dr(e,t,n,r){var o=-1,i=At,s=!0,a=e.length,l=[],c=t.length;if(!a)return l;n&&(t=Pt(t,Zt(n))),r?(i=Mt,s=!1):t.length>=200&&(i=tn,s=!1,t=new Yn(t));e:for(;++o<a;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,s&&d===d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else i(t,d,r)||l.push(u)}return l}Un.templateSettings={escape:X,evaluate:Z,interpolate:ee,variable:"",imports:{_:Un}},Un.prototype=$n.prototype,Un.prototype.constructor=Un,qn.prototype=Gn($n.prototype),qn.prototype.constructor=qn,zn.prototype=Gn($n.prototype),zn.prototype.constructor=zn,Vn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===s?o:n}return Pe.call(t,e)?t[e]:o},Vn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==o:Pe.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===o?s:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},Hn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?o:t[n][1]},Hn.prototype.has=function(e){return nr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(_n||Hn),string:new Vn}},Wn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return ui(this,e).get(e)},Wn.prototype.has=function(e){return ui(this,e).has(e)},Wn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,s),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!_n||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var hr=Mo(xr),pr=Mo(wr,!0);function fr(e,t){var n=!0;return hr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function mr(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],a=t(s);if(null!=a&&(l===o?a===a&&!la(a):n(a,l)))var l=a,c=s}return c}function gr(e,t){var n=[];return hr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function vr(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=yi),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?vr(a,t-1,n,r,o):Dt(o,a):r||(o[o.length]=a)}return o}var yr=Po(),br=Po(!0);function xr(e,t){return e&&yr(e,t,Ia)}function wr(e,t){return e&&br(e,t,Ia)}function Sr(e,t){return Rt(t,(function(t){return Ks(e[t])}))}function Cr(e,t){for(var n=0,r=(t=xo(t,e)).length;null!=e&&n<r;)e=e[Fi(t[n++])];return n&&n==r?e:o}function jr(e,t,n){var r=t(e);return zs(e)?r:Dt(r,n(e))}function _r(e){return null==e?e===o?"[object Undefined]":"[object Null]":Xe&&Xe in ke(e)?function(e){var t=Pe.call(e,Xe),n=e[Xe];try{e[Xe]=o;var r=!0}catch(s){}var i=Le.call(e);r&&(t?e[Xe]=n:delete e[Xe]);return i}(e):function(e){return Le.call(e)}(e)}function kr(e,t){return e>t}function Nr(e,t){return null!=e&&Pe.call(e,t)}function Er(e,t){return null!=e&&t in ke(e)}function Tr(e,t,r){for(var i=r?Mt:At,s=e[0].length,a=e.length,l=a,c=n(a),u=1/0,d=[];l--;){var h=e[l];l&&t&&(h=Pt(h,Zt(t))),u=bn(h.length,u),c[l]=!r&&(t||s>=120&&h.length>=120)?new Yn(l&&h):o}h=e[0];var p=-1,f=c[0];e:for(;++p<s&&d.length<u;){var m=h[p],g=t?t(m):m;if(m=r||0!==m?m:0,!(f?tn(f,g):i(d,g,r))){for(l=a;--l;){var v=c[l];if(!(v?tn(v,g):i(e[l],g,r)))continue e}f&&f.push(g),d.push(m)}}return d}function Or(e,t,n){var r=null==(e=Ei(e,t=xo(t,e)))?e:e[Fi(Ji(t))];return null==r?o:Nt(r,e,n)}function Ir(e){return ta(e)&&_r(e)==y}function Rr(e,t,n,r,i){return e===t||(null==e||null==t||!ta(e)&&!ta(t)?e!==e&&t!==t:function(e,t,n,r,i,s){var a=zs(e),l=zs(t),c=a?b:mi(e),u=l?b:mi(t),d=(c=c==y?N:c)==N,h=(u=u==y?N:u)==N,p=c==u;if(p&&Ys(e)){if(!Ys(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Qn),a||ca(e)?ni(e,t,n,r,i,s):function(e,t,n,r,o,i,s){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case x:case w:case k:return Us(+e,+t);case S:return e.name==t.name&&e.message==t.message;case T:case I:return e==t+"";case _:var a=cn;case O:var l=1&r;if(a||(a=hn),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var u=ni(a(e),a(t),r,o,i,s);return s.delete(e),u;case R:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,i,s);if(!(1&n)){var f=d&&Pe.call(e,"__wrapped__"),m=h&&Pe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,v=m?t.value():t;return s||(s=new Qn),i(g,v,n,r,s)}}if(!p)return!1;return s||(s=new Qn),function(e,t,n,r,i,s){var a=1&n,l=oi(e),c=l.length,u=oi(t),d=u.length;if(c!=d&&!a)return!1;var h=c;for(;h--;){var p=l[h];if(!(a?p in t:Pe.call(t,p)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var v=a;for(;++h<c;){var y=e[p=l[h]],b=t[p];if(r)var x=a?r(b,y,p,t,e,s):r(y,b,p,e,t,s);if(!(x===o?y===b||i(y,b,n,r,s):x)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,i,s)}(e,t,n,r,Rr,i))}function Ar(e,t,n,r){var i=n.length,s=i,a=!r;if(null==e)return!s;for(e=ke(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=n[i])[0],u=e[c],d=l[1];if(a&&l[2]){if(u===o&&!(c in e))return!1}else{var h=new Qn;if(r)var p=r(u,d,c,e,t,h);if(!(p===o?Rr(d,u,3,r,h):p))return!1}}return!0}function Mr(e){return!(!ea(e)||(t=e,Fe&&Fe in t))&&(Ks(e)?Ge:ye).test(Li(e));var t}function Pr(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?zs(e)?Gr(e[0],e[1]):Ur(e):hl(e)}function Dr(e){if(!ji(e))return Ut(e);var t=[];for(var n in ke(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!ea(e))return function(e){var t=[];if(null!=e)for(var n in ke(e))t.push(n);return t}(e);var t=ji(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function Br(e,t){var r=-1,o=Hs(e)?n(e.length):[];return hr(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function Ur(e){var t=di(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Gr(e,t){return wi(e)&&_i(t)?ki(Fi(e),t):function(n){var r=ka(n,e);return r===o&&r===t?Na(n,e):Rr(t,r,3)}}function $r(e,t,n,r,i){e!==t&&yr(t,(function(s,a){if(i||(i=new Qn),ea(s))!function(e,t,n,r,i,s,a){var l=Ti(e,n),c=Ti(t,n),u=a.get(c);if(u)return void er(e,n,u);var d=s?s(l,c,n+"",e,t,a):o,h=d===o;if(h){var p=zs(c),f=!p&&Ys(c),m=!p&&!f&&ca(c);d=c,p||f||m?zs(l)?d=l:Ws(l)?d=Oo(l):f?(h=!1,d=jo(c,!0)):m?(h=!1,d=ko(c,!0)):d=[]:oa(c)||qs(c)?(d=l,qs(l)?d=va(l):ea(l)&&!Ks(l)||(d=vi(c))):h=!1}h&&(a.set(c,d),i(d,c,r,s,a),a.delete(c));er(e,n,d)}(e,t,a,n,$r,r,i);else{var l=r?r(Ti(e,a),s,a+"",e,t,i):o;l===o&&(l=s),er(e,a,l)}}),Ra)}function qr(e,t){var n=e.length;if(n)return bi(t+=t<0?n:0,n)?e[t]:o}function zr(e,t,n){t=t.length?Pt(t,(function(e){return zs(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[rl];var r=-1;t=Pt(t,Zt(ci()));var o=Br(e,(function(e,n,o){var i=Pt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,s=o.length,a=n.length;for(;++r<s;){var l=No(o[r],i[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var s=t[r],a=Cr(e,s);n(a,s)&&Zr(i,xo(s,e),a)}return i}function Hr(e,t,n,r){var o=r?zt:qt,i=-1,s=t.length,a=e;for(e===t&&(t=Oo(t)),n&&(a=Pt(e,Zt(n)));++i<s;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(a,u,l,r))>-1;)a!==e&&Qe.call(a,l,1),Qe.call(e,l,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;bi(o)?Qe.call(e,o,1):ho(e,o)}}return e}function Yr(e,t){return e+ft(Sn()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Ri(Ni(e,t,rl),e+"")}function Kr(e){return Kn(Ua(e))}function Xr(e,t){var n=Ua(e);return Pi(n,ar(t,0,n.length))}function Zr(e,t,n,r){if(!ea(e))return e;for(var i=-1,s=(t=xo(t,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=Fi(t[i]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var d=l[c];(u=r?r(d,c,l):o)===o&&(u=ea(d)?d:bi(t[i+1])?[]:{})}tr(l,c,u),l=l[c]}return e}var eo=On?function(e,t){return On.set(e,t),e}:rl,to=Ze?function(e,t){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function no(e){return Pi(Ua(e))}function ro(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o<i;)s[o]=e[o+t];return s}function oo(e,t){var n;return hr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function io(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t===t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=e[i];null!==s&&!la(s)&&(n?s<=t:s<t)?r=i+1:o=i}return o}return so(e,t,rl,n)}function so(e,t,n,r){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!==t,l=null===t,c=la(t),u=t===o;i<s;){var d=ft((i+s)/2),h=n(e[d]),p=h!==o,f=null===h,m=h===h,g=la(h);if(a)var v=r||m;else v=u?m&&(r||p):l?m&&p&&(r||!f):c?m&&p&&!f&&(r||!g):!f&&!g&&(r?h<=t:h<t);v?i=d+1:s=d}return bn(s,4294967294)}function ao(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Us(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function lo(e){return"number"==typeof e?e:la(e)?m:+e}function co(e){if("string"==typeof e)return e;if(zs(e))return Pt(e,co)+"";if(la(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=At,i=e.length,s=!0,a=[],l=a;if(n)s=!1,o=Mt;else if(i>=200){var c=t?null:Jo(e);if(c)return hn(c);s=!1,o=tn,l=new Yn}else l=t?[]:a;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}function ho(e,t){return null==(e=Ei(e,t=xo(t,e)))||delete e[Fi(Ji(t))]}function po(e,t,n,r){return Zr(e,t,n(Cr(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ro(e,r?0:i,r?i+1:o):ro(e,r?i+1:0,r?o:i)}function mo(e,t){var n=e;return n instanceof zn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function go(e,t,r){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,s=n(o);++i<o;)for(var a=e[i],l=-1;++l<o;)l!=i&&(s[i]=dr(s[i]||a,e[l],t,r));return uo(vr(s,1),t,r)}function vo(e,t,n){for(var r=-1,i=e.length,s=t.length,a={};++r<i;){var l=r<s?t[r]:o;n(a,e[r],l)}return a}function yo(e){return Ws(e)?e:[]}function bo(e){return"function"==typeof e?e:rl}function xo(e,t){return zs(e)?e:wi(e,t)?[e]:Di(ya(e))}var wo=Jr;function So(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:ro(e,t,n)}var Co=nt||function(e){return mt.clearTimeout(e)};function jo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function _o(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function ko(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function No(e,t){if(e!==t){var n=e!==o,r=null===e,i=e===e,s=la(e),a=t!==o,l=null===t,c=t===t,u=la(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||r&&a&&c||!n&&c||!i)return 1;if(!r&&!s&&!u&&e<t||u&&n&&i&&!r&&!s||l&&n&&i||!a&&i||!c)return-1}return 0}function Eo(e,t,r,o){for(var i=-1,s=e.length,a=r.length,l=-1,c=t.length,u=Yt(s-a,0),d=n(c+u),h=!o;++l<c;)d[l]=t[l];for(;++i<a;)(h||i<s)&&(d[r[i]]=e[i]);for(;u--;)d[l++]=e[i++];return d}function To(e,t,r,o){for(var i=-1,s=e.length,a=-1,l=r.length,c=-1,u=t.length,d=Yt(s-l,0),h=n(d+u),p=!o;++i<d;)h[i]=e[i];for(var f=i;++c<u;)h[f+c]=t[c];for(;++a<l;)(p||i<s)&&(h[f+r[a]]=e[i++]);return h}function Oo(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Io(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],c=r?r(n[l],e[l],l,n,e):o;c===o&&(c=e[l]),i?ir(n,l,c):tr(n,l,c)}return n}function Ro(e,t){return function(n,r){var o=zs(n)?Et:rr,i=t?t():{};return o(n,e,ci(r,2),i)}}function Ao(e){return Jr((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&xi(n[0],n[1],a)&&(s=i<3?o:s,i=1),t=ke(t);++r<i;){var l=n[r];l&&e(t,l,r,s)}return t}))}function Mo(e,t){return function(n,r){if(null==n)return n;if(!Hs(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=ke(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Po(e){return function(t,n,r){for(var o=-1,i=ke(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}}function Do(e){return function(t){var n=ln(t=ya(t))?mn(t):o,r=n?n[0]:t.charAt(0),i=n?So(n,1).join(""):t.slice(1);return r[e]()+i}}function Fo(e){return function(t){return Ft(Ka(qa(t).replace(et,"")),e,"")}}function Lo(e){return function(){var t=arguments;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]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Gn(e.prototype),r=e.apply(n,t);return ea(r)?r:n}}function Bo(e){return function(t,n,r){var i=ke(t);if(!Hs(t)){var s=ci(n,3);t=Ia(t),n=function(e){return s(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[s?t[a]:a]:o}}function Uo(e){return ri((function(t){var n=t.length,r=n,s=qn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Te(i);if(s&&!l&&"wrapper"==ai(a))var l=new qn([],!0)}for(r=l?r:n;++r<n;){var c=ai(a=t[r]),u="wrapper"==c?si(a):o;l=u&&Si(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ai(u[0])].apply(l,u[3]):1==a.length&&Si(a)?l[c]():l.thru(a)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&zs(r))return l.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Go(e,t,r,i,s,a,l,c,u,h){var p=t&d,f=1&t,m=2&t,g=24&t,v=512&t,y=m?o:Lo(e);return function d(){for(var b=arguments.length,x=n(b),w=b;w--;)x[w]=arguments[w];if(g)var S=li(d),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(x,S);if(i&&(x=Eo(x,i,s,g)),a&&(x=To(x,a,l,g)),b-=C,g&&b<h){var j=dn(x,S);return Yo(e,t,Go,d.placeholder,r,x,j,c,u,h-b)}var _=f?r:this,k=m?_[e]:e;return b=x.length,c?x=function(e,t){var n=e.length,r=bn(t.length,n),i=Oo(e);for(;r--;){var s=t[r];e[r]=bi(s,n)?i[s]:o}return e}(x,c):v&&b>1&&x.reverse(),p&&u<b&&(x.length=u),this&&this!==mt&&this instanceof d&&(k=y||Lo(k)),k.apply(_,x)}}function $o(e,t){return function(n,r){return function(e,t,n,r){return xr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function qo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=co(n),r=co(r)):(n=lo(n),r=lo(r)),i=e(n,r)}return i}}function zo(e){return ri((function(t){return t=Pt(t,Zt(ci())),Jr((function(n){var r=this;return e(t,(function(e){return Nt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":co(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,pt(e/fn(t)));return ln(t)?So(mn(r),0,e).join(""):r.slice(0,e)}function Ho(e){return function(t,r,i){return i&&"number"!=typeof i&&xi(t,r,i)&&(r=i=o),t=pa(t),r===o?(r=t,t=0):r=pa(r),function(e,t,r,o){for(var i=-1,s=Yt(pt((t-e)/(r||1)),0),a=n(s);s--;)a[o?s:++i]=e,e+=r;return a}(t,r,i=i===o?t<r?1:-1:pa(i),e)}}function Wo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ga(t),n=ga(n)),e(t,n)}}function Yo(e,t,n,r,i,s,a,l,d,h){var p=8&t;t|=p?c:u,4&(t&=~(p?u:c))||(t&=-4);var f=[e,t,i,p?s:o,p?a:o,p?o:s,p?o:a,l,d,h],m=n.apply(o,f);return Si(e)&&Oi(m,f),m.placeholder=r,Ai(m,e,t)}function Qo(e){var t=_e[e];return function(e,n){if(e=ga(e),(n=null==n?0:bn(fa(n),292))&&bt(e)){var r=(ya(e)+"e").split("e");return+((r=(ya(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Jo=Nn&&1/hn(new Nn([,-0]))[1]==p?function(e){return new Nn(e)}:ll;function Ko(e){return function(t){var n=mi(t);return n==_?cn(t):n==O?pn(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xo(e,t,r,s,p,f,m,g){var v=2&t;if(!v&&"function"!=typeof e)throw new Te(i);var y=s?s.length:0;if(y||(t&=-97,s=p=o),m=m===o?m:Yt(fa(m),0),g=g===o?g:fa(g),y-=p?p.length:0,t&u){var b=s,x=p;s=p=o}var w=v?o:si(e),S=[e,t,r,s,p,b,x,f,m,g];if(w&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=r==d&&8==n||r==d&&n==h&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?Eo(c,l,t[4]):l,e[4]=c?dn(e[3],a):t[4]}(l=t[5])&&(c=e[5],e[5]=c?To(c,l,t[6]):l,e[6]=c?dn(e[5],a):t[6]);(l=t[7])&&(e[7]=l);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(S,w),e=S[0],t=S[1],r=S[2],s=S[3],p=S[4],!(g=S[9]=S[9]===o?v?0:e.length:Yt(S[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==l?function(e,t,r){var i=Lo(e);return function s(){for(var a=arguments.length,l=n(a),c=a,u=li(s);c--;)l[c]=arguments[c];var d=a<3&&l[0]!==u&&l[a-1]!==u?[]:dn(l,u);return(a-=d.length)<r?Yo(e,t,Go,s.placeholder,o,l,d,o,o,r-a):Nt(this&&this!==mt&&this instanceof s?i:e,this,l)}}(e,t,g):t!=c&&33!=t||p.length?Go.apply(o,S):function(e,t,r,o){var i=1&t,s=Lo(e);return function t(){for(var a=-1,l=arguments.length,c=-1,u=o.length,d=n(u+l),h=this&&this!==mt&&this instanceof t?s:e;++c<u;)d[c]=o[c];for(;l--;)d[c++]=arguments[++a];return Nt(h,i?r:this,d)}}(e,t,r,s);else var C=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==mt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,r);return Ai((w?eo:Oi)(C,S),e,t)}function Zo(e,t,n,r){return e===o||Us(e,Re[n])&&!Pe.call(r,n)?t:e}function ei(e,t,n,r,i,s){return ea(e)&&ea(t)&&(s.set(t,e),$r(e,t,o,ei,s),s.delete(t)),e}function ti(e){return oa(e)?o:e}function ni(e,t,n,r,i,s){var a=1&n,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=2&n?new Yn:o;for(s.set(e,t),s.set(t,e);++h<l;){var m=e[h],g=t[h];if(r)var v=a?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(v!==o){if(v)continue;p=!1;break}if(f){if(!Bt(t,(function(e,t){if(!tn(f,t)&&(m===e||i(m,e,n,r,s)))return f.push(t)}))){p=!1;break}}else if(m!==g&&!i(m,g,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function ri(e){return Ri(Ni(e,o,Vi),e+"")}function oi(e){return jr(e,Ia,pi)}function ii(e){return jr(e,Ra,fi)}var si=On?function(e){return On.get(e)}:ll;function ai(e){for(var t=e.name+"",n=In[t],r=Pe.call(In,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function li(e){return(Pe.call(Un,"placeholder")?Un:e).placeholder}function ci(){var e=Un.iteratee||ol;return e=e===ol?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function di(e){for(var t=Ia(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_i(o)]}return t}function hi(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Mr(n)?n:o}var pi=gt?function(e){return null==e?[]:(e=ke(e),Rt(gt(e),(function(t){return Ye.call(e,t)})))}:ml,fi=gt?function(e){for(var t=[];e;)Dt(t,pi(e)),e=He(e);return t}:ml,mi=_r;function gi(e,t,n){for(var r=-1,o=(t=xo(t,e)).length,i=!1;++r<o;){var s=Fi(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Zs(o)&&bi(s,o)&&(zs(e)||qs(e))}function vi(e){return"function"!=typeof e.constructor||ji(e)?{}:Gn(He(e))}function yi(e){return zs(e)||qs(e)||!!(Je&&e&&e[Je])}function bi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&xe.test(e))&&e>-1&&e%1==0&&e<t}function xi(e,t,n){if(!ea(n))return!1;var r=typeof t;return!!("number"==r?Hs(n)&&bi(t,n.length):"string"==r&&t in n)&&Us(n[t],e)}function wi(e,t){if(zs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||(ne.test(e)||!te.test(e)||null!=t&&e in ke(t))}function Si(e){var t=ai(e),n=Un[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=si(n);return!!r&&e===r[0]}(jn&&mi(new jn(new ArrayBuffer(1)))!=P||_n&&mi(new _n)!=_||kn&&mi(kn.resolve())!=E||Nn&&mi(new Nn)!=O||En&&mi(new En)!=A)&&(mi=function(e){var t=_r(e),n=t==N?e.constructor:o,r=n?Li(n):"";if(r)switch(r){case Rn:return P;case An:return _;case Mn:return E;case Pn:return O;case Dn:return A}return t});var Ci=Ae?Ks:gl;function ji(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function _i(e){return e===e&&!ea(e)}function ki(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in ke(n)))}}function Ni(e,t,r){return t=Yt(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=Yt(o.length-t,0),a=n(s);++i<s;)a[i]=o[t+i];i=-1;for(var l=n(t+1);++i<t;)l[i]=o[i];return l[t]=r(a),Nt(e,this,l)}}function Ei(e,t){return t.length<2?e:Cr(e,ro(t,0,-1))}function Ti(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Oi=Mi(eo),Ii=ut||function(e,t){return mt.setTimeout(e,t)},Ri=Mi(to);function Ai(e,t,n){var r=t+"";return Ri(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(v,(function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(ue):[]}(r),n)))}function Mi(e){var t=0,n=0;return function(){var r=xn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Pi(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var s=Yr(n,i),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Di=function(e){var t=Ms(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function Fi(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Li(e){if(null!=e){try{return Me.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Bi(e){if(e instanceof zn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Oo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ui=Jr((function(e,t){return Ws(e)?dr(e,vr(t,1,Ws,!0)):[]})),Gi=Jr((function(e,t){var n=Ji(t);return Ws(n)&&(n=o),Ws(e)?dr(e,vr(t,1,Ws,!0),ci(n,2)):[]})),$i=Jr((function(e,t){var n=Ji(t);return Ws(n)&&(n=o),Ws(e)?dr(e,vr(t,1,Ws,!0),o,n):[]}));function qi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fa(n);return o<0&&(o=Yt(r+o,0)),$t(e,ci(t,3),o)}function zi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=fa(n),i=n<0?Yt(r+i,0):bn(i,r-1)),$t(e,ci(t,3),i,!0)}function Vi(e){return(null==e?0:e.length)?vr(e,1):[]}function Hi(e){return e&&e.length?e[0]:o}var Wi=Jr((function(e){var t=Pt(e,yo);return t.length&&t[0]===e[0]?Tr(t):[]})),Yi=Jr((function(e){var t=Ji(e),n=Pt(e,yo);return t===Ji(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Tr(n,ci(t,2)):[]})),Qi=Jr((function(e){var t=Ji(e),n=Pt(e,yo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,o,t):[]}));function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ki=Jr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Zi=ri((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return Wr(e,Pt(t,(function(e){return bi(e,n)?+e:e})).sort(No)),r}));function es(e){return null==e?e:Cn.call(e)}var ts=Jr((function(e){return uo(vr(e,1,Ws,!0))})),ns=Jr((function(e){var t=Ji(e);return Ws(t)&&(t=o),uo(vr(e,1,Ws,!0),ci(t,2))})),rs=Jr((function(e){var t=Ji(e);return t="function"==typeof t?t:o,uo(vr(e,1,Ws,!0),o,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ws(e))return t=Yt(e.length,t),!0})),Kt(t,(function(t){return Pt(e,Wt(t))}))}function is(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:Pt(n,(function(e){return Nt(t,o,e)}))}var ss=Jr((function(e,t){return Ws(e)?dr(e,t):[]})),as=Jr((function(e){return go(Rt(e,Ws))})),ls=Jr((function(e){var t=Ji(e);return Ws(t)&&(t=o),go(Rt(e,Ws),ci(t,2))})),cs=Jr((function(e){var t=Ji(e);return t="function"==typeof t?t:o,go(Rt(e,Ws),o,t)})),us=Jr(os);var ds=Jr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,is(e,n)}));function hs(e){var t=Un(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var fs=ri((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&bi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ps,args:[i],thisArg:o}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var ms=Ro((function(e,t,n){Pe.call(e,n)?++e[n]:ir(e,n,1)}));var gs=Bo(qi),vs=Bo(zi);function ys(e,t){return(zs(e)?Tt:hr)(e,ci(t,3))}function bs(e,t){return(zs(e)?Ot:pr)(e,ci(t,3))}var xs=Ro((function(e,t,n){Pe.call(e,n)?e[n].push(t):ir(e,n,[t])}));var ws=Jr((function(e,t,r){var o=-1,i="function"==typeof t,s=Hs(e)?n(e.length):[];return hr(e,(function(e){s[++o]=i?Nt(t,e,r):Or(e,t,r)})),s})),Ss=Ro((function(e,t,n){ir(e,n,t)}));function Cs(e,t){return(zs(e)?Pt:Br)(e,ci(t,3))}var js=Ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var _s=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&xi(e,t[0],t[1])?t=[]:n>2&&xi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,vr(t,1),[])})),ks=ot||function(){return mt.Date.now()};function Ns(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xo(e,d,o,o,o,o,t)}function Es(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=fa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ts=Jr((function(e,t,n){var r=1;if(n.length){var o=dn(n,li(Ts));r|=c}return Xo(e,r,t,n,o)})),Os=Jr((function(e,t,n){var r=3;if(n.length){var o=dn(n,li(Os));r|=c}return Xo(t,r,e,n,o)}));function Is(e,t,n){var r,s,a,l,c,u,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new Te(i);function m(t){var n=r,i=s;return r=s=o,d=t,l=e.apply(i,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||p&&e-d>=a}function v(){var e=ks();if(g(e))return y(e);c=Ii(v,function(e){var n=t-(e-u);return p?bn(n,a-(e-d)):n}(e))}function y(e){return c=o,f&&r?m(e):(r=s=o,l)}function b(){var e=ks(),n=g(e);if(r=arguments,s=this,u=e,n){if(c===o)return function(e){return d=e,c=Ii(v,t),h?m(e):l}(u);if(p)return Co(c),c=Ii(v,t),m(u)}return c===o&&(c=Ii(v,t)),l}return t=ga(t)||0,ea(n)&&(h=!!n.leading,a=(p="maxWait"in n)?Yt(ga(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){c!==o&&Co(c),d=0,r=u=s=c=o},b.flush=function(){return c===o?l:y(ks())},b}var Rs=Jr((function(e,t){return ur(e,1,t)})),As=Jr((function(e,t,n){return ur(e,ga(t)||0,n)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Ms.Cache||Wn),n}function Ps(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=Wn;var Ds=wo((function(e,t){var n=(t=1==t.length&&zs(t[0])?Pt(t[0],Zt(ci())):Pt(vr(t,1),Zt(ci()))).length;return Jr((function(r){for(var o=-1,i=bn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Nt(e,this,r)}))})),Fs=Jr((function(e,t){var n=dn(t,li(Fs));return Xo(e,c,o,t,n)})),Ls=Jr((function(e,t){var n=dn(t,li(Ls));return Xo(e,u,o,t,n)})),Bs=ri((function(e,t){return Xo(e,h,o,o,o,t)}));function Us(e,t){return e===t||e!==e&&t!==t}var Gs=Wo(kr),$s=Wo((function(e,t){return e>=t})),qs=Ir(function(){return arguments}())?Ir:function(e){return ta(e)&&Pe.call(e,"callee")&&!Ye.call(e,"callee")},zs=n.isArray,Vs=wt?Zt(wt):function(e){return ta(e)&&_r(e)==M};function Hs(e){return null!=e&&Zs(e.length)&&!Ks(e)}function Ws(e){return ta(e)&&Hs(e)}var Ys=vt||gl,Qs=St?Zt(St):function(e){return ta(e)&&_r(e)==w};function Js(e){if(!ta(e))return!1;var t=_r(e);return t==S||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Ks(e){if(!ea(e))return!1;var t=_r(e);return t==C||t==j||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==fa(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ea(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ta(e){return null!=e&&"object"==typeof e}var na=Ct?Zt(Ct):function(e){return ta(e)&&mi(e)==_};function ra(e){return"number"==typeof e||ta(e)&&_r(e)==k}function oa(e){if(!ta(e)||_r(e)!=N)return!1;var t=He(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Be}var ia=jt?Zt(jt):function(e){return ta(e)&&_r(e)==T};var sa=_t?Zt(_t):function(e){return ta(e)&&mi(e)==O};function aa(e){return"string"==typeof e||!zs(e)&&ta(e)&&_r(e)==I}function la(e){return"symbol"==typeof e||ta(e)&&_r(e)==R}var ca=kt?Zt(kt):function(e){return ta(e)&&Zs(e.length)&&!!lt[_r(e)]};var ua=Wo(Lr),da=Wo((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Hs(e))return aa(e)?mn(e):Oo(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=mi(e);return(t==_?cn:t==O?hn:Ua)(e)}function pa(e){return e?(e=ga(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function fa(e){var t=pa(e),n=t%1;return t===t?n?t-n:t:0}function ma(e){return e?ar(fa(e),0,g):0}function ga(e){if("number"==typeof e)return e;if(la(e))return m;if(ea(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ea(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ve.test(e);return n||be.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?m:+e}function va(e){return Io(e,Ra(e))}function ya(e){return null==e?"":co(e)}var ba=Ao((function(e,t){if(ji(t)||Hs(t))Io(t,Ia(t),e);else for(var n in t)Pe.call(t,n)&&tr(e,n,t[n])})),xa=Ao((function(e,t){Io(t,Ra(t),e)})),wa=Ao((function(e,t,n,r){Io(t,Ra(t),e,r)})),Sa=Ao((function(e,t,n,r){Io(t,Ia(t),e,r)})),Ca=ri(sr);var ja=Jr((function(e,t){e=ke(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&xi(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],a=Ra(s),l=-1,c=a.length;++l<c;){var u=a[l],d=e[u];(d===o||Us(d,Re[u])&&!Pe.call(e,u))&&(e[u]=s[u])}return e})),_a=Jr((function(e){return e.push(o,ei),Nt(Ma,o,e)}));function ka(e,t,n){var r=null==e?o:Cr(e,t);return r===o?n:r}function Na(e,t){return null!=e&&gi(e,t,Er)}var Ea=$o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),el(rl)),Ta=$o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),ci),Oa=Jr(Or);function Ia(e){return Hs(e)?Jn(e):Dr(e)}function Ra(e){return Hs(e)?Jn(e,!0):Fr(e)}var Aa=Ao((function(e,t,n){$r(e,t,n)})),Ma=Ao((function(e,t,n,r){$r(e,t,n,r)})),Pa=ri((function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,(function(t){return t=xo(t,e),r||(r=t.length>1),t})),Io(e,ii(e),n),r&&(n=lr(n,7,ti));for(var o=t.length;o--;)ho(n,t[o]);return n}));var Da=ri((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Na(e,n)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var n=Pt(ii(e),(function(e){return[e]}));return t=ci(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var La=Ko(Ia),Ba=Ko(Ra);function Ua(e){return null==e?[]:en(e,Ia(e))}var Ga=Fo((function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)}));function $a(e){return Ja(ya(e).toLowerCase())}function qa(e){return(e=ya(e))&&e.replace(we,on).replace(tt,"")}var za=Fo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Fo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=Do("toLowerCase");var Wa=Fo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ya=Fo((function(e,t,n){return e+(n?" ":"")+Ja(t)}));var Qa=Fo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Do("toUpperCase");function Ka(e,t,n){return e=ya(e),(t=n?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Xa=Jr((function(e,t){try{return Nt(e,o,t)}catch(n){return Js(n)?n:new ae(n)}})),Za=ri((function(e,t){return Tt(t,(function(t){t=Fi(t),ir(e,t,Ts(e[t],e))})),e}));function el(e){return function(){return e}}var tl=Uo(),nl=Uo(!0);function rl(e){return e}function ol(e){return Pr("function"==typeof e?e:lr(e,1))}var il=Jr((function(e,t){return function(n){return Or(n,e,t)}})),sl=Jr((function(e,t){return function(n){return Or(e,n,t)}}));function al(e,t,n){var r=Ia(t),o=Sr(t,r);null!=n||ea(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Sr(t,Ia(t)));var i=!(ea(n)&&"chain"in n)||!!n.chain,s=Ks(e);return Tt(o,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Oo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function ll(){}var cl=zo(Pt),ul=zo(It),dl=zo(Bt);function hl(e){return wi(e)?Wt(Fi(e)):function(e){return function(t){return Cr(t,e)}}(e)}var pl=Ho(),fl=Ho(!0);function ml(){return[]}function gl(){return!1}var vl=qo((function(e,t){return e+t}),0),yl=Qo("ceil"),bl=qo((function(e,t){return e/t}),1),xl=Qo("floor");var wl=qo((function(e,t){return e*t}),1),Sl=Qo("round"),Cl=qo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=fa(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Ns,Un.assign=ba,Un.assignIn=xa,Un.assignInWith=wa,Un.assignWith=Sa,Un.at=Ca,Un.before=Es,Un.bind=Ts,Un.bindAll=Za,Un.bindKey=Os,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return zs(e)?e:[e]},Un.chain=hs,Un.chunk=function(e,t,r){t=(r?xi(e,t,r):t===o)?1:Yt(fa(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,l=n(pt(i/t));s<i;)l[a++]=ro(e,s,s+=t);return l},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Dt(zs(r)?Oo(r):[r],vr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=ci();return e=t?Pt(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Nt(o[0],this,n))return Nt(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Ia(e);return function(n){return cr(n,e,t)}}(lr(e,1))},Un.constant=el,Un.countBy=ms,Un.create=function(e,t){var n=Gn(e);return null==t?n:or(n,t)},Un.curry=function e(t,n,r){var i=Xo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.curryRight=function e(t,n,r){var i=Xo(t,l,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.debounce=Is,Un.defaults=ja,Un.defaultsDeep=_a,Un.defer=Rs,Un.delay=As,Un.difference=Ui,Un.differenceBy=Gi,Un.differenceWith=$i,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=n||t===o?1:fa(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,0,(t=r-(t=n||t===o?1:fa(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fo(e,ci(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fo(e,ci(t,3),!0):[]},Un.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&xi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=fa(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:fa(r))<0&&(r+=i),r=n>r?0:ma(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(zs(e)?Rt:gr)(e,ci(t,3))},Un.flatMap=function(e,t){return vr(Cs(e,t),1)},Un.flatMapDeep=function(e,t){return vr(Cs(e,t),p)},Un.flatMapDepth=function(e,t,n){return n=n===o?1:fa(n),vr(Cs(e,t),n)},Un.flatten=Vi,Un.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,p):[]},Un.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===o?1:fa(t)):[]},Un.flip=function(e){return Xo(e,512)},Un.flow=tl,Un.flowRight=nl,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:Sr(e,Ia(e))},Un.functionsIn=function(e){return null==e?[]:Sr(e,Ra(e))},Un.groupBy=xs,Un.initial=function(e){return(null==e?0:e.length)?ro(e,0,-1):[]},Un.intersection=Wi,Un.intersectionBy=Yi,Un.intersectionWith=Qi,Un.invert=Ea,Un.invertBy=Ta,Un.invokeMap=ws,Un.iteratee=ol,Un.keyBy=Ss,Un.keys=Ia,Un.keysIn=Ra,Un.map=Cs,Un.mapKeys=function(e,t){var n={};return t=ci(t,3),xr(e,(function(e,r,o){ir(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=ci(t,3),xr(e,(function(e,r,o){ir(n,r,t(e,r,o))})),n},Un.matches=function(e){return Ur(lr(e,1))},Un.matchesProperty=function(e,t){return Gr(e,lr(t,1))},Un.memoize=Ms,Un.merge=Aa,Un.mergeWith=Ma,Un.method=il,Un.methodOf=sl,Un.mixin=al,Un.negate=Ps,Un.nthArg=function(e){return e=fa(e),Jr((function(t){return qr(t,e)}))},Un.omit=Pa,Un.omitBy=function(e,t){return Fa(e,Ps(ci(t)))},Un.once=function(e){return Es(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(zs(t)||(t=null==t?[]:[t]),zs(n=r?o:n)||(n=null==n?[]:[n]),zr(e,t,n))},Un.over=cl,Un.overArgs=Ds,Un.overEvery=ul,Un.overSome=dl,Un.partial=Fs,Un.partialRight=Ls,Un.partition=js,Un.pick=Da,Un.pickBy=Fa,Un.property=hl,Un.propertyOf=function(e){return function(t){return null==e?o:Cr(e,t)}},Un.pull=Ki,Un.pullAll=Xi,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,ci(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,o,n):e},Un.pullAt=Zi,Un.range=pl,Un.rangeRight=fl,Un.rearg=Bs,Un.reject=function(e,t){return(zs(e)?Rt:gr)(e,Ps(ci(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ci(t,3);++r<i;){var s=e[r];t(s,r,e)&&(n.push(s),o.push(r))}return Wr(e,o),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Jr(e,t=t===o?t:fa(t))},Un.reverse=es,Un.sampleSize=function(e,t,n){return t=(n?xi(e,t,n):t===o)?1:fa(t),(zs(e)?Xn:Xr)(e,t)},Un.set=function(e,t,n){return null==e?e:Zr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Zr(e,t,n,r)},Un.shuffle=function(e){return(zs(e)?Zn:no)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&xi(e,t,n)?(t=0,n=r):(t=null==t?0:fa(t),n=n===o?r:fa(n)),ro(e,t,n)):[]},Un.sortBy=_s,Un.sortedUniq=function(e){return e&&e.length?ao(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?ao(e,ci(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&xi(e,t,n)&&(t=n=o),(n=n===o?g:n>>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=co(t))&&ln(e)?So(mn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:Yt(fa(t),0),Jr((function(n){var r=n[t],o=So(n,0,t);return r&&Dt(o,r),Nt(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ro(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ro(e,0,(t=n||t===o?1:fa(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=r-(t=n||t===o?1:fa(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fo(e,ci(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fo(e,ci(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Te(i);return ea(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Is(e,t,{leading:r,maxWait:t,trailing:o})},Un.thru=ps,Un.toArray=ha,Un.toPairs=La,Un.toPairsIn=Ba,Un.toPath=function(e){return zs(e)?Pt(e,Fi):la(e)?[e]:Oo(Di(ya(e)))},Un.toPlainObject=va,Un.transform=function(e,t,n){var r=zs(e),o=r||Ys(e)||ca(e);if(t=ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ea(e)&&Ks(i)?Gn(He(e)):{}}return(o?Tt:xr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Ns(e,1)},Un.union=ts,Un.unionBy=ns,Un.unionWith=rs,Un.uniq=function(e){return e&&e.length?uo(e):[]},Un.uniqBy=function(e,t){return e&&e.length?uo(e,ci(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Un.unset=function(e,t){return null==e||ho(e,t)},Un.unzip=os,Un.unzipWith=is,Un.update=function(e,t,n){return null==e?e:po(e,t,bo(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:po(e,t,bo(n),r)},Un.values=Ua,Un.valuesIn=function(e){return null==e?[]:en(e,Ra(e))},Un.without=ss,Un.words=Ka,Un.wrap=function(e,t){return Fs(bo(t),e)},Un.xor=as,Un.xorBy=ls,Un.xorWith=cs,Un.zip=us,Un.zipObject=function(e,t){return vo(e||[],t||[],tr)},Un.zipObjectDeep=function(e,t){return vo(e||[],t||[],Zr)},Un.zipWith=ds,Un.entries=La,Un.entriesIn=Ba,Un.extend=xa,Un.extendWith=wa,al(Un,Un),Un.add=vl,Un.attempt=Xa,Un.camelCase=Ga,Un.capitalize=$a,Un.ceil=yl,Un.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ga(n))===n?n:0),t!==o&&(t=(t=ga(t))===t?t:0),ar(ga(e),t,n)},Un.clone=function(e){return lr(e,4)},Un.cloneDeep=function(e){return lr(e,5)},Un.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:o)},Un.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:o)},Un.conformsTo=function(e,t){return null==t||cr(e,t,Ia(t))},Un.deburr=qa,Un.defaultTo=function(e,t){return null==e||e!==e?t:e},Un.divide=bl,Un.endsWith=function(e,t,n){e=ya(e),t=co(t);var r=e.length,i=n=n===o?r:ar(fa(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Un.eq=Us,Un.escape=function(e){return(e=ya(e))&&K.test(e)?e.replace(Q,sn):e},Un.escapeRegExp=function(e){return(e=ya(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},Un.every=function(e,t,n){var r=zs(e)?It:fr;return n&&xi(e,t,n)&&(t=o),r(e,ci(t,3))},Un.find=gs,Un.findIndex=qi,Un.findKey=function(e,t){return Gt(e,ci(t,3),xr)},Un.findLast=vs,Un.findLastIndex=zi,Un.findLastKey=function(e,t){return Gt(e,ci(t,3),wr)},Un.floor=xl,Un.forEach=ys,Un.forEachRight=bs,Un.forIn=function(e,t){return null==e?e:yr(e,ci(t,3),Ra)},Un.forInRight=function(e,t){return null==e?e:br(e,ci(t,3),Ra)},Un.forOwn=function(e,t){return e&&xr(e,ci(t,3))},Un.forOwnRight=function(e,t){return e&&wr(e,ci(t,3))},Un.get=ka,Un.gt=Gs,Un.gte=$s,Un.has=function(e,t){return null!=e&&gi(e,t,Nr)},Un.hasIn=Na,Un.head=Hi,Un.identity=rl,Un.includes=function(e,t,n,r){e=Hs(e)?e:Ua(e),n=n&&!r?fa(n):0;var o=e.length;return n<0&&(n=Yt(o+n,0)),aa(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&qt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fa(n);return o<0&&(o=Yt(r+o,0)),qt(e,t,o)},Un.inRange=function(e,t,n){return t=pa(t),n===o?(n=t,t=0):n=pa(n),function(e,t,n){return e>=bn(t,n)&&e<Yt(t,n)}(e=ga(e),t,n)},Un.invoke=Oa,Un.isArguments=qs,Un.isArray=zs,Un.isArrayBuffer=Vs,Un.isArrayLike=Hs,Un.isArrayLikeObject=Ws,Un.isBoolean=function(e){return!0===e||!1===e||ta(e)&&_r(e)==x},Un.isBuffer=Ys,Un.isDate=Qs,Un.isElement=function(e){return ta(e)&&1===e.nodeType&&!oa(e)},Un.isEmpty=function(e){if(null==e)return!0;if(Hs(e)&&(zs(e)||"string"==typeof e||"function"==typeof e.splice||Ys(e)||ca(e)||qs(e)))return!e.length;var t=mi(e);if(t==_||t==O)return!e.size;if(ji(e))return!Dr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Rr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Rr(e,t,o,n):!!r},Un.isError=Js,Un.isFinite=function(e){return"number"==typeof e&&bt(e)},Un.isFunction=Ks,Un.isInteger=Xs,Un.isLength=Zs,Un.isMap=na,Un.isMatch=function(e,t){return e===t||Ar(e,t,di(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ar(e,t,di(t),n)},Un.isNaN=function(e){return ra(e)&&e!=+e},Un.isNative=function(e){if(Ci(e))throw new ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=ra,Un.isObject=ea,Un.isObjectLike=ta,Un.isPlainObject=oa,Un.isRegExp=ia,Un.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Un.isSet=sa,Un.isString=aa,Un.isSymbol=la,Un.isTypedArray=ca,Un.isUndefined=function(e){return e===o},Un.isWeakMap=function(e){return ta(e)&&mi(e)==A},Un.isWeakSet=function(e){return ta(e)&&"[object WeakSet]"==_r(e)},Un.join=function(e,t){return null==e?"":xt.call(e,t)},Un.kebabCase=za,Un.last=Ji,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=fa(n))<0?Yt(r+i,0):bn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):$t(e,Vt,i,!0)},Un.lowerCase=Va,Un.lowerFirst=Ha,Un.lt=ua,Un.lte=da,Un.max=function(e){return e&&e.length?mr(e,rl,kr):o},Un.maxBy=function(e,t){return e&&e.length?mr(e,ci(t,2),kr):o},Un.mean=function(e){return Ht(e,rl)},Un.meanBy=function(e,t){return Ht(e,ci(t,2))},Un.min=function(e){return e&&e.length?mr(e,rl,Lr):o},Un.minBy=function(e,t){return e&&e.length?mr(e,ci(t,2),Lr):o},Un.stubArray=ml,Un.stubFalse=gl,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=wl,Un.nth=function(e,t){return e&&e.length?qr(e,fa(t)):o},Un.noConflict=function(){return mt._===this&&(mt._=Ue),this},Un.noop=ll,Un.now=ks,Un.pad=function(e,t,n){e=ya(e);var r=(t=fa(t))?fn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(ft(o),n)+e+Vo(pt(o),n)},Un.padEnd=function(e,t,n){e=ya(e);var r=(t=fa(t))?fn(e):0;return t&&r<t?e+Vo(t-r,n):e},Un.padStart=function(e,t,n){e=ya(e);var r=(t=fa(t))?fn(e):0;return t&&r<t?Vo(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(ya(e).replace(se,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&xi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=pa(e),t===o?(t=e,e=0):t=pa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Sn();return bn(e+i*(t-e+dt("1e-"+((i+"").length-1))),t)}return Yr(e,t)},Un.reduce=function(e,t,n){var r=zs(e)?Ft:Qt,o=arguments.length<3;return r(e,ci(t,4),n,o,hr)},Un.reduceRight=function(e,t,n){var r=zs(e)?Lt:Qt,o=arguments.length<3;return r(e,ci(t,4),n,o,pr)},Un.repeat=function(e,t,n){return t=(n?xi(e,t,n):t===o)?1:fa(t),Qr(ya(e),t)},Un.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,i=(t=xo(t,e)).length;for(i||(i=1,e=o);++r<i;){var s=null==e?o:e[Fi(t[r])];s===o&&(r=i,s=n),e=Ks(s)?s.call(e):s}return e},Un.round=Sl,Un.runInContext=e,Un.sample=function(e){return(zs(e)?Kn:Kr)(e)},Un.size=function(e){if(null==e)return 0;if(Hs(e))return aa(e)?fn(e):e.length;var t=mi(e);return t==_||t==O?e.size:Dr(e).length},Un.snakeCase=Wa,Un.some=function(e,t,n){var r=zs(e)?Bt:oo;return n&&xi(e,t,n)&&(t=o),r(e,ci(t,3))},Un.sortedIndex=function(e,t){return io(e,t)},Un.sortedIndexBy=function(e,t,n){return so(e,t,ci(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=io(e,t);if(r<n&&Us(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return io(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return so(e,t,ci(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=io(e,t,!0)-1;if(Us(e[n],t))return n}return-1},Un.startCase=Ya,Un.startsWith=function(e,t,n){return e=ya(e),n=null==n?0:ar(fa(n),0,e.length),t=co(t),e.slice(n,n+t.length)==t},Un.subtract=Cl,Un.sum=function(e){return e&&e.length?Jt(e,rl):0},Un.sumBy=function(e,t){return e&&e.length?Jt(e,ci(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&xi(e,t,n)&&(t=o),e=ya(e),t=wa({},t,r,Zo);var i,s,a=wa({},t.imports,r.imports,Zo),l=Ia(a),c=en(a,l),u=0,d=t.interpolate||Se,h="__p += '",p=Ne((t.escape||Se).source+"|"+d.source+"|"+(d===ee?fe:Se).source+"|"+(t.evaluate||Se).source+"|$","g"),f="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,(function(t,n,r,o,a,l){return r||(r=o),h+=e.slice(u,l).replace(Ce,an),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),h+="';\n";var m=Pe.call(t,"variable")&&t.variable;if(m){if(he.test(m))throw new ae("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(V,""):h).replace(H,"$1").replace(W,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Xa((function(){return je(l,f+"return "+h).apply(o,c)}));if(g.source=h,Js(g))throw g;return g},Un.times=function(e,t){if((e=fa(e))<1||e>f)return[];var n=g,r=bn(e,g);t=ci(t),e-=g;for(var o=Kt(r,t);++n<e;)t(n);return o},Un.toFinite=pa,Un.toInteger=fa,Un.toLength=ma,Un.toLower=function(e){return ya(e).toLowerCase()},Un.toNumber=ga,Un.toSafeInteger=function(e){return e?ar(fa(e),-9007199254740991,f):0===e?e:0},Un.toString=ya,Un.toUpper=function(e){return ya(e).toUpperCase()},Un.trim=function(e,t,n){if((e=ya(e))&&(n||t===o))return Xt(e);if(!e||!(t=co(t)))return e;var r=mn(e),i=mn(t);return So(r,nn(r,i),rn(r,i)+1).join("")},Un.trimEnd=function(e,t,n){if((e=ya(e))&&(n||t===o))return e.slice(0,gn(e)+1);if(!e||!(t=co(t)))return e;var r=mn(e);return So(r,0,rn(r,mn(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=ya(e))&&(n||t===o))return e.replace(se,"");if(!e||!(t=co(t)))return e;var r=mn(e);return So(r,nn(r,mn(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ea(t)){var i="separator"in t?t.separator:i;n="length"in t?fa(t.length):n,r="omission"in t?co(t.omission):r}var s=(e=ya(e)).length;if(ln(e)){var a=mn(e);s=a.length}if(n>=s)return e;var l=n-fn(r);if(l<1)return r;var c=a?So(a,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(a&&(l+=c.length-l),ia(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Ne(i.source,ya(me.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var h=u.index;c=c.slice(0,h===o?l:h)}}else if(e.indexOf(co(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},Un.unescape=function(e){return(e=ya(e))&&J.test(e)?e.replace(Y,vn):e},Un.uniqueId=function(e){var t=++De;return ya(e)+t},Un.upperCase=Qa,Un.upperFirst=Ja,Un.each=ys,Un.eachRight=bs,Un.first=Hi,al(Un,function(){var e={};return xr(Un,(function(t,n){Pe.call(Un.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Un.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),Tt(["drop","take"],(function(e,t){zn.prototype[e]=function(n){n=n===o?1:Yt(fa(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(rl)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return Or(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(Ps(ci(e)))},zn.prototype.slice=function(e,t){e=fa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=fa(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(g)},xr(zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Un[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(Un.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof zn,c=a[0],u=l||zs(t),d=function(e){var t=i.apply(Un,Dt([e],a));return r&&h?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=!!this.__actions__.length,f=s&&!h,m=l&&!p;if(!s&&u){t=m?t:new zn(this);var g=e.apply(t,a);return g.__actions__.push({func:ps,args:[d],thisArg:o}),new qn(g,h)}return f&&m?e.apply(this,a):(g=this.thru(d),f?r?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(zs(o)?o:[],e)}return this[n]((function(n){return t.apply(zs(n)?n:[],e)}))}})),xr(zn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Pe.call(In,r)||(In[r]=[]),In[r].push({name:t,func:n})}})),In[Go(o,2).name]=[{name:"wrapper",func:o}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=Oo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oo(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=zs(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=bn(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}(0,o,this.__views__),s=i.start,a=i.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,d=u.length,h=0,p=bn(l,this.__takeCount__);if(!n||!r&&o==l&&p==l)return mo(e,this.__actions__);var f=[];e:for(;l--&&h<p;){for(var m=-1,g=e[c+=t];++m<d;){var v=u[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[h++]=g}return f},Un.prototype.at=fs,Un.prototype.chain=function(){return hs(this)},Un.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===o&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var r=Bi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[es],thisArg:o}),new qn(t,this.__chain__)}return this.thru(es)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return mo(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Ke&&(Un.prototype[Ke]=function(){return this}),Un}();mt._=yn,(r=function(){return yn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},3411:(e,t,n)=>{var r=n(149),o=n(9096),i=n(8883),s=n(4052);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},5797:(e,t,n)=>{var r=n(4816);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},3932:(e,t,n)=>{var r=n(396),o=n(2866),i=n(2597),s=n(914);e.exports=function(e){return i(e)?r(s(e)):o(e)}},7828:e=>{e.exports=function(){return[]}},14:e=>{e.exports=function(){return!1}},1069:(e,t,n)=>{var r=n(8541);e.exports=function(e){return null==e?"":r(e)}},6178:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Yn(e,t,n,r,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function v(e){var t=null,r=!1,o=e._d&&!isNaN(e._d.getTime());return o&&(t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?o:(e._isValid=o,e._isValid)}function y(e){var t=f(NaN);return null!=e?p(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],x=!1;function w(e,t){var n,r,o,i=b.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)c(o=t[r=b[n]])||(e[r]=o);return e}function S(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===x&&(x=!0,r.updateOffset(this),x=!1)}function C(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function j(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,t){var n=!0;return p((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,i,s,l=[],c=arguments.length;for(i=0;i<c;i++){if(o="","object"===typeof arguments[i]){for(s in o+="\n["+i+"] ",arguments[0])a(arguments[0],s)&&(o+=s+": "+arguments[0][s]+", ");o=o.slice(0,-2)}else o=arguments[i];l.push(o)}j(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var k,N={};function E(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),N[e]||(j(t),N[e]=!0)}function T(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)a(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(e,t){var n,r=p({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=p({},r[n]));return r}function R(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r}function P(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},B={};function U(e,t,n,r){var o=r;"string"===typeof r&&(o=function(){return this[r]()}),e&&(B[e]=o),t&&(B[t[0]]=function(){return P(o.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function G(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,n,r=e.match(D);for(t=0,n=r.length;t<n;t++)B[r[t]]?r[t]=B[r[t]]:r[t]=G(r[t]);return function(t){var o,i="";for(o=0;o<n;o++)i+=T(r[o])?r[o].call(t,e):r[o];return i}}function q(e,t){return e.isValid()?(t=z(t,e.localeData()),L[t]=L[t]||$(t),L[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;n>=0&&F.test(e);)e=e.replace(F,r),F.lastIndex=0,n-=1;return e}var V={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function H(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(D).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var W="Invalid date";function Y(){return this._invalidDate}var Q="%d",J=/\d{1,2}/;function K(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Z(e,t,n,r){var o=this._relativeTime[n];return T(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)a(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ie(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var se,ae=/\d/,le=/\d\d/,ce=/\d{3}/,ue=/\d{4}/,de=/[+-]?\d{6}/,he=/\d\d?/,pe=/\d\d\d\d?/,fe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ye=/\d+/,be=/[+-]?\d+/,xe=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,Se=/[+-]?\d+(\.\d{1,3})?/,Ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,je=/^[1-9]\d?/,_e=/^([1-9]\d|\d)/;function ke(e,t,n){se[e]=T(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return a(se,e)?se[e](t._strict,t._locale):new RegExp(Ee(e))}function Ee(e){return Te(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o})))}function Te(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Oe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Oe(t)),n}se={};var Re={};function Ae(e,t){var n,r,o=t;for("string"===typeof e&&(e=[e]),u(t)&&(o=function(e,n){n[t]=Ie(e)}),r=e.length,n=0;n<r;n++)Re[e[n]]=o}function Me(e,t){Ae(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function Pe(e,t,n){null!=t&&a(Re,e)&&Re[e](t,n._a,n,e)}function De(e){return e%4===0&&e%100!==0||e%400===0}var Fe=0,Le=1,Be=2,Ue=3,Ge=4,$e=5,qe=6,ze=7,Ve=8;function He(e){return De(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),ke("Y",be),ke("YY",he,le),ke("YYYY",ge,ue),ke("YYYYY",ve,de),ke("YYYYYY",ve,de),Ae(["YYYYY","YYYYYY"],Fe),Ae("YYYY",(function(e,t){t[Fe]=2===e.length?r.parseTwoDigitYear(e):Ie(e)})),Ae("YY",(function(e,t){t[Fe]=r.parseTwoDigitYear(e)})),Ae("Y",(function(e,t){t[Fe]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var We,Ye=Je("FullYear",!0);function Qe(){return De(this.year())}function Je(e,t){return function(n){return null!=n?(Xe(this,e,n),r.updateOffset(this,t),this):Ke(this,e)}}function Ke(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Xe(e,t,n){var r,o,i,s,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,s=e.month(),a=29!==(a=e.date())||1!==s||De(i)?a:28,o?r.setUTCFullYear(i,s,a):r.setFullYear(i,s,a)}}function Ze(e){return T(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,r=ie(e=re(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?De(e)?29:28:31-n%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ke("M",he,je),ke("MM",he,le),ke("MMM",(function(e,t){return t.monthsShortRegex(e)})),ke("MMMM",(function(e,t){return t.monthsRegex(e)})),Ae(["M","MM"],(function(e,t){t[Le]=Ie(e)-1})),Ae(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Le]=o:g(n).invalidMonth=e}));var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),it=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,st=Ce,at=Ce;function lt(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone}function ct(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ut(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=We.call(this._shortMonthsParse,s))?o:null:-1!==(o=We.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=We.call(this._shortMonthsParse,s))||-1!==(o=We.call(this._longMonthsParse,s))?o:null:-1!==(o=We.call(this._longMonthsParse,s))||-1!==(o=We.call(this._shortMonthsParse,s))?o:null}function dt(e,t,n){var r,o,i;if(this._monthsParseExact)return ut.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ht(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=Ie(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(ht(this,e),r.updateOffset(this,!0),this):Ke(this,"Month")}function ft(){return nt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(a(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=st),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(a(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=at),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,n,r,o,i=[],s=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r=Te(this.monthsShort(n,"")),o=Te(this.months(n,"")),i.push(r),s.push(o),a.push(o),a.push(r);i.sort(e),s.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function yt(e,t,n,r,o,i,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,i,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,i,s),a}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,o){var i,s,a=1+7*(t-1)+(7+n-r)%7+xt(e,r,o);return a<=0?s=He(i=e-1)+a:a>He(e)?(i=e+1,s=a-He(e)):(i=e,s=a),{year:i,dayOfYear:s}}function St(e,t,n){var r,o,i=xt(e.year(),t,n),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?r=s+Ct(o=e.year()-1,t,n):s>Ct(e.year(),t,n)?(r=s-Ct(e.year(),t,n),o=e.year()+1):(o=e.year(),r=s),{week:r,year:o}}function Ct(e,t,n){var r=xt(e,t,n),o=xt(e+1,t,n);return(He(e)-r+o)/7}function jt(e){return St(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),ke("w",he,je),ke("ww",he,le),ke("W",he,je),ke("WW",he,le),Me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=Ie(e)}));var _t={dow:0,doy:6};function kt(){return this._week.dow}function Nt(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Tt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function It(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),ke("d",he),ke("e",he),ke("E",he),ke("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ke("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ke("dddd",(function(e,t){return t.weekdaysRegex(e)})),Me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e})),Me(["d","e","E"],(function(e,t,n,r){t[r]=Ie(e)}));var At="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Dt=Ce,Ft=Ce,Lt=Ce;function Bt(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function Ut(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Gt(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function $t(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=We.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=We.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=We.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=We.call(this._weekdaysParse,s))||-1!==(o=We.call(this._shortWeekdaysParse,s))||-1!==(o=We.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=We.call(this._shortWeekdaysParse,s))||-1!==(o=We.call(this._weekdaysParse,s))||-1!==(o=We.call(this._minWeekdaysParse,s))?o:null:-1!==(o=We.call(this._minWeekdaysParse,s))||-1!==(o=We.call(this._weekdaysParse,s))||-1!==(o=We.call(this._shortWeekdaysParse,s))?o:null}function qt(e,t,n){var r,o,i;if(this._weekdaysParseExact)return $t.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function zt(e){if(!this.isValid())return null!=e?this:NaN;var t=Ke(this,"Day");return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ht(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Lt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=Te(this.weekdaysMin(n,"")),o=Te(this.weekdaysShort(n,"")),i=Te(this.weekdays(n,"")),s.push(r),a.push(o),l.push(i),c.push(r),c.push(o),c.push(i);s.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Xt(){return this.hours()||24}function Zt(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Kt),U("k",["kk",2],0,Xt),U("hmm",0,0,(function(){return""+Kt.apply(this)+P(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Kt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),ke("a",en),ke("A",en),ke("H",he,_e),ke("h",he,je),ke("k",he,je),ke("HH",he,le),ke("hh",he,le),ke("kk",he,le),ke("hmm",pe),ke("hmmss",fe),ke("Hmm",pe),ke("Hmmss",fe),Ae(["H","HH"],Ue),Ae(["k","kk"],(function(e,t,n){var r=Ie(e);t[Ue]=24===r?0:r})),Ae(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ae(["h","hh"],(function(e,t,n){t[Ue]=Ie(e),g(n).bigHour=!0})),Ae("hmm",(function(e,t,n){var r=e.length-2;t[Ue]=Ie(e.substr(0,r)),t[Ge]=Ie(e.substr(r)),g(n).bigHour=!0})),Ae("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=Ie(e.substr(0,r)),t[Ge]=Ie(e.substr(r,2)),t[$e]=Ie(e.substr(o)),g(n).bigHour=!0})),Ae("Hmm",(function(e,t,n){var r=e.length-2;t[Ue]=Ie(e.substr(0,r)),t[Ge]=Ie(e.substr(r))})),Ae("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=Ie(e.substr(0,r)),t[Ge]=Ie(e.substr(r,2)),t[$e]=Ie(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,rn=Je("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,an={calendar:A,longDateFormat:V,invalidDate:W,ordinal:Q,dayOfMonthOrdinalParse:J,relativeTime:X,months:rt,monthsShort:ot,week:_t,weekdays:At,weekdaysMin:Pt,weekdaysShort:Mt,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function hn(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=dn(e[i]).split("-")).length,n=(n=dn(e[i+1]))?n.split("-"):null;t>0;){if(r=fn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(o,n)>=t-1)break;t--}i++}return sn}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&pn(t))try{n=sn._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),mn(n)}catch(r){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=c(t)?yn(e):gn(e,t))?sn=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function gn(e,t){if(null!==t){var n,r=an;if(t.abbr=e,null!=ln[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=fn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new R(I(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,o=an;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(I(ln[e]._config,t)):(null!=(r=fn(e))&&(o=r._config),t=I(o,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!i(e)){if(t=fn(e))return t;e=[e]}return hn(e)}function bn(){return k(ln)}function xn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Le]<0||n[Le]>11?Le:n[Be]<1||n[Be]>nt(n[Fe],n[Le])?Be:n[Ue]<0||n[Ue]>24||24===n[Ue]&&(0!==n[Ge]||0!==n[$e]||0!==n[qe])?Ue:n[Ge]<0||n[Ge]>59?Ge:n[$e]<0||n[$e]>59?$e:n[qe]<0||n[qe]>999?qe:-1,g(e)._overflowDayOfYear&&(t<Fe||t>Be)&&(t=Be),g(e)._overflowWeeks&&-1===t&&(t=ze),g(e)._overflowWeekday&&-1===t&&(t=Ve),g(e).overflow=t),e}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,jn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kn=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,En={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tn(e){var t,n,r,o,i,s,a=e._i,l=wn.exec(a)||Sn.exec(a),c=jn.length,u=_n.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(jn[t][1].exec(l[1])){o=jn[t][0],r=!1!==jn[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(_n[t][1].exec(l[3])){i=(l[2]||" ")+_n[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Cn.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(i||"")+(s||""),Gn(e)}else e._isValid=!1}function On(e,t,n,r,o,i){var s=[In(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return i&&s.push(parseInt(i,10)),s}function In(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function An(e,t,n){return!e||Mt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Mn(e,t,n){if(e)return En[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function Pn(e){var t,n=Nn.exec(Rn(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!An(n[1],t,e))return;e._a=t,e._tzm=Mn(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Dn(e){var t=kn.exec(e._i);null===t?(Tn(e),!1===e._isValid&&(delete e._isValid,Pn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Fn(e,t,n){return null!=e?e:null!=t?t:n}function Ln(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Bn(e){var t,n,r,o,i,s=[];if(!e._d){for(r=Ln(e),e._w&&null==e._a[Be]&&null==e._a[Le]&&Un(e),null!=e._dayOfYear&&(i=Fn(e._a[Fe],r[Fe]),(e._dayOfYear>He(i)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(i,0,e._dayOfYear),e._a[Le]=n.getUTCMonth(),e._a[Be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ue]&&0===e._a[Ge]&&0===e._a[$e]&&0===e._a[qe]&&(e._nextDay=!0,e._a[Ue]=0),e._d=(e._useUTC?bt:yt).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ue]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,o,i,s,a,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,s=4,n=Fn(t.GG,e._a[Fe],St(Qn(),1,4).year),r=Fn(t.W,1),((o=Fn(t.E,1))<1||o>7)&&(l=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,c=St(Qn(),i,s),n=Fn(t.gg,e._a[Fe],c.year),r=Fn(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i),r<1||r>Ct(n,i,s)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(a=wt(n,r,o,i,s),e._a[Fe]=a.year,e._dayOfYear=a.dayOfYear)}function Gn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,i,s,a,l,c=""+e._i,u=c.length,d=0;for(l=(o=z(e._f,e._locale).match(D)||[]).length,t=0;t<l;t++)i=o[t],(n=(c.match(Ne(i,e))||[])[0])&&((s=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(s),c=c.slice(c.indexOf(n)+n.length),d+=n.length),B[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),Pe(i,n,e)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ue]<=12&&!0===g(e).bigHour&&e._a[Ue]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ue]=$n(e._locale,e._a[Ue],e._meridiem),null!==(a=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(a,e._a[Fe])),Bn(e),xn(e)}else Pn(e);else Tn(e)}function $n(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function qn(e){var t,n,r,o,i,s,a=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)i=0,s=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Gn(t),v(t)&&(s=!0),i+=g(t).charsLeftOver,i+=10*g(t).unusedTokens.length,g(t).score=i,a?i<r&&(r=i,n=t):(null==r||i<r||s)&&(r=i,n=t,s&&(a=!0));p(e,n||t)}function zn(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Bn(e)}}function Vn(e){var t=new S(xn(Hn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Hn(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new S(xn(t)):(d(t)?e._d=t:i(n)?qn(e):n?Gn(e):Wn(e),v(e)||(e._d=null),e))}function Wn(e){var t=e._i;c(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Dn(e):i(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),Bn(e)):s(t)?zn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Yn(e,t,n,r,o){var a={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||i(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=n,a._i=e,a._f=t,a._strict=r,Vn(a)}function Qn(e,t,n,r){return Yn(e,t,n,r,!1)}r.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Jn=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Qn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Kn=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Qn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Xn(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Qn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Zn(){return Xn("isBefore",[].slice.call(arguments,0))}function er(){return Xn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(a(e,t)&&(-1===We.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Ie(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ir(){return Er(NaN)}function sr(e){var t=re(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=yn(),this._bubble()}function ar(e){return e instanceof sr}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&Ie(e[r])!==Ie(t[r]))&&s++;return s+i}function ur(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}ur("Z",":"),ur("ZZ",""),ke("Z",we),ke("ZZ",we),Ae(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=hr(we,e)}));var dr=/([\+\-]|\d\d)/gi;function hr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+Ie(n[2]))?0:"+"===n[0]?r:-r}function pr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(C(e)||d(e)?e.valueOf():Qn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Qn(e).local()}function fr(e){return-Math.round(e._d.getTimezoneOffset())}function mr(e,t,n){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=hr(we,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=fr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!t||this._changeInProgress?Ar(this,Er(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:fr(this)}function gr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function yr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(fr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=hr(xe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xr(e){return!!this.isValid()&&(e=e?Qn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function wr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Hn(t))._a?(e=t._isUTC?f(t._a):Qn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Cr(){return!!this.isValid()&&!this._isUTC}function jr(){return!!this.isValid()&&this._isUTC}function _r(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var kr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Er(e,t){var n,r,o,i=e,s=null;return ar(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(s=kr.exec(e))?(n="-"===s[1]?-1:1,i={y:0,d:Ie(s[Be])*n,h:Ie(s[Ue])*n,m:Ie(s[Ge])*n,s:Ie(s[$e])*n,ms:Ie(lr(1e3*s[qe]))*n}):(s=Nr.exec(e))?(n="-"===s[1]?-1:1,i={y:Tr(s[2],n),M:Tr(s[3],n),w:Tr(s[4],n),d:Tr(s[5],n),h:Tr(s[6],n),m:Tr(s[7],n),s:Tr(s[8],n)}):null==i?i={}:"object"===typeof i&&("from"in i||"to"in i)&&(o=Ir(Qn(i.from),Qn(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new sr(i),ar(e)&&a(e,"_locale")&&(r._locale=e._locale),ar(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Tr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Or(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ir(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Or(e,t):((n=Or(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Ar(this,Er(n,r),e),this}}function Ar(e,t,n,o){var i=t._milliseconds,s=lr(t._days),a=lr(t._months);e.isValid()&&(o=null==o||o,a&&ht(e,Ke(e,"Month")+a*n),s&&Xe(e,"Date",Ke(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&r.updateOffset(e,s||a))}Er.fn=sr.prototype,Er.invalid=ir;var Mr=Rr(1,"add"),Pr=Rr(-1,"subtract");function Dr(e){return"string"===typeof e||e instanceof String}function Fr(e){return C(e)||d(e)||Dr(e)||u(e)||Br(e)||Lr(e)||null===e||void 0===e}function Lr(e){var t,n,r=s(e)&&!l(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=i.length;for(t=0;t<c;t+=1)n=i[t],o=o||a(e,n);return r&&o}function Br(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Dr(e)})).length),t&&n}function Ur(e){var t,n,r=s(e)&&!l(e),o=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)n=i[t],o=o||a(e,n);return r&&o}function Gr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function $r(e,t){1===arguments.length&&(arguments[0]?Fr(arguments[0])?(e=arguments[0],t=void 0):Ur(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Qn(),o=pr(n,this).startOf("day"),i=r.calendarFormat(this,o)||"sameElse",s=t&&(T(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,Qn(n)))}function qr(){return new S(this)}function zr(e,t){var n=C(e)?e:Qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Vr(e,t){var n=C(e)?e:Qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Hr(e,t,n,r){var o=C(e)?e:Qn(e),i=C(t)?t:Qn(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))}function Wr(e,t){var n,r=C(e)?e:Qn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Yr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Qr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jr(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=pr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":i=Kr(this,r)/12;break;case"month":i=Kr(this,r);break;case"quarter":i=Kr(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:Oe(i)}function Kr(e,t){if(e.date()<t.date())return-Kr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",i="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=i+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(C(e)&&e.isValid()||Qn(e).isValid())?Er({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Qn(),e)}function oo(e,t){return this.isValid()&&(C(e)&&e.isValid()||Qn(e).isValid())?Er({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function io(e){return this.to(Qn(),e)}function so(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ao=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function lo(){return this._locale}var co=1e3,uo=60*co,ho=60*uo,po=3506328*ho;function fo(e,t){return(e%t+t)%t}function mo(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-po:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-po:Date.UTC(e,t,n)}function vo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fo(t+(this._isUTC?0:this.utcOffset()*uo),ho);break;case"minute":t=this._d.valueOf(),t-=fo(t,uo);break;case"second":t=this._d.valueOf(),t-=fo(t,co)}return this._d.setTime(t),r.updateOffset(this,!0),this}function yo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ho-fo(t+(this._isUTC?0:this.utcOffset()*uo),ho)-1;break;case"minute":t=this._d.valueOf(),t+=uo-fo(t,uo)-1;break;case"second":t=this._d.valueOf(),t+=co-fo(t,co)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function xo(){return Math.floor(this.valueOf()/1e3)}function wo(){return new Date(this.valueOf())}function So(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Co(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function jo(){return this.isValid()?this.toISOString():null}function _o(){return v(this)}function ko(){return p({},g(this))}function No(){return g(this).overflow}function Eo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function To(e,t){var n,o,i,s=this._eras||yn("en")._eras;for(n=0,o=s.length;n<o;++n)switch("string"===typeof s[n].since&&(i=r(s[n].since).startOf("day"),s[n].since=i.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=r(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}return s}function Oo(e,t,n){var r,o,i,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(i=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([i,s,a].indexOf(e)>=0)return l[r]}function Io(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ro(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ao(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Mo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Po(){var e,t,n,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-r(i[e].since).year())*n+i[e].offset;return this.year()}function Do(e){return a(this,"_erasNameRegex")||qo.call(this),e?this._erasNameRegex:this._erasRegex}function Fo(e){return a(this,"_erasAbbrRegex")||qo.call(this),e?this._erasAbbrRegex:this._erasRegex}function Lo(e){return a(this,"_erasNarrowRegex")||qo.call(this),e?this._erasNarrowRegex:this._erasRegex}function Bo(e,t){return t.erasAbbrRegex(e)}function Uo(e,t){return t.erasNameRegex(e)}function Go(e,t){return t.erasNarrowRegex(e)}function $o(e,t){return t._eraYearOrdinalRegex||ye}function qo(){var e,t,n,r,o,i=[],s=[],a=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=Te(c[e].name),r=Te(c[e].abbr),o=Te(c[e].narrow),s.push(n),i.push(r),a.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function zo(e,t){U(0,[e,e.length],0,t)}function Vo(e){return Ko.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ho(e){return Ko.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Wo(){return Ct(this.year(),1,4)}function Yo(){return Ct(this.isoWeekYear(),1,4)}function Qo(){var e=this.localeData()._week;return Ct(this.year(),e.dow,e.doy)}function Jo(){var e=this.localeData()._week;return Ct(this.weekYear(),e.dow,e.doy)}function Ko(e,t,n,r,o){var i;return null==e?St(this,r,o).year:(t>(i=Ct(e,r,o))&&(t=i),Xo.call(this,e,t,n,r,o))}function Xo(e,t,n,r,o){var i=wt(e,t,n,r,o),s=bt(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Zo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),ke("N",Bo),ke("NN",Bo),ke("NNN",Bo),ke("NNNN",Uo),ke("NNNNN",Go),Ae(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e})),ke("y",ye),ke("yy",ye),ke("yyy",ye),ke("yyyy",ye),ke("yo",$o),Ae(["y","yy","yyy","yyyy"],Fe),Ae(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,o):t[Fe]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zo("gggg","weekYear"),zo("ggggg","weekYear"),zo("GGGG","isoWeekYear"),zo("GGGGG","isoWeekYear"),ke("G",be),ke("g",be),ke("GG",he,le),ke("gg",he,le),ke("GGGG",ge,ue),ke("gggg",ge,ue),ke("GGGGG",ve,de),ke("ggggg",ve,de),Me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=Ie(e)})),Me(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),ke("Q",ae),Ae("Q",(function(e,t){t[Le]=3*(Ie(e)-1)})),U("D",["DD",2],"Do","date"),ke("D",he,je),ke("DD",he,le),ke("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ae(["D","DD"],Be),Ae("Do",(function(e,t){t[Be]=Ie(e.match(he)[0])}));var ei=Je("Date",!0);function ti(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}U("DDD",["DDDD",3],"DDDo","dayOfYear"),ke("DDD",me),ke("DDDD",ce),Ae(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=Ie(e)})),U("m",["mm",2],0,"minute"),ke("m",he,_e),ke("mm",he,le),Ae(["m","mm"],Ge);var ni=Je("Minutes",!1);U("s",["ss",2],0,"second"),ke("s",he,_e),ke("ss",he,le),Ae(["s","ss"],$e);var ri,oi,ii=Je("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ke("S",me,ae),ke("SS",me,le),ke("SSS",me,ce),ri="SSSS";ri.length<=9;ri+="S")ke(ri,ye);function si(e,t){t[qe]=Ie(1e3*("0."+e))}for(ri="S";ri.length<=9;ri+="S")Ae(ri,si);function ai(){return this._isUTC?"UTC":""}function li(){return this._isUTC?"Coordinated Universal Time":""}oi=Je("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var ci=S.prototype;function ui(e){return Qn(1e3*e)}function di(){return Qn.apply(null,arguments).parseZone()}function hi(e){return e}ci.add=Mr,ci.calendar=$r,ci.clone=qr,ci.diff=Jr,ci.endOf=yo,ci.format=to,ci.from=no,ci.fromNow=ro,ci.to=oo,ci.toNow=io,ci.get=Ze,ci.invalidAt=No,ci.isAfter=zr,ci.isBefore=Vr,ci.isBetween=Hr,ci.isSame=Wr,ci.isSameOrAfter=Yr,ci.isSameOrBefore=Qr,ci.isValid=_o,ci.lang=ao,ci.locale=so,ci.localeData=lo,ci.max=Kn,ci.min=Jn,ci.parsingFlags=ko,ci.set=et,ci.startOf=vo,ci.subtract=Pr,ci.toArray=So,ci.toObject=Co,ci.toDate=wo,ci.toISOString=Zr,ci.inspect=eo,"undefined"!==typeof Symbol&&null!=Symbol.for&&(ci[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ci.toJSON=jo,ci.toString=Xr,ci.unix=xo,ci.valueOf=bo,ci.creationData=Eo,ci.eraName=Ro,ci.eraNarrow=Ao,ci.eraAbbr=Mo,ci.eraYear=Po,ci.year=Ye,ci.isLeapYear=Qe,ci.weekYear=Vo,ci.isoWeekYear=Ho,ci.quarter=ci.quarters=Zo,ci.month=pt,ci.daysInMonth=ft,ci.week=ci.weeks=Et,ci.isoWeek=ci.isoWeeks=Tt,ci.weeksInYear=Qo,ci.weeksInWeekYear=Jo,ci.isoWeeksInYear=Wo,ci.isoWeeksInISOWeekYear=Yo,ci.date=ei,ci.day=ci.days=zt,ci.weekday=Vt,ci.isoWeekday=Ht,ci.dayOfYear=ti,ci.hour=ci.hours=rn,ci.minute=ci.minutes=ni,ci.second=ci.seconds=ii,ci.millisecond=ci.milliseconds=oi,ci.utcOffset=mr,ci.utc=vr,ci.local=yr,ci.parseZone=br,ci.hasAlignedHourOffset=xr,ci.isDST=wr,ci.isLocal=Cr,ci.isUtcOffset=jr,ci.isUtc=_r,ci.isUTC=_r,ci.zoneAbbr=ai,ci.zoneName=li,ci.dates=_("dates accessor is deprecated. Use date instead.",ei),ci.months=_("months accessor is deprecated. Use month instead",pt),ci.years=_("years accessor is deprecated. Use year instead",Ye),ci.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ci.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sr);var pi=R.prototype;function fi(e,t,n,r){var o=yn(),i=f().set(r,t);return o[n](i,e)}function mi(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return fi(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=fi(e,r,n,"month");return o}function gi(e,t,n,r){"boolean"===typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,i=yn(),s=e?i._week.dow:0,a=[];if(null!=n)return fi(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=fi(t,(o+s)%7,r,"day");return a}function vi(e,t){return mi(e,t,"months")}function yi(e,t){return mi(e,t,"monthsShort")}function bi(e,t,n){return gi(e,t,n,"weekdays")}function xi(e,t,n){return gi(e,t,n,"weekdaysShort")}function wi(e,t,n){return gi(e,t,n,"weekdaysMin")}pi.calendar=M,pi.longDateFormat=H,pi.invalidDate=Y,pi.ordinal=K,pi.preparse=hi,pi.postformat=hi,pi.relativeTime=Z,pi.pastFuture=ee,pi.set=O,pi.eras=To,pi.erasParse=Oo,pi.erasConvertYear=Io,pi.erasAbbrRegex=Fo,pi.erasNameRegex=Do,pi.erasNarrowRegex=Lo,pi.months=lt,pi.monthsShort=ct,pi.monthsParse=dt,pi.monthsRegex=gt,pi.monthsShortRegex=mt,pi.week=jt,pi.firstDayOfYear=Nt,pi.firstDayOfWeek=kt,pi.weekdays=Bt,pi.weekdaysMin=Gt,pi.weekdaysShort=Ut,pi.weekdaysParse=qt,pi.weekdaysRegex=Wt,pi.weekdaysShortRegex=Yt,pi.weekdaysMinRegex=Qt,pi.isPM=tn,pi.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ie(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",yn);var Si=Math.abs;function Ci(){var e=this._data;return this._milliseconds=Si(this._milliseconds),this._days=Si(this._days),this._months=Si(this._months),e.milliseconds=Si(e.milliseconds),e.seconds=Si(e.seconds),e.minutes=Si(e.minutes),e.hours=Si(e.hours),e.months=Si(e.months),e.years=Si(e.years),this}function ji(e,t,n,r){var o=Er(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function _i(e,t){return ji(this,e,t,1)}function ki(e,t){return ji(this,e,t,-1)}function Ni(e){return e<0?Math.floor(e):Math.ceil(e)}function Ei(){var e,t,n,r,o,i=this._milliseconds,s=this._days,a=this._months,l=this._data;return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*Ni(Oi(a)+s),s=0,a=0),l.milliseconds=i%1e3,e=Oe(i/1e3),l.seconds=e%60,t=Oe(e/60),l.minutes=t%60,n=Oe(t/60),l.hours=n%24,s+=Oe(n/24),a+=o=Oe(Ti(s)),s-=Ni(Oi(o)),r=Oe(a/12),a%=12,l.days=s,l.months=a,l.years=r,this}function Ti(e){return 4800*e/146097}function Oi(e){return 146097*e/4800}function Ii(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ti(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Oi(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ri(e){return function(){return this.as(e)}}var Ai=Ri("ms"),Mi=Ri("s"),Pi=Ri("m"),Di=Ri("h"),Fi=Ri("d"),Li=Ri("w"),Bi=Ri("M"),Ui=Ri("Q"),Gi=Ri("y"),$i=Ai;function qi(){return Er(this)}function zi(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Vi(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hi=Vi("milliseconds"),Wi=Vi("seconds"),Yi=Vi("minutes"),Qi=Vi("hours"),Ji=Vi("days"),Ki=Vi("months"),Xi=Vi("years");function Zi(){return Oe(this.days()/7)}var es=Math.round,ts={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ns(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function rs(e,t,n,r){var o=Er(e).abs(),i=es(o.as("s")),s=es(o.as("m")),a=es(o.as("h")),l=es(o.as("d")),c=es(o.as("M")),u=es(o.as("w")),d=es(o.as("y")),h=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ns.apply(null,h)}function os(e){return void 0===e?es:"function"===typeof e&&(es=e,!0)}function is(e,t){return void 0!==ts[e]&&(void 0===t?ts[e]:(ts[e]=t,"s"===e&&(ts.ss=t-1),!0))}function ss(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=ts;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(o=e),"object"===typeof t&&(i=Object.assign({},ts,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=rs(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var as=Math.abs;function ls(e){return(e>0)-(e<0)||+e}function cs(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,s,a,l=as(this._milliseconds)/1e3,c=as(this._days),u=as(this._months),d=this.asSeconds();return d?(e=Oe(l/60),t=Oe(e/60),l%=60,e%=60,n=Oe(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",i=ls(this._months)!==ls(d)?"-":"",s=ls(this._days)!==ls(d)?"-":"",a=ls(this._milliseconds)!==ls(d)?"-":"",o+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(c?s+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var us=sr.prototype;return us.isValid=or,us.abs=Ci,us.add=_i,us.subtract=ki,us.as=Ii,us.asMilliseconds=Ai,us.asSeconds=Mi,us.asMinutes=Pi,us.asHours=Di,us.asDays=Fi,us.asWeeks=Li,us.asMonths=Bi,us.asQuarters=Ui,us.asYears=Gi,us.valueOf=$i,us._bubble=Ei,us.clone=qi,us.get=zi,us.milliseconds=Hi,us.seconds=Wi,us.minutes=Yi,us.hours=Qi,us.days=Ji,us.weeks=Zi,us.months=Ki,us.years=Xi,us.humanize=ss,us.toISOString=cs,us.toString=cs,us.toJSON=cs,us.locale=so,us.localeData=lo,us.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),us.lang=ao,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ke("x",be),ke("X",Se),Ae("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ae("x",(function(e,t,n){n._d=new Date(Ie(e))})),r.version="2.30.1",o(Qn),r.fn=ci,r.min=Zn,r.max=er,r.now=tr,r.utc=f,r.unix=ui,r.months=vi,r.isDate=d,r.locale=mn,r.invalid=y,r.duration=Er,r.isMoment=C,r.weekdays=bi,r.parseZone=di,r.localeData=yn,r.isDuration=ar,r.monthsShort=yi,r.weekdaysMin=wi,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=xi,r.normalizeUnits=ne,r.relativeTimeRounding=os,r.relativeTimeThreshold=is,r.calendarFormat=Gr,r.prototype=ci,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},6589:(e,t,n)=>{"use strict";var r=n(2043),o=n(3957);function i(e){e=e||{},this.catalogs={},this.locale="",this.domain="messages",this.listeners=[],this.sourceLocale="",e.sourceLocale&&("string"===typeof e.sourceLocale?this.sourceLocale=e.sourceLocale:this.warn("The `sourceLocale` option should be a string")),this.debug="debug"in e&&!0===e.debug}e.exports=i,i.prototype.on=function(e,t){this.listeners.push({eventName:e,callback:t})},i.prototype.off=function(e,t){this.listeners=this.listeners.filter((function(n){return!1===(n.eventName===e&&n.callback===t)}))},i.prototype.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];r.eventName===e&&r.callback(t)}},i.prototype.warn=function(e){this.debug&&console.warn(e),this.emit("error",new Error(e))},i.prototype.addTranslations=function(e,t,n){this.catalogs[e]||(this.catalogs[e]={}),this.catalogs[e][t]=n},i.prototype.setLocale=function(e){"string"===typeof e?(""===e.trim()&&this.warn("You called setLocale() with an empty value, which makes little sense."),e===this.sourceLocale||this.catalogs[e]||this.warn('You called setLocale() with "'+e+'", but no translations for that locale has been added.'),this.locale=e):this.warn("You called setLocale() with an argument of type "+typeof e+". The locale must be a string.")},i.prototype.setTextDomain=function(e){"string"===typeof e?(""===e.trim()&&this.warn("You called setTextDomain() with an empty `domain` value."),this.domain=e):this.warn("You called setTextDomain() with an argument of type "+typeof e+". The domain must be a string.")},i.prototype.gettext=function(e){return this.dnpgettext(this.domain,"",e)},i.prototype.dgettext=function(e,t){return this.dnpgettext(e,"",t)},i.prototype.ngettext=function(e,t,n){return this.dnpgettext(this.domain,"",e,t,n)},i.prototype.dngettext=function(e,t,n,r){return this.dnpgettext(e,"",t,n,r)},i.prototype.pgettext=function(e,t){return this.dnpgettext(this.domain,e,t)},i.prototype.dpgettext=function(e,t,n){return this.dnpgettext(e,t,n)},i.prototype.npgettext=function(e,t,n,r){return this.dnpgettext(this.domain,e,t,n,r)},i.prototype.dnpgettext=function(e,t,n,r,s){var a,l,c=n;if(t=t||"",isNaN(s)||1===s||(c=r||n),a=this._getTranslation(e,t,n)){if("number"===typeof s)"boolean"===typeof(l=(0,o[i.getLanguageCode(this.locale)].pluralsFunc)(s))&&(l=l?1:0);else l=0;return a.msgstr[l]||c}return this.sourceLocale&&this.locale===this.sourceLocale||this.warn('No translation was found for msgid "'+n+'" in msgctxt "'+t+'" and domain "'+e+'"'),c},i.prototype.getComment=function(e,t,n){var r;return(r=this._getTranslation(e,t,n))&&r.comments||{}},i.prototype._getTranslation=function(e,t,n){return t=t||"",r(this.catalogs,[this.locale,e,"translations",t,n])},i.getLanguageCode=function(e){return e.split(/[\-_]/)[0].toLowerCase()},i.prototype.textdomain=function(e){this.debug&&console.warn("textdomain(domain) was used to set locales in node-gettext v1. Make sure you are using it for domains, and switch to setLocale(locale) if you are not.\n\n To read more about the migration from node-gettext v1 to v2, see https://github.com/alexanderwallin/node-gettext/#migrating-from-1x-to-2x\n\nThis warning will be removed in the final 2.0.0"),this.setTextDomain(e)},i.prototype.setlocale=function(e){this.setLocale(e)},i.prototype.addTextdomain=function(){console.error("addTextdomain() is deprecated.\n\n* To add translations, use addTranslations()\n* To set the default domain, use setTextDomain() (or its alias textdomain())\n\nTo read more about the migration from node-gettext v1 to v2, see https://github.com/alexanderwallin/node-gettext/#migrating-from-1x-to-2x")}},3957:e=>{"use strict";e.exports={ach:{name:"Acholi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},af:{name:"Afrikaans",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ak:{name:"Akan",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},am:{name:"Amharic",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},an:{name:"Aragonese",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ar:{name:"Arabic",examples:[{plural:0,sample:0},{plural:1,sample:1},{plural:2,sample:2},{plural:3,sample:3},{plural:4,sample:11},{plural:5,sample:100}],nplurals:6,pluralsText:"nplurals = 6; plural = (n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5)",pluralsFunc:function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5}},arn:{name:"Mapudungun",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},ast:{name:"Asturian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ay:{name:"Aymar\xe1",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},az:{name:"Azerbaijani",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},be:{name:"Belarusian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},bg:{name:"Bulgarian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},bn:{name:"Bengali",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},bo:{name:"Tibetan",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},br:{name:"Breton",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},brx:{name:"Bodo",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},bs:{name:"Bosnian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},ca:{name:"Catalan",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},cgg:{name:"Chiga",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},cs:{name:"Czech",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 1 ? 0 : (n >= 2 && n <= 4) ? 1 : 2)",pluralsFunc:function(e){return 1===e?0:e>=2&&e<=4?1:2}},csb:{name:"Kashubian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},cy:{name:"Welsh",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:3},{plural:3,sample:8}],nplurals:4,pluralsText:"nplurals = 4; plural = (n === 1 ? 0 : n === 2 ? 1 : (n !== 8 && n !== 11) ? 2 : 3)",pluralsFunc:function(e){return 1===e?0:2===e?1:8!==e&&11!==e?2:3}},da:{name:"Danish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},de:{name:"German",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},doi:{name:"Dogri",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},dz:{name:"Dzongkha",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},el:{name:"Greek",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},en:{name:"English",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},eo:{name:"Esperanto",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},es:{name:"Spanish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},et:{name:"Estonian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},eu:{name:"Basque",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},fa:{name:"Persian",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},ff:{name:"Fulah",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},fi:{name:"Finnish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},fil:{name:"Filipino",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},fo:{name:"Faroese",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},fr:{name:"French",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},fur:{name:"Friulian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},fy:{name:"Frisian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ga:{name:"Irish",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:3},{plural:3,sample:7},{plural:4,sample:11}],nplurals:5,pluralsText:"nplurals = 5; plural = (n === 1 ? 0 : n === 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4)",pluralsFunc:function(e){return 1===e?0:2===e?1:e<7?2:e<11?3:4}},gd:{name:"Scottish Gaelic",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:3},{plural:3,sample:20}],nplurals:4,pluralsText:"nplurals = 4; plural = ((n === 1 || n === 11) ? 0 : (n === 2 || n === 12) ? 1 : (n > 2 && n < 20) ? 2 : 3)",pluralsFunc:function(e){return 1===e||11===e?0:2===e||12===e?1:e>2&&e<20?2:3}},gl:{name:"Galician",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},gu:{name:"Gujarati",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},gun:{name:"Gun",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},ha:{name:"Hausa",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},he:{name:"Hebrew",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},hi:{name:"Hindi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},hne:{name:"Chhattisgarhi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},hr:{name:"Croatian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},hu:{name:"Hungarian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},hy:{name:"Armenian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},id:{name:"Indonesian",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},is:{name:"Icelandic",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n % 10 !== 1 || n % 100 === 11)",pluralsFunc:function(e){return e%10!==1||e%100===11}},it:{name:"Italian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ja:{name:"Japanese",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},jbo:{name:"Lojban",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},jv:{name:"Javanese",examples:[{plural:0,sample:0},{plural:1,sample:1}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 0)",pluralsFunc:function(e){return 0!==e}},ka:{name:"Georgian",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},kk:{name:"Kazakh",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},km:{name:"Khmer",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},kn:{name:"Kannada",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ko:{name:"Korean",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},ku:{name:"Kurdish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},kw:{name:"Cornish",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:3},{plural:3,sample:4}],nplurals:4,pluralsText:"nplurals = 4; plural = (n === 1 ? 0 : n === 2 ? 1 : n === 3 ? 2 : 3)",pluralsFunc:function(e){return 1===e?0:2===e?1:3===e?2:3}},ky:{name:"Kyrgyz",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},lb:{name:"Letzeburgesch",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ln:{name:"Lingala",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},lo:{name:"Lao",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},lt:{name:"Lithuanian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:10}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2}},lv:{name:"Latvian",examples:[{plural:2,sample:0},{plural:0,sample:1},{plural:1,sample:2}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n !== 0 ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:0!==e?1:2}},mai:{name:"Maithili",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},mfe:{name:"Mauritian Creole",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},mg:{name:"Malagasy",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},mi:{name:"Maori",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},mk:{name:"Macedonian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n === 1 || n % 10 === 1 ? 0 : 1)",pluralsFunc:function(e){return 1===e||e%10===1?0:1}},ml:{name:"Malayalam",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},mn:{name:"Mongolian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},mni:{name:"Manipuri",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},mnk:{name:"Mandinka",examples:[{plural:0,sample:0},{plural:1,sample:1},{plural:2,sample:2}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 0 ? 0 : n === 1 ? 1 : 2)",pluralsFunc:function(e){return 0===e?0:1===e?1:2}},mr:{name:"Marathi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ms:{name:"Malay",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},mt:{name:"Maltese",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:11},{plural:3,sample:20}],nplurals:4,pluralsText:"nplurals = 4; plural = (n === 1 ? 0 : n === 0 || ( n % 100 > 1 && n % 100 < 11) ? 1 : (n % 100 > 10 && n % 100 < 20 ) ? 2 : 3)",pluralsFunc:function(e){return 1===e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3}},my:{name:"Burmese",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},nah:{name:"Nahuatl",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},nap:{name:"Neapolitan",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},nb:{name:"Norwegian Bokmal",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ne:{name:"Nepali",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},nl:{name:"Dutch",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},nn:{name:"Norwegian Nynorsk",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},no:{name:"Norwegian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},nso:{name:"Northern Sotho",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},oc:{name:"Occitan",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},or:{name:"Oriya",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},pa:{name:"Punjabi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},pap:{name:"Papiamento",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},pl:{name:"Polish",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},pms:{name:"Piemontese",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ps:{name:"Pashto",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},pt:{name:"Portuguese",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},rm:{name:"Romansh",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ro:{name:"Romanian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:20}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 1 ? 0 : (n === 0 || (n % 100 > 0 && n % 100 < 20)) ? 1 : 2)",pluralsFunc:function(e){return 1===e?0:0===e||e%100>0&&e%100<20?1:2}},ru:{name:"Russian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},rw:{name:"Kinyarwanda",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sah:{name:"Yakut",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},sat:{name:"Santali",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sco:{name:"Scots",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sd:{name:"Sindhi",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},se:{name:"Northern Sami",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},si:{name:"Sinhala",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sk:{name:"Slovak",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n === 1 ? 0 : (n >= 2 && n <= 4) ? 1 : 2)",pluralsFunc:function(e){return 1===e?0:e>=2&&e<=4?1:2}},sl:{name:"Slovenian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:3},{plural:3,sample:5}],nplurals:4,pluralsText:"nplurals = 4; plural = (n % 100 === 1 ? 0 : n % 100 === 2 ? 1 : n % 100 === 3 || n % 100 === 4 ? 2 : 3)",pluralsFunc:function(e){return e%100===1?0:e%100===2?1:e%100===3||e%100===4?2:3}},so:{name:"Somali",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},son:{name:"Songhay",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sq:{name:"Albanian",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sr:{name:"Serbian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},su:{name:"Sundanese",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},sv:{name:"Swedish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},sw:{name:"Swahili",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},ta:{name:"Tamil",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},te:{name:"Telugu",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},tg:{name:"Tajik",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},th:{name:"Thai",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},ti:{name:"Tigrinya",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},tk:{name:"Turkmen",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},tr:{name:"Turkish",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},tt:{name:"Tatar",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},ug:{name:"Uyghur",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},uk:{name:"Ukrainian",examples:[{plural:0,sample:1},{plural:1,sample:2},{plural:2,sample:5}],nplurals:3,pluralsText:"nplurals = 3; plural = (n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)",pluralsFunc:function(e){return e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},ur:{name:"Urdu",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},uz:{name:"Uzbek",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},vi:{name:"Vietnamese",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},wa:{name:"Walloon",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n > 1)",pluralsFunc:function(e){return e>1}},wo:{name:"Wolof",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}},yo:{name:"Yoruba",examples:[{plural:0,sample:1},{plural:1,sample:2}],nplurals:2,pluralsText:"nplurals = 2; plural = (n !== 1)",pluralsFunc:function(e){return 1!==e}},zh:{name:"Chinese",examples:[{plural:0,sample:1}],nplurals:1,pluralsText:"nplurals = 1; plural = 0",pluralsFunc:function(){return 0}}}},2123:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,o){for(var i,s,a=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))n.call(i,c)&&(a[c]=i[c]);if(t){s=t(i);for(var u=0;u<s.length;u++)r.call(i,s[u])&&(a[s[u]]=i[s[u]])}}return a}},7974:e=>{"use strict";var t=function(e){return e!==e};e.exports=function(e,n){return 0===e&&0===n?1/e===1/n:e===n||!(!t(e)||!t(n))}},2702:(e,t,n)=>{"use strict";var r=n(1779),o=n(1712),i=n(7974),s=n(3799),a=n(5289),l=o(s(),Object);r(l,{getPolyfill:s,implementation:i,shim:a}),e.exports=l},3799:(e,t,n)=>{"use strict";var r=n(7974);e.exports=function(){return"function"===typeof Object.is?Object.is:r}},5289:(e,t,n)=>{"use strict";var r=n(3799),o=n(1779);e.exports=function(){var e=r();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},1038:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=n(234),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{d(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(e){var t=null!==e&&"object"===typeof e,n="[object Function]"===i.call(e),r=s(e),a=t&&"[object String]"===i.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var f=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var m=0;m<e.length;++m)h.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var v in e)f&&"prototype"===v||!o.call(e,v)||h.push(String(v));if(l)for(var y=function(e){if("undefined"===typeof window||!p)return d(e);try{return d(e)}catch(t){return!1}}(e),b=0;b<u.length;++b)y&&"constructor"===u[b]||!o.call(e,u[b])||h.push(u[b]);return h}}e.exports=r},2678:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(234),i=Object.keys,s=i?function(e){return i(e)}:n(1038),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(r.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},234:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},5471:(e,t,n)=>{"use strict";var r=n(9076),o=n(2028),i=o("Object.prototype.propertyIsEnumerable"),s=o("Array.prototype.push");e.exports=function(e){var t=r(e),n=[];for(var o in t)i(t,o)&&s(n,t[o]);return n}},6505:(e,t,n)=>{"use strict";var r=n(1779),o=n(1712),i=n(5471),s=n(3790),a=n(8460),l=o(s(),Object);r(l,{getPolyfill:s,implementation:i,shim:a}),e.exports=l},3790:(e,t,n)=>{"use strict";var r=n(5471);e.exports=function(){return"function"===typeof Object.values?Object.values:r}},8460:(e,t,n)=>{"use strict";var r=n(3790),o=n(1779);e.exports=function(){var e=r();return o(Object,{values:e},{values:function(){return Object.values!==e}}),e}},102:(e,t,n)=>{"use strict";var r=n(9814);function o(){}var i=null,s={};function a(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,e!==o&&p(e,this)}function l(e,t){for(;3===e._y;)e=e._z;if(a._B&&a._B(e),0===e._y)return 0===e._x?(e._x=1,void(e._A=t)):1===e._x?(e._x=2,void(e._A=[e._A,t])):void e._A.push(t);!function(e,t){r((function(){var n=1===e._y?t.onFulfilled:t.onRejected;if(null!==n){var r=function(e,t){try{return e(t)}catch(n){return i=n,s}}(n,e._z);r===s?u(t.promise,i):c(t.promise,r)}else 1===e._y?c(t.promise,e._z):u(t.promise,e._z)}))}(e,t)}function c(e,t){if(t===e)return u(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=function(e){try{return e.then}catch(t){return i=t,s}}(t);if(n===s)return u(e,i);if(n===e.then&&t instanceof a)return e._y=3,e._z=t,void d(e);if("function"===typeof n)return void p(n.bind(t),e)}e._y=1,e._z=t,d(e)}function u(e,t){e._y=2,e._z=t,a._C&&a._C(e,t),d(e)}function d(e){if(1===e._x&&(l(e,e._A),e._A=null),2===e._x){for(var t=0;t<e._A.length;t++)l(e,e._A[t]);e._A=null}}function h(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function p(e,t){var n=!1,r=function(e,t,n){try{e(t,n)}catch(r){return i=r,s}}(e,(function(e){n||(n=!0,c(t,e))}),(function(e){n||(n=!0,u(t,e))}));n||r!==s||(n=!0,u(t,i))}e.exports=a,a._B=null,a._C=null,a._D=o,a.prototype.then=function(e,t){if(this.constructor!==a)return function(e,t,n){return new e.constructor((function(r,i){var s=new a(o);s.then(r,i),l(e,new h(t,n,s))}))}(this,e,t);var n=new a(o);return l(this,new h(e,t,n)),n}},7806:(e,t,n)=>{"use strict";var r=n(102);e.exports=r;var o=u(!0),i=u(!1),s=u(null),a=u(void 0),l=u(0),c=u("");function u(e){var t=new r(r._D);return t._y=1,t._z=e,t}r.resolve=function(e){if(e instanceof r)return e;if(null===e)return s;if(void 0===e)return a;if(!0===e)return o;if(!1===e)return i;if(0===e)return l;if(""===e)return c;if("object"===typeof e||"function"===typeof e)try{var t=e.then;if("function"===typeof t)return new r(t.bind(e))}catch(n){return new r((function(e,t){t(n)}))}return u(e)};var d=function(e){return"function"===typeof Array.from?(d=Array.from,Array.from(e)):(d=function(e){return Array.prototype.slice.call(e)},Array.prototype.slice.call(e))};function h(e){return{status:"fulfilled",value:e}}function p(e){return{status:"rejected",reason:e}}function f(e){if(e&&("object"===typeof e||"function"===typeof e)){if(e instanceof r&&e.then===r.prototype.then)return e.then(h,p);var t=e.then;if("function"===typeof t)return new r(t.bind(e)).then(h,p)}return h(e)}function m(e){if("function"===typeof AggregateError)return new AggregateError(e,"All promises were rejected");var t=new Error("All promises were rejected");return t.name="AggregateError",t.errors=e,t}r.all=function(e){var t=d(e);return new r((function(e,n){if(0===t.length)return e([]);var o=t.length;function i(s,a){if(a&&("object"===typeof a||"function"===typeof a)){if(a instanceof r&&a.then===r.prototype.then){for(;3===a._y;)a=a._z;return 1===a._y?i(s,a._z):(2===a._y&&n(a._z),void a.then((function(e){i(s,e)}),n))}var l=a.then;if("function"===typeof l)return void new r(l.bind(a)).then((function(e){i(s,e)}),n)}t[s]=a,0===--o&&e(t)}for(var s=0;s<t.length;s++)i(s,t[s])}))},r.allSettled=function(e){return r.all(d(e).map(f))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){d(e).forEach((function(e){r.resolve(e).then(t,n)}))}))},r.prototype.catch=function(e){return this.then(null,e)},r.any=function(e){return new r((function(t,n){var o=d(e),i=!1,s=[];function a(e){i||(i=!0,t(e))}function l(e){s.push(e),s.length===o.length&&n(m(s))}0===o.length?n(m(s)):o.forEach((function(e){r.resolve(e).then(a,l)}))}))}},4382:(e,t,n)=>{"use strict";var r=n(102),o=[ReferenceError,TypeError,RangeError],i=!1;function s(){i=!1,r._B=null,r._C=null}function a(e,t){return t.some((function(t){return e instanceof t}))}t.disable=s,t.enable=function(e){e=e||{},i&&s();i=!0;var t=0,n=0,l={};function c(t){(e.allRejections||a(l[t].error,e.whitelist||o))&&(l[t].displayId=n++,e.onUnhandled?(l[t].logged=!0,e.onUnhandled(l[t].displayId,l[t].error)):(l[t].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn("  "+e)}))}(l[t].displayId,l[t].error)))}r._B=function(t){2===t._y&&l[t._E]&&(l[t._E].logged?function(t){l[t].logged&&(e.onHandled?e.onHandled(l[t].displayId,l[t].error):l[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+l[t].displayId+"):"),console.warn('  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+l[t].displayId+".")))}(t._E):clearTimeout(l[t._E].timeout),delete l[t._E])},r._C=function(e,n){0===e._x&&(e._E=t++,l[e._E]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._E),a(n,o)?100:2e3),logged:!1})}}},1497:(e,t,n)=>{"use strict";var r=n(3218);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5173:(e,t,n)=>{e.exports=n(1497)()},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4027:(e,t,n)=>{"use strict";n(6184),n(4896),n(5375),"undefined"===typeof Promise&&(n(4382).enable(),self.Promise=n(7806)),"undefined"!==typeof window&&n(4953),Object.assign=n(2123)},7412:(e,t,n)=>{"use strict";n(4647)},2730:(e,t,n)=>{"use strict";var r=n(5043),o=n(8853);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function m(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var A=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function P(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var D,F=Object.assign;function L(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var B=!1;function U(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(1!==s||1!==a)do{if(s--,0>--a||o[s]!==i[a]){var l="\n"+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function G(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case C:return"Fragment";case S:return"Portal";case _:return"Profiler";case j:return"StrictMode";case T:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case N:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function J(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=z(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function K(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){K(e,t);var n=z(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+z(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:z(n)}}function ie(e,t){var n=z(t.value),r=z(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ce=null,je=null;function _e(e){if(e=xo(e)){if("function"!==typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function ke(e){Ce?je?je.push(e):je=[e]:Ce=e}function Ne(){if(Ce){var e=Ce,t=je;if(je=Ce=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Ee(e,t){return e(t)}function Te(){}var Oe=!1;function Ie(e,t,n){if(Oe)return e(t,n);Oe=!0;try{return Ee(e,t,n)}finally{Oe=!1,(null!==Ce||null!==je)&&(Te(),Ne())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=So(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Ae=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){Ae=!1}function Pe(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var De=!1,Fe=null,Le=!1,Be=null,Ue={onError:function(e){De=!0,Fe=e}};function Ge(e,t,n,r,o,i,s,a,l){De=!1,Fe=null,Pe.apply(Ue,arguments)}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ze(e){if($e(e)!==e)throw Error(i(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(r=o.return)){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return ze(o),e;if(s===r)return ze(o),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=s;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var We=o.unstable_scheduleCallback,Ye=o.unstable_cancelCallback,Qe=o.unstable_shouldYield,Je=o.unstable_requestPaint,Ke=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~o;0!==a?r=dt(a):0!==(i&=s)&&(r=dt(i))}else 0!==(s=n&~o)?r=dt(s):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-st(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function xt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,St,Ct,jt,_t,kt=!1,Nt=[],Et=null,Tt=null,Ot=null,It=new Map,Rt=new Map,At=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":It.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Dt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=xo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Ft(e){var t=bo(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void _t(e.priority,(function(){Ct(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Lt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Bt(e,t,n){Lt(e)&&n.delete(t)}function Ut(){kt=!1,null!==Et&&Lt(Et)&&(Et=null),null!==Tt&&Lt(Tt)&&(Tt=null),null!==Ot&&Lt(Ot)&&(Ot=null),It.forEach(Bt),Rt.forEach(Bt)}function Gt(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ut)))}function $t(e){function t(t){return Gt(t,e)}if(0<Nt.length){Gt(Nt[0],e);for(var n=1;n<Nt.length;n++){var r=Nt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Et&&Gt(Et,e),null!==Tt&&Gt(Tt,e),null!==Ot&&Gt(Ot,e),It.forEach(t),Rt.forEach(t),n=0;n<At.length;n++)(r=At[n]).blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&null===(n=At[0]).blockedOn;)Ft(n),null===n.blockedOn&&At.shift()}var qt=x.ReactCurrentBatchConfig,zt=!0;function Vt(e,t,n,r){var o=bt,i=qt.transition;qt.transition=null;try{bt=1,Wt(e,t,n,r)}finally{bt=o,qt.transition=i}}function Ht(e,t,n,r){var o=bt,i=qt.transition;qt.transition=null;try{bt=4,Wt(e,t,n,r)}finally{bt=o,qt.transition=i}}function Wt(e,t,n,r){if(zt){var o=Qt(e,t,n,r);if(null===o)zr(e,t,r,Yt,n),Pt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Et=Dt(Et,e,t,n,r,o),!0;case"dragenter":return Tt=Dt(Tt,e,t,n,r,o),!0;case"mouseover":return Ot=Dt(Ot,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return It.set(i,Dt(It.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Rt.set(i,Dt(Rt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Pt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=xo(o);if(null!==i&&wt(i),null===(i=Qt(e,t,n,r))&&zr(e,t,r,Yt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else zr(e,t,r,null,n)}}var Yt=null;function Qt(e,t,n,r){if(Yt=null,null!==(e=bo(e=we(r))))if(null===(t=$e(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Jt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Kt=null,Xt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Xt,r=n.length,o="value"in Kt?Kt.value:Kt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===o[i-t];t++);return Zt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=F({},cn,{view:0,detail:0}),hn=on(dn),pn=F({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),fn=on(pn),mn=on(F({},pn,{dataTransfer:0})),gn=on(F({},dn,{relatedTarget:0})),vn=on(F({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=F({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),xn=on(F({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function _n(){return jn}var kn=F({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Nn=on(kn),En=on(F({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(F({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),On=on(F({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=F({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(In),An=[9,13,27,32],Mn=u&&"CompositionEvent"in window,Pn=null;u&&"documentMode"in document&&(Pn=document.documentMode);var Dn=u&&"TextEvent"in window&&!Pn,Fn=u&&(!Mn||Pn&&8<Pn&&11>=Pn),Ln=String.fromCharCode(32),Bn=!1;function Un(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Vn(e,t,n,r){ke(r),0<(t=Hr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hn=null,Wn=null;function Yn(e){Lr(e,0)}function Qn(e){if(W(wo(e)))return e}function Jn(e,t){if("change"===e)return t}var Kn=!1;if(u){var Xn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Xn=Zn}else Xn=!1;Kn=Xn&&(!document.documentMode||9<document.documentMode)}function tr(){Hn&&(Hn.detachEvent("onpropertychange",nr),Wn=Hn=null)}function nr(e){if("value"===e.propertyName&&Qn(Wn)){var t=[];Vn(t,Wn,e,we(e)),Ie(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Wn=n,(Hn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Wn)}function ir(e,t){if("click"===e)return Qn(t)}function sr(e,t){if("input"===e||"change"===e)return Qn(t)}var ar="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(ar(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!ar(e[o],t[o]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ur(n,i);var s=ur(n,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Hr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Cr={},jr={};function _r(e){if(Cr[e])return Cr[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in jr)return Cr[e]=n[t];return e}u&&(jr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var kr=_r("animationend"),Nr=_r("animationiteration"),Er=_r("animationstart"),Tr=_r("transitionend"),Or=new Map,Ir="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Or.set(e,t),l(t,[e])}for(var Ar=0;Ar<Ir.length;Ar++){var Mr=Ir[Ar];Rr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Rr(kr,"onAnimationEnd"),Rr(Nr,"onAnimationIteration"),Rr(Er,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Tr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function Fr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,s,a,l,c){if(Ge.apply(this,arguments),De){if(!De)throw Error(i(198));var u=Fe;De=!1,Fe=null,Le||(Le=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Lr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Fr(o,a,c),i=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Fr(o,a,c),i=l}}}if(Le)throw e=Be,Le=!1,Be=null,e}function Br(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Gr="_reactListening"+Math.random().toString(36).slice(2);function $r(e){if(!e[Gr]){e[Gr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Dr.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Gr]||(t[Gr]=!0,Ur("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Jt(t)){case 1:var o=Vt;break;case 4:o=Ht;break;default:o=Wt}n=o.bind(null,t,n,e),o=void 0,!Ae||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function zr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===o||8===a.nodeType&&a.parentNode===o)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;s=s.return}for(;null!==a;){if(null===(s=bo(a)))return;if(5===(l=s.tag)||6===l){r=i=s;continue e}a=a.parentNode}}r=r.return}Ie((function(){var r=i,o=we(n),s=[];e:{var a=Or.get(e);if(void 0!==a){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Nn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case kr:case Nr:case Er:l=vn;break;case Tr:l=On;break;case"scroll":l=hn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=En}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==a?a+"Capture":null:a;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Re(f,h))&&u.push(Vr(f,m,p)))),d)break;f=f.return}0<u.length&&(a=new l(a,c,null,n,o),s.push({event:a,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===xe||!(c=n.relatedTarget||n.fromElement)||!bo(c)&&!c[mo])&&(l||a)&&(a=o.window===o?o:(a=o.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?bo(c):null)&&(c!==(d=$e(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=En,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?a:wo(l),p=null==c?a:wo(c),(a=new u(m,f+"leave",l,n,o)).target=d,a.relatedTarget=p,m=null,bo(o)===r&&((u=new u(h,f+"enter",c,n,o)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Wr(p))f++;for(p=0,m=h;m;m=Wr(m))p++;for(;0<f-p;)u=Wr(u),f--;for(;0<p-f;)h=Wr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Wr(u),h=Wr(h)}u=null}else u=null;null!==l&&Yr(s,a,l,u,!1),null!==c&&null!==d&&Yr(s,d,c,u,!0)}if("select"===(l=(a=r?wo(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Jn;else if(zn(a))if(Kn)g=sr;else{g=or;var v=rr}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=ir);switch(g&&(g=g(e,r))?Vn(s,g,n,o):(v&&v(e,a,r),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=r?wo(r):window,e){case"focusin":(zn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,xr(s,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":xr(s,n,o)}var y;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else $n?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&($n||"onCompositionStart"!==b?"onCompositionEnd"===b&&$n&&(y=en()):(Xt="value"in(Kt=o)?Kt.value:Kt.textContent,$n=!0)),0<(v=Hr(r,b)).length&&(b=new xn(b,e,null,n,o),s.push({event:b,listeners:v}),y?b.data=y:null!==(y=Gn(n))&&(b.data=y))),(y=Dn?function(e,t){switch(e){case"compositionend":return Gn(t);case"keypress":return 32!==t.which?null:(Bn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Bn?null:e;default:return null}}(e,n):function(e,t){if($n)return"compositionend"===e||!Mn&&Un(e,t)?(e=en(),Zt=Xt=Kt=null,$n=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Hr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),s.push({event:o,listeners:r}),o.data=y))}Lr(s,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Re(e,n))&&r.unshift(Vr(e,i,o)),null!=(i=Re(e,t))&&r.push(Vr(e,i,o))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,o){for(var i=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,o?null!=(l=Re(n,i))&&s.unshift(Vr(n,l,a)):o||null!=(l=Re(n,i))&&s.push(Vr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Qr=/\r\n?/g,Jr=/\u0000|\uFFFD/g;function Kr(e){return("string"===typeof e?e:""+e).replace(Qr,"\n").replace(Jr,"")}function Xr(e,t,n){if(t=Kr(t),Kr(e)!==t&&n)throw Error(i(425))}function Zr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,so="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(ao)}:ro;function ao(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void $t(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);$t(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,fo="__reactProps$"+ho,mo="__reactContainer$"+ho,go="__reactEvents$"+ho,vo="__reactListeners$"+ho,yo="__reactHandles$"+ho;function bo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function xo(e){return!(e=e[po]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function So(e){return e[fo]||null}var Co=[],jo=-1;function _o(e){return{current:e}}function ko(e){0>jo||(e.current=Co[jo],Co[jo]=null,jo--)}function No(e,t){jo++,Co[jo]=e.current,e.current=t}var Eo={},To=_o(Eo),Oo=_o(!1),Io=Eo;function Ro(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Mo(){ko(Oo),ko(To)}function Po(e,t,n){if(To.current!==Eo)throw Error(i(168));No(To,t),No(Oo,n)}function Do(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,q(e)||"Unknown",o));return F({},n,r)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,Io=To.current,No(To,e),No(Oo,Oo.current),!0}function Lo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Do(e,t,Io),r.__reactInternalMemoizedMergedChildContext=e,ko(Oo),ko(To),No(To,e)):ko(Oo),No(Oo,n)}var Bo=null,Uo=!1,Go=!1;function $o(e){null===Bo?Bo=[e]:Bo.push(e)}function qo(){if(!Go&&null!==Bo){Go=!0;var e=0,t=bt;try{var n=Bo;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,Uo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),We(Ze,qo),o}finally{bt=t,Go=!1}}return null}var zo=[],Vo=0,Ho=null,Wo=0,Yo=[],Qo=0,Jo=null,Ko=1,Xo="";function Zo(e,t){zo[Vo++]=Wo,zo[Vo++]=Ho,Ho=e,Wo=t}function ei(e,t,n){Yo[Qo++]=Ko,Yo[Qo++]=Xo,Yo[Qo++]=Jo,Jo=e;var r=Ko;e=Xo;var o=32-st(r)-1;r&=~(1<<o),n+=1;var i=32-st(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Ko=1<<32-st(t)+o|n<<o|r,Xo=i+e}else Ko=1<<i|n<<o|r,Xo=e}function ti(e){null!==e.return&&(Zo(e,1),ei(e,1,0))}function ni(e){for(;e===Ho;)Ho=zo[--Vo],zo[Vo]=null,Wo=zo[--Vo],zo[Vo]=null;for(;e===Jo;)Jo=Yo[--Qo],Yo[Qo]=null,Xo=Yo[--Qo],Yo[Qo]=null,Ko=Yo[--Qo],Yo[Qo]=null}var ri=null,oi=null,ii=!1,si=null;function ai(e,t){var n=Rc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function li(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Jo?{id:Ko,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Rc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function ci(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ui(e){if(ii){var t=oi;if(t){var n=t;if(!li(e,t)){if(ci(e))throw Error(i(418));t=co(n.nextSibling);var r=ri;t&&li(e,t)?ai(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(ci(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function hi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(ci(e))throw pi(),Error(i(418));for(;t;)ai(e,t),t=co(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?co(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=co(e.nextSibling)}function fi(){oi=ri=null,ii=!1}function mi(e){null===si?si=[e]:si.push(e)}var gi=x.ReactCurrentBatchConfig;function vi(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yi=_o(null),bi=null,xi=null,wi=null;function Si(){wi=xi=bi=null}function Ci(e){var t=yi.current;ko(yi),e._currentValue=t}function ji(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _i(e,t){bi=e,wi=xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(xa=!0),e.firstContext=null)}function ki(e){var t=e._currentValue;if(wi!==e)if(e={context:e,memoizedValue:t,next:null},null===xi){if(null===bi)throw Error(i(308));xi=e,bi.dependencies={lanes:0,firstContext:e}}else xi=xi.next=e;return t}var Ni=null;function Ei(e){null===Ni?Ni=[e]:Ni.push(e)}function Ti(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ei(t)):(n.next=o.next,o.next=n),t.interleaved=n,Oi(e,r)}function Oi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ii=!1;function Ri(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ai(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tl)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Oi(e,n)}return null===(o=r.interleaved)?(t.next=t,Ei(r)):(t.next=o.next,o.next=t),r.interleaved=t,Oi(e,n)}function Di(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Fi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Li(e,t,n,r){var o=e.updateQueue;Ii=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?i=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(s=0,u=c=l=null,a=i;;){var h=a.lane,p=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,m=a;switch(h=t,p=n,m.tag){case 1:if("function"===typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=m.payload)?f.call(p,d,h):f)||void 0===h)break e;d=F({},d,h);break e;case 2:Ii=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=h;if(null===(a=a.next)){if(null===(a=o.shared.pending))break;a=(h=a).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Fl|=s,e.lanes=s,e.memoizedState=d}}function Bi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var Ui=(new r.Component).refs;function Gi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var $i={isMounted:function(e){return!!(e=e._reactInternals)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Mi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Pi(e,i,o))&&(rc(t,e,o,r),Di(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),o=nc(e),i=Mi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Pi(e,i,o))&&(rc(t,e,o,r),Di(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),o=Mi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Pi(e,o,r))&&(rc(t,e,r,n),Di(t,e,r))}};function qi(e,t,n,r,o,i,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,i))}function zi(e,t,n){var r=!1,o=Eo,i=t.contextType;return"object"===typeof i&&null!==i?i=ki(i):(o=Ao(t)?Io:To.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ro(e,o):Eo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=$i,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Vi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$i.enqueueReplaceState(t,t.state,null)}function Hi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Ui,Ri(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=ki(i):(i=Ao(t)?Io:To.current,o.context=Ro(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(Gi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&$i.enqueueReplaceState(o,o.state,null),Li(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function Wi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,s=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=o.refs;t===Ui&&(t=o.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Yi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qi(e){return(0,e._init)(e._payload)}function Ji(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Mc(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Lc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===C?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===R&&Qi(i)===t.type)?((r=o(t,n.props)).ref=Wi(e,t,n),r.return=e,r):((r=Pc(n.type,n.key,n.props,null,e.mode,r)).ref=Wi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Dc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Lc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=Wi(e,null,t),n.return=e,n;case S:return(t=Bc(t,e.mode,n)).return=e,t;case R:return h(e,(0,t._init)(t._payload),n)}if(te(t)||P(t))return(t=Dc(t,e.mode,n,null)).return=e,t;Yi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case R:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||P(n))return null!==o?null:d(e,t,n,r,null);Yi(e,n)}return null}function f(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case R:return f(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||P(r))return d(t,e=e.get(n)||null,r,o,null);Yi(t,r)}return null}function m(o,i,a,l){for(var c=null,u=null,d=i,m=i=0,g=null;null!==d&&m<a.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=p(o,d,a[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(o,d),i=s(v,i,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===a.length)return n(o,d),ii&&Zo(o,m),c;if(null===d){for(;m<a.length;m++)null!==(d=h(o,a[m],l))&&(i=s(d,i,m),null===u?c=d:u.sibling=d,u=d);return ii&&Zo(o,m),c}for(d=r(o,d);m<a.length;m++)null!==(g=f(d,o,m,a[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=s(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(o,e)})),ii&&Zo(o,m),c}function g(o,a,l,c){var u=P(l);if("function"!==typeof u)throw Error(i(150));if(null==(l=u.call(l)))throw Error(i(151));for(var d=u=null,m=a,g=a=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=p(o,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(o,m),a=s(b,a,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(o,m),ii&&Zo(o,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(o,y.value,c))&&(a=s(y,a,g),null===d?u=y:d.sibling=y,d=y);return ii&&Zo(o,g),u}for(m=r(o,m);!y.done;g++,y=l.next())null!==(y=f(m,o,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=s(y,a,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),ii&&Zo(o,g),u}return function e(r,i,s,l){if("object"===typeof s&&null!==s&&s.type===C&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var c=s.key,u=i;null!==u;){if(u.key===c){if((c=s.type)===C){if(7===u.tag){n(r,u.sibling),(i=o(u,s.props.children)).return=r,r=i;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===R&&Qi(c)===u.type){n(r,u.sibling),(i=o(u,s.props)).ref=Wi(r,u,s),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===C?((i=Dc(s.props.children,r.mode,l,s.key)).return=r,r=i):((l=Pc(s.type,s.key,s.props,null,r.mode,l)).ref=Wi(r,i,s),l.return=r,r=l)}return a(r);case S:e:{for(u=s.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){n(r,i.sibling),(i=o(i,s.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Bc(s,r.mode,l)).return=r,r=i}return a(r);case R:return e(r,i,(u=s._init)(s._payload),l)}if(te(s))return m(r,i,s,l);if(P(s))return g(r,i,s,l);Yi(r,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,s)).return=r,r=i):(n(r,i),(i=Lc(s,r.mode,l)).return=r,r=i),a(r)):n(r,i)}}var Ki=Ji(!0),Xi=Ji(!1),Zi={},es=_o(Zi),ts=_o(Zi),ns=_o(Zi);function rs(e){if(e===Zi)throw Error(i(174));return e}function os(e,t){switch(No(ns,t),No(ts,e),No(es,Zi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ko(es),No(es,t)}function is(){ko(es),ko(ts),ko(ns)}function ss(e){rs(ns.current);var t=rs(es.current),n=le(t,e.type);t!==n&&(No(ts,e),No(es,n))}function as(e){ts.current===e&&(ko(es),ko(ts))}var ls=_o(0);function cs(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var us=[];function ds(){for(var e=0;e<us.length;e++)us[e]._workInProgressVersionPrimary=null;us.length=0}var hs=x.ReactCurrentDispatcher,ps=x.ReactCurrentBatchConfig,fs=0,ms=null,gs=null,vs=null,ys=!1,bs=!1,xs=0,ws=0;function Ss(){throw Error(i(321))}function Cs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ar(e[n],t[n]))return!1;return!0}function js(e,t,n,r,o,s){if(fs=s,ms=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=null===e||null===e.memoizedState?aa:la,e=n(r,o),bs){s=0;do{if(bs=!1,xs=0,25<=s)throw Error(i(301));s+=1,vs=gs=null,t.updateQueue=null,hs.current=ca,e=n(r,o)}while(bs)}if(hs.current=sa,t=null!==gs&&null!==gs.next,fs=0,vs=gs=ms=null,ys=!1,t)throw Error(i(300));return e}function _s(){var e=0!==xs;return xs=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vs?ms.memoizedState=vs=e:vs=vs.next=e,vs}function Ns(){if(null===gs){var e=ms.alternate;e=null!==e?e.memoizedState:null}else e=gs.next;var t=null===vs?ms.memoizedState:vs.next;if(null!==t)vs=t,gs=e;else{if(null===e)throw Error(i(310));e={memoizedState:(gs=e).memoizedState,baseState:gs.baseState,baseQueue:gs.baseQueue,queue:gs.queue,next:null},null===vs?ms.memoizedState=vs=e:vs=vs.next=e}return vs}function Es(e,t){return"function"===typeof t?t(e):t}function Ts(e){var t=Ns(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=gs,o=r.baseQueue,s=n.pending;if(null!==s){if(null!==o){var a=o.next;o.next=s.next,s.next=a}r.baseQueue=o=s,n.pending=null}if(null!==o){s=o.next,r=r.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((fs&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,a=r):c=c.next=h,ms.lanes|=d,Fl|=d}u=u.next}while(null!==u&&u!==s);null===c?a=r:c.next=l,ar(r,t.memoizedState)||(xa=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{s=o.lane,ms.lanes|=s,Fl|=s,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Os(e){var t=Ns(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{s=e(s,a.action),a=a.next}while(a!==o);ar(s,t.memoizedState)||(xa=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Is(){}function Rs(e,t){var n=ms,r=Ns(),o=t(),s=!ar(r.memoizedState,o);if(s&&(r.memoizedState=o,xa=!0),r=r.queue,zs(Ps.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==vs&&1&vs.memoizedState.tag){if(n.flags|=2048,Bs(9,Ms.bind(null,n,r,o,t),void 0,null),null===Ol)throw Error(i(349));0!==(30&fs)||As(n,t,o)}return o}function As(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ms.updateQueue)?(t={lastEffect:null,stores:null},ms.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,r){t.value=n,t.getSnapshot=r,Ds(t)&&Fs(e)}function Ps(e,t,n){return n((function(){Ds(t)&&Fs(e)}))}function Ds(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ar(e,n)}catch(r){return!0}}function Fs(e){var t=Oi(e,1);null!==t&&rc(t,e,1,-1)}function Ls(e){var t=ks();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t.queue=e,e=e.dispatch=na.bind(null,ms,e),[t.memoizedState,e]}function Bs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ms.updateQueue)?(t={lastEffect:null,stores:null},ms.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Us(){return Ns().memoizedState}function Gs(e,t,n,r){var o=ks();ms.flags|=e,o.memoizedState=Bs(1|t,n,void 0,void 0===r?null:r)}function $s(e,t,n,r){var o=Ns();r=void 0===r?null:r;var i=void 0;if(null!==gs){var s=gs.memoizedState;if(i=s.destroy,null!==r&&Cs(r,s.deps))return void(o.memoizedState=Bs(t,n,i,r))}ms.flags|=e,o.memoizedState=Bs(1|t,n,i,r)}function qs(e,t){return Gs(8390656,8,e,t)}function zs(e,t){return $s(2048,8,e,t)}function Vs(e,t){return $s(4,2,e,t)}function Hs(e,t){return $s(4,4,e,t)}function Ws(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ys(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,$s(4,4,Ws.bind(null,t,e),n)}function Qs(){}function Js(e,t){var n=Ns();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Cs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ks(e,t){var n=Ns();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Cs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xs(e,t,n){return 0===(21&fs)?(e.baseState&&(e.baseState=!1,xa=!0),e.memoizedState=n):(ar(n,t)||(n=mt(),ms.lanes|=n,Fl|=n,e.baseState=!0),t)}function Zs(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ps.transition;ps.transition={};try{e(!1),t()}finally{bt=n,ps.transition=r}}function ea(){return Ns().memoizedState}function ta(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ra(e))oa(t,n);else if(null!==(n=Ti(e,t,n,r))){rc(n,e,r,tc()),ia(n,t,r)}}function na(e,t,n){var r=nc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ra(e))oa(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(o.next=o,Ei(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Ti(e,t,o,r))&&(rc(n,e,r,o=tc()),ia(n,t,r))}}function ra(e){var t=e.alternate;return e===ms||null!==t&&t===ms}function oa(e,t){bs=ys=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ia(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var sa={readContext:ki,useCallback:Ss,useContext:Ss,useEffect:Ss,useImperativeHandle:Ss,useInsertionEffect:Ss,useLayoutEffect:Ss,useMemo:Ss,useReducer:Ss,useRef:Ss,useState:Ss,useDebugValue:Ss,useDeferredValue:Ss,useTransition:Ss,useMutableSource:Ss,useSyncExternalStore:Ss,useId:Ss,unstable_isNewReconciler:!1},aa={readContext:ki,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:ki,useEffect:qs,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Gs(4194308,4,Ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ks();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ta.bind(null,ms,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:Ls,useDebugValue:Qs,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=Ls(!1),t=e[0];return e=Zs.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ms,o=ks();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Ol)throw Error(i(349));0!==(30&fs)||As(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,qs(Ps.bind(null,r,s,e),[e]),r.flags|=2048,Bs(9,Ms.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ks(),t=Ol.identifierPrefix;if(ii){var n=Xo;t=":"+t+"R"+(n=(Ko&~(1<<32-st(Ko)-1)).toString(32)+n),0<(n=xs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ws++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},la={readContext:ki,useCallback:Js,useContext:ki,useEffect:zs,useImperativeHandle:Ys,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:Ks,useReducer:Ts,useRef:Us,useState:function(){return Ts(Es)},useDebugValue:Qs,useDeferredValue:function(e){return Xs(Ns(),gs.memoizedState,e)},useTransition:function(){return[Ts(Es)[0],Ns().memoizedState]},useMutableSource:Is,useSyncExternalStore:Rs,useId:ea,unstable_isNewReconciler:!1},ca={readContext:ki,useCallback:Js,useContext:ki,useEffect:zs,useImperativeHandle:Ys,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:Ks,useReducer:Os,useRef:Us,useState:function(){return Os(Es)},useDebugValue:Qs,useDeferredValue:function(e){var t=Ns();return null===gs?t.memoizedState=e:Xs(t,gs.memoizedState,e)},useTransition:function(){return[Os(Es)[0],Ns().memoizedState]},useMutableSource:Is,useSyncExternalStore:Rs,useId:ea,unstable_isNewReconciler:!1};function ua(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ha(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var pa="function"===typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Hl=r),ha(0,t)},n}function ma(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ha(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){ha(0,t),"function"!==typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pa;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function va(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Pi(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ba=x.ReactCurrentOwner,xa=!1;function wa(e,t,n,r){t.child=null===e?Xi(t,null,n,r):Ki(t,e.child,n,r)}function Sa(e,t,n,r,o){n=n.render;var i=t.ref;return _i(t,o),r=js(e,t,n,r,i,o),n=_s(),null===e||xa?(ii&&n&&ti(t),t.flags|=1,wa(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Va(e,t,o))}function Ca(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Ac(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ja(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Va(e,t,o)}return t.flags|=1,(e=Mc(i,r)).ref=t.ref,e.return=t,t.child=e}function ja(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref){if(xa=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Va(e,t,o);0!==(131072&e.flags)&&(xa=!0)}}return Na(e,t,n,r,o)}function _a(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},No(Ml,Al),Al|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,No(Ml,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,No(Ml,Al),Al|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,No(Ml,Al),Al|=r;return wa(e,t,o,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Na(e,t,n,r,o){var i=Ao(n)?Io:To.current;return i=Ro(t,i),_i(t,o),n=js(e,t,n,r,i,o),r=_s(),null===e||xa?(ii&&r&&ti(t),t.flags|=1,wa(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Va(e,t,o))}function Ea(e,t,n,r,o){if(Ao(n)){var i=!0;Fo(t)}else i=!1;if(_i(t,o),null===t.stateNode)za(e,t),zi(t,n,r),Hi(t,n,r,o),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"===typeof c&&null!==c?c=ki(c):c=Ro(t,c=Ao(n)?Io:To.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;d||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==r||l!==c)&&Vi(t,s,r,c),Ii=!1;var h=t.memoizedState;s.state=h,Li(t,r,s,o),l=t.memoizedState,a!==r||h!==l||Oo.current||Ii?("function"===typeof u&&(Gi(t,n,u,r),l=t.memoizedState),(a=Ii||qi(t,n,a,r,h,l,c))?(d||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ai(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vi(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"===typeof(l=n.contextType)&&null!==l?l=ki(l):l=Ro(t,l=Ao(n)?Io:To.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==d||h!==l)&&Vi(t,s,r,l),Ii=!1,h=t.memoizedState,s.state=h,Li(t,r,s,o);var f=t.memoizedState;a!==d||h!==f||Oo.current||Ii?("function"===typeof p&&(Gi(t,n,p,r),f=t.memoizedState),(c=Ii||qi(t,n,c,r,h,f,l)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ta(e,t,n,r,i,o)}function Ta(e,t,n,r,o,i){ka(e,t);var s=0!==(128&t.flags);if(!r&&!s)return o&&Lo(t,n,!1),Va(e,t,i);r=t.stateNode,ba.current=t;var a=s&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Ki(t,e.child,null,i),t.child=Ki(t,null,a,i)):wa(e,t,a,i),t.memoizedState=r.state,o&&Lo(t,n,!0),t.child}function Oa(e){var t=e.stateNode;t.pendingContext?Po(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Po(0,t.context,!1),os(e,t.containerInfo)}function Ia(e,t,n,r,o){return fi(),mi(o),t.flags|=256,wa(e,t,n,r),t.child}var Ra,Aa,Ma,Pa,Da={dehydrated:null,treeContext:null,retryLane:0};function Fa(e){return{baseLanes:e,cachePool:null,transitions:null}}function La(e,t,n){var r,o=t.pendingProps,s=ls.current,a=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),No(ls,1&s),null===e)return ui(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,a?(o=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Fc(l,o,0,null),e=Dc(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Fa(n),t.memoizedState=Da,e):Ba(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,o,s,a){if(n)return 256&t.flags?(t.flags&=-257,Ua(e,t,a,r=da(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Fc({mode:"visible",children:r.children},o,0,null),(s=Dc(s,o,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!==(1&t.mode)&&Ki(t,e.child,null,a),t.child.memoizedState=Fa(a),t.memoizedState=Da,s);if(0===(1&t.mode))return Ua(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Ua(e,t,a,r=da(s=Error(i(419)),r,void 0))}if(l=0!==(a&e.childLanes),xa||l){if(null!==(r=Ol)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|a))?0:o)&&o!==s.retryLane&&(s.retryLane=o,Oi(e,o),rc(r,e,o,-1))}return gc(),Ua(e,t,a,r=da(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ec.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,oi=co(o.nextSibling),ri=t,ii=!0,si=null,null!==e&&(Yo[Qo++]=Ko,Yo[Qo++]=Xo,Yo[Qo++]=Jo,Ko=e.id,Xo=e.overflow,Jo=t),t=Ba(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,s,n);if(a){a=o.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:o.children};return 0===(1&l)&&t.child!==s?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=Mc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Mc(r,a):(a=Dc(a,l,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,l=null===(l=e.child.memoizedState)?Fa(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Da,o}return e=(a=e.child).sibling,o=Mc(a,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ba(e,t){return(t=Fc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ua(e,t,n,r){return null!==r&&mi(r),Ki(t,e.child,null,n),(e=Ba(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ga(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ji(e.return,t,n)}function $a(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function qa(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(wa(e,t,r.children,n),0!==(2&(r=ls.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ga(e,n,t);else if(19===e.tag)Ga(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(No(ls,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===cs(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),$a(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===cs(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}$a(t,!0,n,null,i);break;case"together":$a(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function za(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Va(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Mc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ha(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ya(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wa(t),null;case 1:case 17:return Ao(t.type)&&Mo(),Wa(t),null;case 3:return r=t.stateNode,is(),ko(Oo),ko(To),ds(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==si&&(ac(si),si=null))),Aa(e,t),Wa(t),null;case 5:as(t);var o=rs(ns.current);if(n=t.type,null!==e&&null!=t.stateNode)Ma(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Wa(t),null}if(e=rs(es.current),hi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[po]=t,r[fo]=s,e=0!==(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Pr.length;o++)Br(Pr[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":J(r,s),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Br("invalid",r);break;case"textarea":oe(r,s),Br("invalid",r)}for(var l in ye(n,s),o=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Xr(r.textContent,c,e),o=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Xr(r.textContent,c,e),o=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":H(r),Z(r,s,!0);break;case"textarea":H(r),se(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Zr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[po]=t,e[fo]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Pr.length;o++)Br(Pr[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":J(e,r),o=Q(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=F({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(s in ye(n,o),c=o)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?ge(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===s?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Br("scroll",e):null!=u&&b(e,s,u,l))}switch(n){case"input":H(e),Z(e,r,!1);break;case"textarea":H(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+z(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ne(e,!!r.multiple,s,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Wa(t),null;case 6:if(e&&null!=t.stateNode)Pa(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=rs(ns.current),rs(es.current),hi(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(s=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Xr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(r.nodeValue,n,0!==(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return Wa(t),null;case 13:if(ko(ls),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))pi(),fi(),t.flags|=98560,s=!1;else if(s=hi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(i(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(i(317));s[po]=t}else fi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Wa(t),s=!1}else null!==si&&(ac(si),si=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ls.current)?0===Pl&&(Pl=3):gc())),null!==t.updateQueue&&(t.flags|=4),Wa(t),null);case 4:return is(),Aa(e,t),null===e&&$r(t.stateNode.containerInfo),Wa(t),null;case 10:return Ci(t.type._context),Wa(t),null;case 19:if(ko(ls),null===(s=t.memoizedState))return Wa(t),null;if(r=0!==(128&t.flags),null===(l=s.rendering))if(r)Ha(s,!1);else{if(0!==Pl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=cs(e))){for(t.flags|=128,Ha(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return No(ls,1&ls.current|2),t.child}e=e.sibling}null!==s.tail&&Ke()>ql&&(t.flags|=128,r=!0,Ha(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=cs(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ha(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ii)return Wa(t),null}else 2*Ke()-s.renderingStartTime>ql&&1073741824!==n&&(t.flags|=128,r=!0,Ha(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ke(),t.sibling=null,n=ls.current,No(ls,r?1&n|2:1&n),t):(Wa(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Al)&&(Wa(t),6&t.subtreeFlags&&(t.flags|=8192)):Wa(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Qa(e,t){switch(ni(t),t.tag){case 1:return Ao(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return is(),ko(Oo),ko(To),ds(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return as(t),null;case 13:if(ko(ls),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));fi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ko(ls),null;case 4:return is(),null;case 10:return Ci(t.type._context),null;case 22:case 23:return hc(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Aa=function(){},Ma=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,rs(es.current);var i,s=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),s=[];break;case"select":o=F({},o,{value:void 0}),r=F({},r,{value:void 0}),s=[];break;case"textarea":o=re(e,o),r=re(e,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in ye(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Pa=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ja=!1,Ka=!1,Xa="function"===typeof WeakSet?WeakSet:Set,Za=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){_c(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){_c(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tl(t,n,i)}o=o.next}while(o!==r)}}function ol(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[fo],delete t[go],delete t[vo],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,hl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(a){}switch(n.tag){case 5:Ka||el(n,t);case 6:var r=dl,o=hl;dl=null,pl(e,t,n),hl=o,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),$t(e)):lo(dl,n.stateNode));break;case 4:r=dl,o=hl,dl=n.stateNode.containerInfo,hl=!0,pl(e,t,n),dl=r,hl=o;break;case 0:case 11:case 14:case 15:if(!Ka&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(0!==(2&i)||0!==(4&i))&&tl(n,t,s),o=o.next}while(o!==r)}pl(e,t,n);break;case 1:if(!Ka&&(el(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){_c(n,t,a)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ka=(r=Ka)||null!==n.memoizedState,pl(e,t,n),Ka=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach((function(t){var r=Tc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,hl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===dl)throw Error(i(160));fl(s,a,o),dl=null,hl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(u){_c(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&r){try{rl(3,e,e.return),ol(3,e)}catch(g){_c(e,e.return,g)}try{rl(5,e,e.return)}catch(g){_c(e,e.return,g)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(g){_c(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&K(o,s),be(l,a);var u=be(l,s);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];"style"===d?ge(o,h):"dangerouslySetInnerHTML"===d?de(o,h):"children"===d?he(o,h):b(o,d,h,u)}switch(l){case"input":X(o,s);break;case"textarea":ie(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var f=s.value;null!=f?ne(o,!!s.multiple,f,!1):p!==!!s.multiple&&(null!=s.defaultValue?ne(o,!!s.multiple,s.defaultValue,!0):ne(o,!!s.multiple,s.multiple?[]:"",!1))}o[fo]=s}catch(g){_c(e,e.return,g)}}break;case 6:if(gl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(g){_c(e,e.return,g)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{$t(t.containerInfo)}catch(g){_c(e,e.return,g)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(o=e.child).flags&&(s=null!==o.memoizedState,o.stateNode.isHidden=s,!s||null!==o.alternate&&null!==o.alternate.memoizedState||($l=Ke())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ka=(u=Ka)||d,gl(t,e),Ka=u):gl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Za=e,d=e.child;null!==d;){for(h=Za=d;null!==Za;){switch(f=(p=Za).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:el(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){_c(r,n,g)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){Sl(h);continue}}null!==f?(f.return=p,Za=f):Sl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{o=h.stateNode,u?"function"===typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=h.stateNode,a=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",a))}catch(g){_c(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){_c(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(he(o,""),r.flags&=-33),ul(e,ll(e),o);break;case 3:case 4:var s=r.stateNode.containerInfo;cl(e,ll(e),s);break;default:throw Error(i(161))}}catch(a){_c(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Za=e,xl(e,t,n)}function xl(e,t,n){for(var r=0!==(1&e.mode);null!==Za;){var o=Za,i=o.child;if(22===o.tag&&r){var s=null!==o.memoizedState||Ja;if(!s){var a=o.alternate,l=null!==a&&null!==a.memoizedState||Ka;a=Ja;var c=Ka;if(Ja=s,(Ka=l)&&!c)for(Za=o;null!==Za;)l=(s=Za).child,22===s.tag&&null!==s.memoizedState?Cl(o):null!==l?(l.return=s,Za=l):Cl(o);for(;null!==i;)Za=i,xl(i,t,n),i=i.sibling;Za=o,Ja=a,Ka=c}wl(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Za=i):wl(e)}}function wl(e){for(;null!==Za;){var t=Za;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ka||ol(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ka)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:vi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Bi(t,s,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Bi(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&$t(h)}}}break;default:throw Error(i(163))}Ka||512&t.flags&&il(t)}catch(p){_c(t,t.return,p)}}if(t===e){Za=null;break}if(null!==(n=t.sibling)){n.return=t.return,Za=n;break}Za=t.return}}function Sl(e){for(;null!==Za;){var t=Za;if(t===e){Za=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Za=n;break}Za=t.return}}function Cl(e){for(;null!==Za;){var t=Za;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ol(4,t)}catch(l){_c(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){_c(t,o,l)}}var i=t.return;try{il(t)}catch(l){_c(t,i,l)}break;case 5:var s=t.return;try{il(t)}catch(l){_c(t,s,l)}}}catch(l){_c(t,t.return,l)}if(t===e){Za=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Za=a;break}Za=t.return}}var jl,_l=Math.ceil,kl=x.ReactCurrentDispatcher,Nl=x.ReactCurrentOwner,El=x.ReactCurrentBatchConfig,Tl=0,Ol=null,Il=null,Rl=0,Al=0,Ml=_o(0),Pl=0,Dl=null,Fl=0,Ll=0,Bl=0,Ul=null,Gl=null,$l=0,ql=1/0,zl=null,Vl=!1,Hl=null,Wl=null,Yl=!1,Ql=null,Jl=0,Kl=0,Xl=null,Zl=-1,ec=0;function tc(){return 0!==(6&Tl)?Ke():-1!==Zl?Zl:Zl=Ke()}function nc(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Rl?Rl&-Rl:null!==gi.transition?(0===ec&&(ec=mt()),ec):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Jt(e.type)}function rc(e,t,n,r){if(50<Kl)throw Kl=0,Xl=null,Error(i(185));vt(e,n,r),0!==(2&Tl)&&e===Ol||(e===Ol&&(0===(2&Tl)&&(Ll|=n),4===Pl&&lc(e,Rl)),oc(e,r),1===n&&0===Tl&&0===(1&t.mode)&&(ql=Ke()+500,Uo&&qo()))}function oc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-st(i),a=1<<s,l=o[s];-1===l?0!==(a&n)&&0===(a&r)||(o[s]=pt(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}(e,t);var r=ht(e,e===Ol?Rl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Uo=!0,$o(e)}(cc.bind(null,e)):$o(cc.bind(null,e)),so((function(){0===(6&Tl)&&qo()})),n=null;else{switch(xt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Oc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Zl=-1,ec=0,0!==(6&Tl))throw Error(i(327));var n=e.callbackNode;if(Cc()&&e.callbackNode!==n)return null;var r=ht(e,e===Ol?Rl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vc(e,r);else{t=r;var o=Tl;Tl|=2;var s=mc();for(Ol===e&&Rl===t||(zl=null,ql=Ke()+500,pc(e,t));;)try{bc();break}catch(l){fc(e,l)}Si(),kl.current=s,Tl=o,null!==Il?t=0:(Ol=null,Rl=0,t=Pl)}if(0!==t){if(2===t&&(0!==(o=ft(e))&&(r=o,t=sc(e,o))),1===t)throw n=Dl,pc(e,0),lc(e,r),oc(e,Ke()),n;if(6===t)lc(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!ar(i(),o))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vc(e,r))&&(0!==(s=ft(e))&&(r=s,t=sc(e,s))),1===t))throw n=Dl,pc(e,0),lc(e,r),oc(e,Ke()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Sc(e,Gl,zl);break;case 3:if(lc(e,r),(130023424&r)===r&&10<(t=$l+500-Ke())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Sc.bind(null,e,Gl,zl),t);break}Sc(e,Gl,zl);break;case 4:if(lc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-st(r);s=1<<a,(a=t[a])>o&&(o=a),r&=~s}if(r=o,10<(r=(120>(r=Ke()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_l(r/1960))-r)){e.timeoutHandle=ro(Sc.bind(null,e,Gl,zl),r);break}Sc(e,Gl,zl);break;default:throw Error(i(329))}}}return oc(e,Ke()),e.callbackNode===n?ic.bind(null,e):null}function sc(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=vc(e,t))&&(t=Gl,Gl=n,null!==t&&ac(t)),e}function ac(e){null===Gl?Gl=e:Gl.push.apply(Gl,e)}function lc(e,t){for(t&=~Bl,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function cc(e){if(0!==(6&Tl))throw Error(i(327));Cc();var t=ht(e,0);if(0===(1&t))return oc(e,Ke()),null;var n=vc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=sc(e,r))}if(1===n)throw n=Dl,pc(e,0),lc(e,t),oc(e,Ke()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sc(e,Gl,zl),oc(e,Ke()),null}function uc(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(ql=Ke()+500,Uo&&qo())}}function dc(e){null!==Ql&&0===Ql.tag&&0===(6&Tl)&&Cc();var t=Tl;Tl|=1;var n=El.transition,r=bt;try{if(El.transition=null,bt=1,e)return e()}finally{bt=r,El.transition=n,0===(6&(Tl=t))&&qo()}}function hc(){Al=Ml.current,ko(Ml)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Mo();break;case 3:is(),ko(Oo),ko(To),ds();break;case 5:as(r);break;case 4:is();break;case 13:case 19:ko(ls);break;case 10:Ci(r.type._context);break;case 22:case 23:hc()}n=n.return}if(Ol=e,Il=e=Mc(e.current,null),Rl=Al=t,Pl=0,Dl=null,Bl=Ll=Fl=0,Gl=Ul=null,null!==Ni){for(t=0;t<Ni.length;t++)if(null!==(r=(n=Ni[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var s=i.next;i.next=o,r.next=s}n.pending=r}Ni=null}return e}function fc(e,t){for(;;){var n=Il;try{if(Si(),hs.current=sa,ys){for(var r=ms.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ys=!1}if(fs=0,vs=gs=ms=null,bs=!1,xs=0,Nl.current=null,null===n||null===n.return){Pl=1,Dl=t,Il=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=Rl,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=va(a);if(null!==f){f.flags&=-257,ya(f,a,l,0,t),1&f.mode&&ga(s,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0===(1&t)){ga(s,u,t),gc();break e}c=Error(i(426))}else if(ii&&1&l.mode){var v=va(a);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),ya(v,a,l,0,t),mi(ua(c,l));break e}}s=c=ua(c,l),4!==Pl&&(Pl=2),null===Ul?Ul=[s]:Ul.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Fi(s,fa(0,c,t));break e;case 1:l=c;var y=s.type,b=s.stateNode;if(0===(128&s.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Wl||!Wl.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t,Fi(s,ma(s,l,t));break e}}s=s.return}while(null!==s)}wc(n)}catch(x){t=x,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function mc(){var e=kl.current;return kl.current=sa,null===e?sa:e}function gc(){0!==Pl&&3!==Pl&&2!==Pl||(Pl=4),null===Ol||0===(268435455&Fl)&&0===(268435455&Ll)||lc(Ol,Rl)}function vc(e,t){var n=Tl;Tl|=2;var r=mc();for(Ol===e&&Rl===t||(zl=null,pc(e,t));;)try{yc();break}catch(o){fc(e,o)}if(Si(),Tl=n,kl.current=r,null!==Il)throw Error(i(261));return Ol=null,Rl=0,Pl}function yc(){for(;null!==Il;)xc(Il)}function bc(){for(;null!==Il&&!Qe();)xc(Il)}function xc(e){var t=jl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?wc(e):Il=t,Nl.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ya(n,t,Al)))return void(Il=n)}else{if(null!==(n=Qa(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Pl=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Pl&&(Pl=5)}function Sc(e,t,n){var r=bt,o=El.transition;try{El.transition=null,bt=1,function(e,t,n,r){do{Cc()}while(null!==Ql);if(0!==(6&Tl))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-st(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,s),e===Ol&&(Il=Ol=null,Rl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Yl||(Yl=!0,Oc(tt,(function(){return Cc(),null}))),s=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||s){s=El.transition,El.transition=null;var a=bt;bt=1;var l=Tl;Tl|=4,Nl.current=null,function(e,t){if(eo=zt,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(w){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==o&&3!==h.nodeType||(l=a+o),h!==s||0!==r&&3!==h.nodeType||(c=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===o&&(l=a),p===s&&++d===r&&(c=a),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},zt=!1,Za=t;null!==Za;)if(e=(t=Za).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Za=e;else for(;null!==Za;){t=Za;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:vi(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(i(163))}}catch(w){_c(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Za=e;break}Za=t.return}m=nl,nl=!1}(e,n),vl(n,e),fr(to),zt=!!eo,to=eo=null,e.current=n,bl(n,e,o),Je(),Tl=l,bt=a,El.transition=s}else e.current=n;if(Yl&&(Yl=!1,Ql=e,Jl=o),s=e.pendingLanes,0===s&&(Wl=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),oc(e,Ke()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Vl)throw Vl=!1,e=Hl,Hl=null,e;0!==(1&Jl)&&0!==e.tag&&Cc(),s=e.pendingLanes,0!==(1&s)?e===Xl?Kl++:(Kl=0,Xl=e):Kl=0,qo()}(e,t,n,r)}finally{El.transition=o,bt=r}return null}function Cc(){if(null!==Ql){var e=xt(Jl),t=El.transition,n=bt;try{if(El.transition=null,bt=16>e?16:e,null===Ql)var r=!1;else{if(e=Ql,Ql=null,Jl=0,0!==(6&Tl))throw Error(i(331));var o=Tl;for(Tl|=4,Za=e.current;null!==Za;){var s=Za,a=s.child;if(0!==(16&Za.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Za=u;null!==Za;){var d=Za;switch(d.tag){case 0:case 11:case 15:rl(8,d,s)}var h=d.child;if(null!==h)h.return=d,Za=h;else for(;null!==Za;){var p=(d=Za).sibling,f=d.return;if(sl(d),d===u){Za=null;break}if(null!==p){p.return=f,Za=p;break}Za=f}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Za=s}}if(0!==(2064&s.subtreeFlags)&&null!==a)a.return=s,Za=a;else e:for(;null!==Za;){if(0!==(2048&(s=Za).flags))switch(s.tag){case 0:case 11:case 15:rl(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Za=y;break e}Za=s.return}}var b=e.current;for(Za=b;null!==Za;){var x=(a=Za).child;if(0!==(2064&a.subtreeFlags)&&null!==x)x.return=a,Za=x;else e:for(a=b;null!==Za;){if(0!==(2048&(l=Za).flags))try{switch(l.tag){case 0:case 11:case 15:ol(9,l)}}catch(S){_c(l,l.return,S)}if(l===a){Za=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Za=w;break e}Za=l.return}}if(Tl=o,qo(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(S){}r=!0}return r}finally{bt=n,El.transition=t}}return!1}function jc(e,t,n){e=Pi(e,t=fa(0,t=ua(n,t),1),1),t=tc(),null!==e&&(vt(e,1,t),oc(e,t))}function _c(e,t,n){if(3===e.tag)jc(e,e,n);else for(;null!==t;){if(3===t.tag){jc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=Pi(t,e=ma(t,e=ua(n,e),1),1),e=tc(),null!==t&&(vt(t,1,e),oc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Ol===e&&(Rl&n)===n&&(4===Pl||3===Pl&&(130023424&Rl)===Rl&&500>Ke()-$l?pc(e,0):Bl|=n),oc(e,t)}function Nc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tc();null!==(e=Oi(e,t))&&(vt(e,t,n),oc(e,n))}function Ec(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Nc(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Nc(e,n)}function Oc(e,t){return We(e,t)}function Ic(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rc(e,t,n,r){return new Ic(e,t,n,r)}function Ac(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mc(e,t){var n=e.alternate;return null===n?((n=Rc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pc(e,t,n,r,o,s){var a=2;if(r=e,"function"===typeof e)Ac(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case C:return Dc(n.children,o,s,t);case j:a=8,o|=8;break;case _:return(e=Rc(12,n,t,2|o)).elementType=_,e.lanes=s,e;case T:return(e=Rc(13,n,t,o)).elementType=T,e.lanes=s,e;case O:return(e=Rc(19,n,t,o)).elementType=O,e.lanes=s,e;case A:return Fc(n,o,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case k:a=10;break e;case N:a=9;break e;case E:a=11;break e;case I:a=14;break e;case R:a=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Rc(a,n,t,o)).elementType=e,t.type=r,t.lanes=s,t}function Dc(e,t,n,r){return(e=Rc(7,e,r,t)).lanes=n,e}function Fc(e,t,n,r){return(e=Rc(22,e,r,t)).elementType=A,e.lanes=n,e.stateNode={isHidden:!1},e}function Lc(e,t,n){return(e=Rc(6,e,null,t)).lanes=n,e}function Bc(e,t,n){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Gc(e,t,n,r,o,i,s,a,l){return e=new Uc(e,t,n,a,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Rc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ri(i),e}function $c(e){if(!e)return Eo;e:{if($e(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ao(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Ao(n))return Do(e,n,t)}return t}function qc(e,t,n,r,o,i,s,a,l){return(e=Gc(n,r,!0,e,0,i,0,a,l)).context=$c(null),n=e.current,(i=Mi(r=tc(),o=nc(n))).callback=void 0!==t&&null!==t?t:null,Pi(n,i,o),e.current.lanes=o,vt(e,o,r),oc(e,r),e}function zc(e,t,n,r){var o=t.current,i=tc(),s=nc(o);return n=$c(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Pi(o,t,s))&&(rc(e,o,s,i),Di(e,o,s)),s}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wc(e,t){Hc(e,t),(e=e.alternate)&&Hc(e,t)}jl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Oo.current)xa=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return xa=!1,function(e,t,n){switch(t.tag){case 3:Oa(t),fi();break;case 5:ss(t);break;case 1:Ao(t.type)&&Fo(t);break;case 4:os(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;No(yi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(No(ls,1&ls.current),t.flags|=128,null):0!==(n&t.child.childLanes)?La(e,t,n):(No(ls,1&ls.current),null!==(e=Va(e,t,n))?e.sibling:null);No(ls,1&ls.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qa(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),No(ls,ls.current),r)break;return null;case 22:case 23:return t.lanes=0,_a(e,t,n)}return Va(e,t,n)}(e,t,n);xa=0!==(131072&e.flags)}else xa=!1,ii&&0!==(1048576&t.flags)&&ei(t,Wo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;za(e,t),e=t.pendingProps;var o=Ro(t,To.current);_i(t,n),o=js(null,t,r,e,o,n);var s=_s();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(s=!0,Fo(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ri(t),o.updater=$i,t.stateNode=o,o._reactInternals=t,Hi(t,r,e,n),t=Ta(null,t,r,!0,s,n)):(t.tag=0,ii&&s&&ti(t),wa(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(za(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Ac(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===I)return 14}return 2}(r),e=vi(r,e),o){case 0:t=Na(null,t,r,e,n);break e;case 1:t=Ea(null,t,r,e,n);break e;case 11:t=Sa(null,t,r,e,n);break e;case 14:t=Ca(null,t,r,vi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Na(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ea(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 3:e:{if(Oa(t),null===e)throw Error(i(387));r=t.pendingProps,o=(s=t.memoizedState).element,Ai(e,t),Li(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ia(e,t,r,n,o=ua(Error(i(423)),t));break e}if(r!==o){t=Ia(e,t,r,n,o=ua(Error(i(424)),t));break e}for(oi=co(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,si=null,n=Xi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fi(),r===o){t=Va(e,t,n);break e}wa(e,t,r,n)}t=t.child}return t;case 5:return ss(t),null===e&&ui(t),r=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,a=o.children,no(r,o)?a=null:null!==s&&no(r,s)&&(t.flags|=32),ka(e,t),wa(e,t,a,n),t.child;case 6:return null===e&&ui(t),null;case 13:return La(e,t,n);case 4:return os(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ki(t,null,r,n):wa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Sa(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 7:return wa(e,t,t.pendingProps,n),t.child;case 8:case 12:return wa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value,No(yi,r._currentValue),r._currentValue=a,null!==s)if(ar(s.value,a)){if(s.children===o.children&&!Oo.current){t=Va(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===s.tag){(c=Mi(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),ji(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),ji(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}wa(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_i(t,n),r=r(o=ki(o)),t.flags|=1,wa(e,t,r,n),t.child;case 14:return o=vi(r=t.type,t.pendingProps),Ca(e,t,r,o=vi(r.type,o),n);case 15:return ja(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vi(r,o),za(e,t),t.tag=1,Ao(r)?(e=!0,Fo(t)):e=!1,_i(t,n),zi(t,r,o),Hi(t,r,o,n),Ta(null,t,r,!0,e,n);case 19:return qa(e,t,n);case 22:return _a(e,t,n)}throw Error(i(156,t.tag))};var Yc="function"===typeof reportError?reportError:function(e){console.error(e)};function Qc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zc(){}function eu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if("function"===typeof o){var a=o;o=function(){var e=Vc(s);a.call(e)}}zc(t,s,e,o)}else s=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Vc(s);i.call(e)}}var s=qc(t,r,e,0,null,!1,0,"",Zc);return e._reactRootContainer=s,e[mo]=s.current,$r(8===e.nodeType?e.parentNode:e),dc(),s}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var a=r;r=function(){var e=Vc(l);a.call(e)}}var l=Gc(e,0,!1,null,0,!1,0,"",Zc);return e._reactRootContainer=l,e[mo]=l.current,$r(8===e.nodeType?e.parentNode:e),dc((function(){zc(t,l,n,r)})),l}(n,t,e,o,r);return Vc(s)}Jc.prototype.render=Qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));zc(e,t,null,null)},Jc.prototype.unmount=Qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc((function(){zc(null,e,null,null)})),t[mo]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=jt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&0!==t&&t<At[n].priority;n++);At.splice(n,0,e),0===n&&Ft(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),oc(t,Ke()),0===(6&Tl)&&(ql=Ke()+500,qo()))}break;case 13:dc((function(){var t=Oi(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}})),Wc(e,1)}},St=function(e){if(13===e.tag){var t=Oi(e,134217728);if(null!==t)rc(t,e,134217728,tc());Wc(e,134217728)}},Ct=function(e){if(13===e.tag){var t=nc(e),n=Oi(e,t);if(null!==n)rc(n,e,t,tc());Wc(e,t)}},jt=function(){return bt},_t=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Se=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=So(r);if(!o)throw Error(i(90));W(r),X(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ee=uc,Te=dc;var tu={usingClientEntryPoint:!1,Events:[xo,wo,So,ke,Ne,uc]},nu={findFiberByHostInstance:bo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{ot=ou.inject(ru),it=ou}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(i(299));var n=!1,r="",o=Yc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Gc(e,1,!1,null,0,n,0,r,o),e[mo]=t.current,$r(8===e.nodeType?e.parentNode:e),new Qc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(i(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,s="",a=Yc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=qc(t,null,e,1,null!=n?n:null,o,0,s,a),e[mo]=t.current,$r(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(i(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(i(40));return!!e._reactRootContainer&&(dc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[mo]=null}))})),!0)},t.unstable_batchedUpdates=uc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},4391:(e,t,n)=>{"use strict";var r=n(7950);t.H=r.createRoot,r.hydrateRoot},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2730)},5082:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case o:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===a||e===s||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},2086:(e,t,n)=>{"use strict";e.exports=n(5082)},5484:(e,t,n)=>{"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?a="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==s?"\n  "+s:"")+(null!==a?"\n  "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},5241:(e,t,n)=>{"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(5043)),i=u(n(5173)),s=n(9156),a=n(6590),l=u(n(6505)),c=u(n(4208));function u(e){return e&&e.__esModule?e:{default:e}}var d={BLOCK:"block",FLEX:"flex",INLINE:"inline",INLINE_BLOCK:"inline-block",CONTENTS:"contents"},h=(0,s.forbidExtraProps)({children:i.default.node.isRequired,onOutsideClick:i.default.func.isRequired,disabled:i.default.bool,useCapture:i.default.bool,display:i.default.oneOf((0,l.default)(d))}),p={disabled:!1,useCapture:!0,display:d.BLOCK},f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return i.onMouseDown=i.onMouseDown.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i.setChildNodeRef=i.setChildNodeRef.bind(i),i}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.disabled,n=e.useCapture;t||this.addMouseDownEventListener(n)}},{key:"componentDidUpdate",value:function(e){var t=e.disabled,n=this.props,r=n.disabled,o=n.useCapture;t!==r&&(r?this.removeEventListeners():this.addMouseDownEventListener(o))}},{key:"componentWillUnmount",value:function(){this.removeEventListeners()}},{key:"onMouseDown",value:function(e){var t=this.props.useCapture;this.childNode&&(0,c.default)(this.childNode,e.target)||(this.removeMouseUp&&(this.removeMouseUp(),this.removeMouseUp=null),this.removeMouseUp=(0,a.addEventListener)(document,"mouseup",this.onMouseUp,{capture:t}))}},{key:"onMouseUp",value:function(e){var t=this.props.onOutsideClick,n=this.childNode&&(0,c.default)(this.childNode,e.target);this.removeMouseUp&&(this.removeMouseUp(),this.removeMouseUp=null),n||t(e)}},{key:"setChildNodeRef",value:function(e){this.childNode=e}},{key:"addMouseDownEventListener",value:function(e){this.removeMouseDown=(0,a.addEventListener)(document,"mousedown",this.onMouseDown,{capture:e})}},{key:"removeEventListeners",value:function(){this.removeMouseDown&&this.removeMouseDown(),this.removeMouseUp&&this.removeMouseUp()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.display;return o.default.createElement("div",{ref:this.setChildNodeRef,style:n!==d.BLOCK&&(0,l.default)(d).includes(n)?{display:n}:void 0},t)}}]),t}(o.default.Component);t.default=f,f.propTypes=h,f.defaultProps=p},1237:(e,t,n)=>{e.exports=n(5241)},7358:(e,t)=>{"use strict";var n=60103,r=60106,o=60107,i=60108,s=60114,a=60109,l=60110,c=60112,u=60113,d=60120,h=60115,p=60116,f=60121,m=60122,g=60117,v=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),s=b("react.profiler"),a=b("react.provider"),l=b("react.context"),c=b("react.forward_ref"),u=b("react.suspense"),d=b("react.suspense_list"),h=b("react.memo"),p=b("react.lazy"),f=b("react.block"),m=b("react.server.block"),g=b("react.fundamental"),v=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case p:case h:case a:return e;default:return t}}case r:return t}}}t.isContextConsumer=function(e){return x(e)===l}},2706:(e,t,n)=>{"use strict";e.exports=n(7358)},5445:function(e,t,n){var r,o,i;o=[t,n(5043),n(5527)],r=function(e,t,n){"use strict";function r(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!==typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function u(e,t){return m(e)||f(e,t)||h(e,t)||d()}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}function m(e){if(Array.isArray(e))return e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function b(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=j();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(){var e=R(["",""]);return N=function(){return e},e}function E(){var e=R(["\n  position: relative;\n  overflow: auto;\n  height: 100%;\n  box-sizing: border-box;\n\n  & ",":not(:nth-last-child(-n+",")) "," {\n    border-bottom: ",";\n  }\n\n  & ",":nth-child(",") "," {\n    position: -webkit-sticky;\n    position: sticky;\n    top: 0px;\n    z-index: ",";\n  }\n  & ",":nth-last-child(-n+",") "," {\n    position: -webkit-sticky;\n    position: sticky;\n    bottom: 0px;\n    z-index: ",";\n    border-top: ",";\n  }\n  & "," ",":nth-child(-n+",") {\n    position: -webkit-sticky;\n    position: sticky;\n    left: 0px;\n    z-index: ",";\n    border-right: ",";\n  }\n  & "," ",":nth-last-child(-n+",") {\n    position: -webkit-sticky;\n    position: sticky;\n    right: 0px;\n    z-index: ",";\n    border-left: ",";\n  }\n\n  ","\n\n  & ",":nth-child(-n+",") ",":nth-child(-n+",") {\n    z-index: ",";\n  }\n  & ",":nth-child(-n+",") ",":nth-last-child(-n+",") {\n    z-index: ",";\n  }\n  & ",":nth-last-child(-n+",") ",":nth-child(-n+",") {\n    z-index: ",";\n  }\n  & ",":nth-last-child(-n+",") ",":nth-last-child(-n+",") {\n    z-index: ",";\n  }\n"]);return E=function(){return e},e}function T(){var e=R(["\n  display: table-row;\n"]);return T=function(){return e},e}function O(){var e=R(["\n  display: table-cell;\n  box-sizing: border-box;\n  padding: 0.5rem 0.75rem;\n  background-color: #fff;\n"]);return O=function(){return e},e}function I(){var e=R(["\n  white-space: nowrap;\n  display: table;\n  box-sizing: border-box;\n"]);return I=function(){return e},e}function R(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(e,"__esModule",{value:!0}),e.Cell=e.Row=e.Table=e.StickyTable=void 0,t=i(t),n=o(n);var A=function(e){return"".concat(void 0===e.borderWidth?"2px":e.borderWidth||"0px"," solid ").concat(e.borderColor||"#e5e5e5")},M=(0,n.default)("div").attrs((function(){return{className:"sticky-table-table"}}))(I());e.Table=M,M.displayName="Table";var P=(0,n.default)("div").attrs((function(){return{className:"sticky-table-cell"}}))(O());e.Cell=P,P.displayName="Cell";var D=(0,n.default)("div").attrs((function(){return{className:"sticky-table-row"}}))(T());e.Row=D,D.displayName="Row";var F=(0,n.default)("div").attrs((function(){return{className:"sticky-table"}}))(E(),D,(function(e){return(e.stickyFooterCount||0)+1}),P,A,D,(function(e){return"-n+".concat(e.stickyHeaderCount)}),P,(function(e){return e.headerZ||2}),D,(function(e){return e.stickyFooterCount}),P,(function(e){return e.footerZ||2}),A,D,P,(function(e){return e.leftStickyColumnCount}),(function(e){return e.leftColumnZ||2}),A,D,P,(function(e){return e.rightStickyColumnCount}),(function(e){return e.rightColumnZ||2}),A,(function(e){var t,r=e.stickyInsets,o="";for(t=0;t<r.header.length;t++)o+="& ".concat(D,":nth-child(").concat(t+1,") ").concat(P," { top: ").concat(r.header[t],"px; }");for(t=0;t<r.footer.length;t++)o+="& ".concat(D,":nth-last-child(").concat(t+1,") ").concat(P," { bottom: ").concat(r.footer[t],"px; }");for(t=0;t<r.leftColumn.length;t++)o+="& ".concat(D," ").concat(P,":nth-child(").concat(t+1,") { left: ").concat(r.leftColumn[t],"px; }");for(t=0;t<r.rightColumn.length;t++)o+="& ".concat(D," ").concat(P,":nth-last-child(").concat(t+1,") { right: ").concat(r.rightColumn[t],"px; }");return(0,n.css)(N(),o)}),D,(function(e){return e.stickyHeaderCount}),P,(function(e){return e.leftStickyColumnCount}),(function(e){return Math.max(e.headerZ||2,e.leftColumnZ||2)+1}),D,(function(e){return e.stickyHeaderCount}),P,(function(e){return e.rightStickyColumnCount}),(function(e){return Math.max(e.headerZ||2,e.rightColumnZ||2)+1}),D,(function(e){return e.stickyFooterCount}),P,(function(e){return e.leftStickyColumnCount}),(function(e){return Math.max(e.footerZ||2,e.leftColumnZ||2)+1}),D,(function(e){return e.stickyFooterCount}),P,(function(e){return e.rightStickyColumnCount}),(function(e){return Math.max(e.footerZ||2,e.rightColumnZ||2)+1}));F.displayName="Wrapper";var L=function(e){b(r,e);var n=w(r);function r(){var e;g(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return k(C(e=n.call.apply(n,[this].concat(o))),"state",{stickyInsets:{header:[],footer:[],leftColumn:[],rightColumn:[]}}),k(C(e),"setTableNodeRef",(function(t){e.tableNode=t})),e}return y(r,[{key:"componentDidMount",value:function(){this.considerSchedulingMultipleStickiesInterval()}},{key:"componentDidUpdate",value:function(){this.considerSchedulingMultipleStickiesInterval()}},{key:"componentWillUnmount",value:function(){this.clearMultipleStickiesInterval()}},{key:"considerSchedulingMultipleStickiesInterval",value:function(){var e=this.props,t=[e.stickyHeaderCount,e.stickyFooterCount,e.leftStickyColumnCount,e.rightStickyColumnCount].some((function(e){return e>1}));!t&&this.multipleStickiesInterval&&this.setState({stickyInsets:{header:[],footer:[],leftColumn:[],rightColumn:[]}}),this.clearMultipleStickiesInterval(),t&&(this.multipleStickiesInterval=setInterval(this.checkForStickySizeChanges.bind(this),1e3/60))}},{key:"clearMultipleStickiesInterval",value:function(){this.multipleStickiesInterval&&(clearInterval(this.multipleStickiesInterval),delete this.multipleStickiesInterval)}},{key:"checkForStickySizeChanges",value:function(){var e,t={},n=this.props,r=this.tableNode,o=r.querySelectorAll(".sticky-table-row"),i=r.querySelectorAll(".sticky-table-cell");[["header","height","stickyHeaderCount"],["footer","height","stickyFooterCount"],["leftColumn","width","leftStickyColumnCount"],["rightColumn","width","rightStickyColumnCount"]].forEach((function(r){var s=u(r,3),a=s[0],l=s[1],c=s[2],d=[];if(n[c]>1){d=[0];var h=n[c],p=0;for(e=1;e<h;e++){var f=void 0;switch(a){case"header":f=o[e-1].childNodes[0];break;case"footer":f=o[o.length-e].childNodes[0];break;case"leftColumn":f=i[e-1];break;case"rightColumn":f=i[i.length-e]}f&&(p+=f.getBoundingClientRect()[l]),d.push(p)}}t[a]=d})),JSON.stringify(t)!==JSON.stringify(this.state.stickyInsets)&&this.setState({stickyInsets:t})}},{key:"render",value:function(){var e=this.props,n=e.leftStickyColumnCount,r=void 0===n?1:n,o=e.stickyHeaderCount,i=void 0===o?1:o,s=e.wrapperRef,c=e.children,u=l(e,["leftStickyColumnCount","stickyHeaderCount","wrapperRef","children"]);return t.default.createElement(F,a({ref:s,leftStickyColumnCount:r,stickyHeaderCount:i,stickyInsets:this.state.stickyInsets},u),t.default.createElement(M,{ref:this.setTableNodeRef},c))}}]),r}(t.default.Component);e.StickyTable=L},void 0===(i="function"===typeof r?r.apply(t,o):r)||(e.exports=i)},3310:function(e,t,n){var r=n(4756);!function(e,t){"use strict";function n(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var s=e.apply(t,r);function a(e){n(s,o,i,a,l,"next",e)}function l(e){n(s,o,i,a,l,"throw",e)}a(void 0)}))}}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var l={init:"init"},c=function(e){var t=e.value;return void 0===t?"":t},u=function(){return t.createElement(t.Fragment,null,"\xa0")},d={Cell:c,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){var n=t.style,r=t.className;return e=i({},e,{},s(t,["style","className"])),n&&(e.style=e.style?i({},e.style||{},{},n||{}):n),r&&(e.className=e.className?e.className+" "+r:r),""===e.className&&delete e.className,e}),{})}var p=function(e,t){return void 0===t&&(t={}),function(n){return void 0===n&&(n={}),[].concat(e,[n]).reduce((function(e,r){return function e(t,n,r){return"function"==typeof n?e({},n(t,r)):Array.isArray(n)?h.apply(void 0,[t].concat(n)):h(t,n)}(e,r,i({},t,{userProps:n}))}),{})}},f=function(e,t,n,r){return void 0===n&&(n={}),e.reduce((function(e,t){return t(e,n)}),t)},m=function(e,t,n){return void 0===n&&(n={}),e.forEach((function(e){e(t,n)}))};function g(e,t,n,r){e.findIndex((function(e){return e.pluginName===n})),t.forEach((function(t){e.findIndex((function(e){return e.pluginName===t}))}))}function v(e,t){return"function"==typeof e?e(t):e}function y(e){var n=t.useRef();return n.current=e,t.useCallback((function(){return n.current}),[])}var b="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function x(e,n){var r=t.useRef(!1);b((function(){r.current&&e(),r.current=!0}),n)}function w(e,t,n){return void 0===n&&(n={}),function(r,o){void 0===o&&(o={});var s="string"==typeof r?t[r]:r;if(void 0===s)throw console.info(t),new Error("Renderer Error \u261d\ufe0f");return S(s,i({},e,{column:t},n,{},o))}}function S(e,n){return function(e){return"function"==typeof e&&(t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent;var t}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?t.createElement(e,n):e;var r}function C(e,t,n){return void 0===n&&(n=0),e.map((function(e){return _(e=i({},e,{parent:t,depth:n})),e.columns&&(e.columns=C(e.columns,e,n+1)),e}))}function j(e){return I(e,"columns")}function _(e){var t=e.id,n=e.accessor,r=e.Header;if("string"==typeof n){t=t||n;var o=n.split(".");n=function(e){return function(e,t,n){if(!t)return e;var r,o="function"==typeof t?t:JSON.stringify(t),i=E.get(o)||function(){var e=function(e){return function e(t,n){if(void 0===n&&(n=[]),Array.isArray(t))for(var r=0;r<t.length;r+=1)e(t[r],n);else n.push(t);return n}(e).map((function(e){return String(e).replace(".","_")})).join(".").replace(F,".").replace(L,"").split(".")}(t);return E.set(o,e),e}();try{r=i.reduce((function(e,t){return e[t]}),e)}catch(e){}return void 0!==r?r:n}(e,o)}}if(!t&&"string"==typeof r&&r&&(t=r),!t&&e.columns)throw console.error(e),new Error('A column ID (or unique "Header" value) is required!');if(!t)throw console.error(e),new Error("A column ID (or string accessor) is required!");return Object.assign(e,{id:t,accessor:n}),e}function k(e,t){if(!t)throw new Error;return Object.assign(e,i({Header:u,Footer:u},d,{},t,{},e)),Object.assign(e,{originalWidth:e.width}),e}function N(e,t,n){void 0===n&&(n=function(){return{}});for(var r=[],o=e,s=0,a=function(){return s++},l=function(){var e={headers:[]},s=[],l=o.some((function(e){return e.parent}));o.forEach((function(r){var o,c=[].concat(s).reverse()[0];l&&(o=r.parent?i({},r.parent,{originalId:r.parent.id,id:r.parent.id+"_"+a(),headers:[r]},n(r)):k(i({originalId:r.id+"_placeholder",id:r.id+"_placeholder_"+a(),placeholderOf:r,headers:[r]},n(r)),t),c&&c.originalId===o.originalId?c.headers.push(r):s.push(o)),e.headers.push(r)})),r.push(e),o=s};o.length;)l();return r.reverse()}var E=new Map;function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r+=1)if(void 0!==t[r])return t[r]}function O(e){if("function"==typeof e)return e}function I(e,t){var n=[];return function e(r){r.forEach((function(r){r[t]?e(r[t]):n.push(r)}))}(e),n}function R(e,t){var n=t.manualExpandedKey,r=t.expanded,o=t.expandSubRows,i=void 0===o||o,s=[];return e.forEach((function(e){return function e(t,o){void 0===o&&(o=!0),t.isExpanded=t.original&&t.original[n]||r[t.id],t.canExpand=t.subRows&&!!t.subRows.length,o&&s.push(t),t.subRows&&t.subRows.length&&t.isExpanded&&t.subRows.forEach((function(t){return e(t,i)}))}(e)})),s}function A(e,t,n){return O(e)||t[e]||n[e]||n.text}function M(e,t,n){return e?e(t,n):void 0===t}function P(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var D=null,F=/\[/g,L=/\]/g,B=function(e){return i({role:"table"},e)},U=function(e){return i({role:"rowgroup"},e)},G=function(e,t){var n=t.column;return i({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},e)},$=function(e,t){var n=t.column;return i({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},e)},q=function(e,t){return i({key:"headerGroup_"+t.index,role:"row"},e)},z=function(e,t){return i({key:"footerGroup_"+t.index},e)},V=function(e,t){return i({key:"row_"+t.row.id,role:"row"},e)},H=function(e,t){var n=t.cell;return i({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},e)};function W(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[B],getTableBodyProps:[U],getHeaderGroupProps:[q],getFooterGroupProps:[z],getHeaderProps:[G],getFooterProps:[$],getRowProps:[V],getCellProps:[H],useFinalInstance:[]}}l.resetHiddenColumns="resetHiddenColumns",l.toggleHideColumn="toggleHideColumn",l.setHiddenColumns="setHiddenColumns",l.toggleHideAllColumns="toggleHideAllColumns";var Y=function(e){e.getToggleHiddenProps=[Q],e.getToggleHideAllColumnsProps=[J],e.stateReducers.push(K),e.useInstanceBeforeDimensions.push(X),e.headerGroupsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.hiddenColumns])})),e.useInstance.push(Z)};Y.pluginName="useColumnVisibility";var Q=function(e,t){var n=t.column;return[e,{onChange:function(e){n.toggleHidden(!e.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},J=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleHideAllColumns(!e.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function K(e,t,n,r){if(t.type===l.init)return i({hiddenColumns:[]},e);if(t.type===l.resetHiddenColumns)return i({},e,{hiddenColumns:r.initialState.hiddenColumns||[]});if(t.type===l.toggleHideColumn){var o=(void 0!==t.value?t.value:!e.hiddenColumns.includes(t.columnId))?[].concat(e.hiddenColumns,[t.columnId]):e.hiddenColumns.filter((function(e){return e!==t.columnId}));return i({},e,{hiddenColumns:o})}return t.type===l.setHiddenColumns?i({},e,{hiddenColumns:v(t.value,e.hiddenColumns)}):t.type===l.toggleHideAllColumns?i({},e,{hiddenColumns:(void 0!==t.value?t.value:!e.hiddenColumns.length)?r.allColumns.map((function(e){return e.id})):[]}):void 0}function X(e){var n=e.headers,r=e.state.hiddenColumns;t.useRef(!1).current;var o=0;n.forEach((function(e){return o+=function e(t,n){t.isVisible=n&&!r.includes(t.id);var o=0;return t.headers&&t.headers.length?t.headers.forEach((function(n){return o+=e(n,t.isVisible)})):o=t.isVisible?1:0,t.totalVisibleHeaderCount=o,o}(e,!0)}))}function Z(e){var n=e.columns,r=e.flatHeaders,o=e.dispatch,i=e.allColumns,s=e.getHooks,a=e.state.hiddenColumns,c=e.autoResetHiddenColumns,u=void 0===c||c,d=y(e),h=i.length===a.length,f=t.useCallback((function(e,t){return o({type:l.toggleHideColumn,columnId:e,value:t})}),[o]),m=t.useCallback((function(e){return o({type:l.setHiddenColumns,value:e})}),[o]),g=t.useCallback((function(e){return o({type:l.toggleHideAllColumns,value:e})}),[o]),v=p(s().getToggleHideAllColumnsProps,{instance:d()});r.forEach((function(e){e.toggleHidden=function(t){o({type:l.toggleHideColumn,columnId:e.id,value:t})},e.getToggleHiddenProps=p(s().getToggleHiddenProps,{instance:d(),column:e})}));var b=y(u);x((function(){b()&&o({type:l.resetHiddenColumns})}),[o,n]),Object.assign(e,{allColumnsHidden:h,toggleHideColumn:f,setHiddenColumns:m,toggleHideAllColumns:g,getToggleHideAllColumnsProps:v})}var ee={},te={},ne=function(e,t,n){return e},re=function(e,t){return e.subRows||[]},oe=function(e,t,n){return""+(n?[n.id,t].join("."):t)},ie=function(e){return e};function se(e){var t=e.initialState,n=void 0===t?ee:t,r=e.defaultColumn,o=void 0===r?te:r,a=e.getSubRows,l=void 0===a?re:a,c=e.getRowId,u=void 0===c?oe:c,d=e.stateReducer,h=void 0===d?ne:d,p=e.useControlledState,f=void 0===p?ie:p;return i({},s(e,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:o,getSubRows:l,getRowId:u,stateReducer:h,useControlledState:f})}function ae(e,t){void 0===t&&(t=0);var n=0,r=0,o=0,i=0;return e.forEach((function(e){var s=e.headers;if(e.totalLeft=t,s&&s.length){var a=ae(s,t),l=a[0],c=a[1],u=a[2],d=a[3];e.totalMinWidth=l,e.totalWidth=c,e.totalMaxWidth=u,e.totalFlexWidth=d}else e.totalMinWidth=e.minWidth,e.totalWidth=Math.min(Math.max(e.minWidth,e.width),e.maxWidth),e.totalMaxWidth=e.maxWidth,e.totalFlexWidth=e.canResize?e.totalWidth:0;e.isVisible&&(t+=e.totalWidth,n+=e.totalMinWidth,r+=e.totalWidth,o+=e.totalMaxWidth,i+=e.totalFlexWidth)})),[n,r,o,i]}function le(e){var t=e.data,n=e.rows,r=e.flatRows,o=e.rowsById,i=e.column,s=e.getRowId,a=e.getSubRows,l=e.accessValueHooks,c=e.getInstance;t.forEach((function(e,u){return function e(n,u,d,h,p){void 0===d&&(d=0);var m=n,g=s(n,u,h),v=o[g];if(v)v.subRows&&v.originalSubRows.forEach((function(t,n){return e(t,n,d+1,v)}));else if((v={id:g,original:m,index:u,depth:d,cells:[{}]}).cells.map=P,v.cells.filter=P,v.cells.forEach=P,v.cells[0].getCellProps=P,v.values={},p.push(v),r.push(v),o[g]=v,v.originalSubRows=a(n,u),v.originalSubRows){var y=[];v.originalSubRows.forEach((function(t,n){return e(t,n,d+1,v,y)})),v.subRows=y}i.accessor&&(v.values[i.id]=i.accessor(n,u,v,p,t)),v.values[i.id]=f(l,v.values[i.id],{row:v,column:i,instance:c()})}(e,u,0,void 0,n)}))}l.resetExpanded="resetExpanded",l.toggleRowExpanded="toggleRowExpanded",l.toggleAllRowsExpanded="toggleAllRowsExpanded";var ce=function(e){e.getToggleAllRowsExpandedProps=[ue],e.getToggleRowExpandedProps=[de],e.stateReducers.push(he),e.useInstance.push(pe),e.prepareRow.push(fe)};ce.pluginName="useExpanded";var ue=function(e,t){var n=t.instance;return[e,{onClick:function(e){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},de=function(e,t){var n=t.row;return[e,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function he(e,t,n,r){if(t.type===l.init)return i({expanded:{}},e);if(t.type===l.resetExpanded)return i({},e,{expanded:r.initialState.expanded||{}});if(t.type===l.toggleAllRowsExpanded){var o=t.value,c=r.rowsById,u=Object.keys(c).length===Object.keys(e.expanded).length;if(void 0!==o?o:!u){var d={};return Object.keys(c).forEach((function(e){d[e]=!0})),i({},e,{expanded:d})}return i({},e,{expanded:{}})}if(t.type===l.toggleRowExpanded){var h,p=t.id,f=t.value,m=e.expanded[p],g=void 0!==f?f:!m;if(!m&&g)return i({},e,{expanded:i({},e.expanded,(h={},h[p]=!0,h))});if(m&&!g){var v=e.expanded;return v[p],i({},e,{expanded:s(v,[p].map(a))})}return e}}function pe(e){var n=e.data,r=e.rows,o=e.rowsById,i=e.manualExpandedKey,s=void 0===i?"expanded":i,a=e.paginateExpandedRows,c=void 0===a||a,u=e.expandSubRows,d=void 0===u||u,h=e.autoResetExpanded,f=void 0===h||h,m=e.getHooks,v=e.plugins,b=e.state.expanded,w=e.dispatch;g(v,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var S=y(f),C=Boolean(Object.keys(o).length&&Object.keys(b).length);C&&Object.keys(o).some((function(e){return!b[e]}))&&(C=!1),x((function(){S()&&w({type:l.resetExpanded})}),[w,n]);var j=t.useCallback((function(e,t){w({type:l.toggleRowExpanded,id:e,value:t})}),[w]),_=t.useCallback((function(e){return w({type:l.toggleAllRowsExpanded,value:e})}),[w]),k=t.useMemo((function(){return c?R(r,{manualExpandedKey:s,expanded:b,expandSubRows:d}):r}),[c,r,s,b,d]),N=t.useMemo((function(){return function(e){var t=0;return Object.keys(e).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t}(b)}),[b]),E=y(e),T=p(m().getToggleAllRowsExpandedProps,{instance:E()});Object.assign(e,{preExpandedRows:r,expandedRows:k,rows:k,expandedDepth:N,isAllRowsExpanded:C,toggleRowExpanded:j,toggleAllRowsExpanded:_,getToggleAllRowsExpandedProps:T})}function fe(e,t){var n=t.instance.getHooks,r=t.instance;e.toggleRowExpanded=function(t){return r.toggleRowExpanded(e.id,t)},e.getToggleRowExpandedProps=p(n().getToggleRowExpandedProps,{instance:r,row:e})}var me=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return String(r).toLowerCase().includes(String(n).toLowerCase())}))}))};me.autoRemove=function(e){return!e};var ge=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r).toLowerCase()===String(n).toLowerCase()}))}))};ge.autoRemove=function(e){return!e};var ve=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r)===String(n)}))}))};ve.autoRemove=function(e){return!e};var ye=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t].includes(n)}))}))};ye.autoRemove=function(e){return!e||!e.length};var be=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.every((function(e){return r.includes(e)}))}))}))};be.autoRemove=function(e){return!e||!e.length};var xe=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.some((function(e){return r.includes(e)}))}))}))};xe.autoRemove=function(e){return!e||!e.length};var we=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return n.includes(r)}))}))};we.autoRemove=function(e){return!e||!e.length};var Se=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]===n}))}))};Se.autoRemove=function(e){return void 0===e};var Ce=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]==n}))}))};Ce.autoRemove=function(e){return null==e};var je=function(e,t,n){var r=n||[],o=r[0],i=r[1];if((o="number"==typeof o?o:-1/0)>(i="number"==typeof i?i:1/0)){var s=o;o=i,i=s}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=o&&n<=i}))}))};je.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};var _e=Object.freeze({__proto__:null,text:me,exactText:ge,exactTextCase:ve,includes:ye,includesAll:be,includesSome:xe,includesValue:we,exact:Se,equals:Ce,between:je});l.resetFilters="resetFilters",l.setFilter="setFilter",l.setAllFilters="setAllFilters";var ke=function(e){e.stateReducers.push(Ne),e.useInstance.push(Ee)};function Ne(e,t,n,r){if(t.type===l.init)return i({filters:[]},e);if(t.type===l.resetFilters)return i({},e,{filters:r.initialState.filters||[]});if(t.type===l.setFilter){var o=t.columnId,s=t.filterValue,a=r.allColumns,c=r.filterTypes,u=a.find((function(e){return e.id===o}));if(!u)throw new Error("React-Table: Could not find a column with id: "+o);var d=A(u.filter,c||{},_e),h=e.filters.find((function(e){return e.id===o})),p=v(s,h&&h.value);return M(d.autoRemove,p,u)?i({},e,{filters:e.filters.filter((function(e){return e.id!==o}))}):i({},e,h?{filters:e.filters.map((function(e){return e.id===o?{id:o,value:p}:e}))}:{filters:[].concat(e.filters,[{id:o,value:p}])})}if(t.type===l.setAllFilters){var f=t.filters,m=r.allColumns,g=r.filterTypes;return i({},e,{filters:v(f,e.filters).filter((function(e){var t=m.find((function(t){return t.id===e.id}));return!M(A(t.filter,g||{},_e).autoRemove,e.value,t)}))})}}function Ee(e){var n=e.data,r=e.rows,o=e.flatRows,i=e.rowsById,s=e.allColumns,a=e.filterTypes,c=e.manualFilters,u=e.defaultCanFilter,d=void 0!==u&&u,h=e.disableFilters,p=e.state.filters,f=e.dispatch,m=e.autoResetFilters,g=void 0===m||m,v=t.useCallback((function(e,t){f({type:l.setFilter,columnId:e,filterValue:t})}),[f]),b=t.useCallback((function(e){f({type:l.setAllFilters,filters:e})}),[f]);s.forEach((function(e){var t=e.id,n=e.accessor,r=e.defaultCanFilter,o=e.disableFilters;e.canFilter=n?T(!0!==o&&void 0,!0!==h&&void 0,!0):T(r,d,!1),e.setFilter=function(t){return v(e.id,t)};var i=p.find((function(e){return e.id===t}));e.filterValue=i&&i.value}));var w=t.useMemo((function(){if(c||!p.length)return[r,o,i];var e=[],t={};return[function n(r,o){void 0===o&&(o=0);var i=r;return(i=p.reduce((function(e,t){var n=t.id,r=t.value,i=s.find((function(e){return e.id===n}));if(!i)return e;0===o&&(i.preFilteredRows=e);var l=A(i.filter,a||{},_e);return l?(i.filteredRows=l(e,[n],r),i.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+i.id+"."),e)}),r)).forEach((function(r){e.push(r),t[r.id]=r,r.subRows&&(r.subRows=r.subRows&&r.subRows.length>0?n(r.subRows,o+1):r.subRows)})),i}(r),e,t]}),[c,p,r,o,i,s,a]),S=w[0],C=w[1],j=w[2];t.useMemo((function(){s.filter((function(e){return!p.find((function(t){return t.id===e.id}))})).forEach((function(e){e.preFilteredRows=S,e.filteredRows=S}))}),[S,p,s]);var _=y(g);x((function(){_()&&f({type:l.resetFilters})}),[f,c?null:n]),Object.assign(e,{preFilteredRows:r,preFilteredFlatRows:o,preFilteredRowsById:i,filteredRows:S,filteredFlatRows:C,filteredRowsById:j,rows:S,flatRows:C,rowsById:j,setFilter:v,setAllFilters:b})}ke.pluginName="useFilters",l.resetGlobalFilter="resetGlobalFilter",l.setGlobalFilter="setGlobalFilter";var Te=function(e){e.stateReducers.push(Oe),e.useInstance.push(Ie)};function Oe(e,t,n,r){if(t.type===l.resetGlobalFilter)return i({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===l.setGlobalFilter){var o=t.filterValue,a=r.userFilterTypes,c=A(r.globalFilter,a||{},_e),u=v(o,e.globalFilter);return M(c.autoRemove,u)?(e.globalFilter,s(e,["globalFilter"])):i({},e,{globalFilter:u})}}function Ie(e){var n=e.data,r=e.rows,o=e.flatRows,i=e.rowsById,s=e.allColumns,a=e.filterTypes,c=e.globalFilter,u=e.manualGlobalFilter,d=e.state.globalFilter,h=e.dispatch,p=e.autoResetGlobalFilter,f=void 0===p||p,m=e.disableGlobalFilter,g=t.useCallback((function(e){h({type:l.setGlobalFilter,filterValue:e})}),[h]),v=t.useMemo((function(){if(u||void 0===d)return[r,o,i];var e=[],t={},n=A(c,a||{},_e);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),r;s.forEach((function(e){var t=e.disableGlobalFilter;e.canFilter=T(!0!==t&&void 0,!0!==m&&void 0,!0)}));var l=s.filter((function(e){return!0===e.canFilter}));return[function r(o){return(o=n(o,l.map((function(e){return e.id})),d)).forEach((function(n){e.push(n),t[n.id]=n,n.subRows=n.subRows&&n.subRows.length?r(n.subRows):n.subRows})),o}(r),e,t]}),[u,d,c,a,s,r,o,i,m]),b=v[0],w=v[1],S=v[2],C=y(f);x((function(){C()&&h({type:l.resetGlobalFilter})}),[h,u?null:n]),Object.assign(e,{preGlobalFilteredRows:r,preGlobalFilteredFlatRows:o,preGlobalFilteredRowsById:i,globalFilteredRows:b,globalFilteredFlatRows:w,globalFilteredRowsById:S,rows:b,flatRows:w,rowsById:S,setGlobalFilter:g,disableGlobalFilter:m})}function Re(e,t){return t.reduce((function(e,t){return e+("number"==typeof t?t:0)}),0)}Te.pluginName="useGlobalFilter";var Ae=Object.freeze({__proto__:null,sum:Re,min:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e))})),t},max:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.max(t,e))})),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e),n=Math.max(n,e))})),t+".."+n},average:function(e){return Re(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort((function(e,t){return e-t}));return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),Me=[],Pe={};l.resetGroupBy="resetGroupBy",l.setGroupBy="setGroupBy",l.toggleGroupBy="toggleGroupBy";var De=function(e){e.getGroupByToggleProps=[Fe],e.stateReducers.push(Le),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.groupBy])})),e.visibleColumns.push(Be),e.useInstance.push(Ge),e.prepareRow.push($e)};De.pluginName="useGroupBy";var Fe=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(e){e.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Le(e,t,n,r){if(t.type===l.init)return i({groupBy:[]},e);if(t.type===l.resetGroupBy)return i({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===l.setGroupBy)return i({},e,{groupBy:t.value});if(t.type===l.toggleGroupBy){var o=t.columnId,s=t.value,a=void 0!==s?s:!e.groupBy.includes(o);return i({},e,a?{groupBy:[].concat(e.groupBy,[o])}:{groupBy:e.groupBy.filter((function(e){return e!==o}))})}}function Be(e,t){var n=t.instance.state.groupBy,r=n.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean),o=e.filter((function(e){return!n.includes(e.id)}));return(e=[].concat(r,o)).forEach((function(e){e.isGrouped=n.includes(e.id),e.groupedIndex=n.indexOf(e.id)})),e}var Ue={};function Ge(e){var n=e.data,r=e.rows,o=e.flatRows,s=e.rowsById,a=e.allColumns,c=e.flatHeaders,u=e.groupByFn,d=void 0===u?qe:u,h=e.manualGroupBy,f=e.aggregations,m=void 0===f?Ue:f,v=e.plugins,b=e.state.groupBy,w=e.dispatch,S=e.autoResetGroupBy,C=void 0===S||S,j=e.disableGroupBy,_=e.defaultCanGroupBy,k=e.getHooks;g(v,["useColumnOrder","useFilters"],"useGroupBy");var N=y(e);a.forEach((function(t){var n=t.accessor,r=t.defaultGroupBy,o=t.disableGroupBy;t.canGroupBy=n?T(t.canGroupBy,!0!==o&&void 0,!0!==j&&void 0,!0):T(t.canGroupBy,r,_,!1),t.canGroupBy&&(t.toggleGroupBy=function(){return e.toggleGroupBy(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var E=t.useCallback((function(e,t){w({type:l.toggleGroupBy,columnId:e,value:t})}),[w]),O=t.useCallback((function(e){w({type:l.setGroupBy,value:e})}),[w]);c.forEach((function(e){e.getGroupByToggleProps=p(k().getGroupByToggleProps,{instance:N(),header:e})}));var R=t.useMemo((function(){if(h||!b.length)return[r,o,s,Me,Pe,o,s];var e=b.filter((function(e){return a.find((function(t){return t.id===e}))})),t=[],n={},l=[],c={},u=[],p={},f=function r(o,s,h){if(void 0===s&&(s=0),s===e.length)return o.map((function(e){return i({},e,{depth:s})}));var f=e[s],g=d(o,f);return Object.entries(g).map((function(o,i){var d=o[0],g=o[1],v=f+":"+d,y=r(g,s+1,v=h?h+">"+v:v),b=s?I(g,"leafRows"):g,x=function(t,n,r){var o={};return a.forEach((function(i){if(e.includes(i.id))o[i.id]=n[0]?n[0].values[i.id]:null;else{var s="function"==typeof i.aggregate?i.aggregate:m[i.aggregate]||Ae[i.aggregate];if(s){var a=n.map((function(e){return e.values[i.id]})),l=t.map((function(e){var t=e.values[i.id];if(!r&&i.aggregateValue){var n="function"==typeof i.aggregateValue?i.aggregateValue:m[i.aggregateValue]||Ae[i.aggregateValue];if(!n)throw console.info({column:i}),new Error("React Table: Invalid column.aggregateValue option for column listed above");t=n(t,e,i)}return t}));o[i.id]=s(l,a)}else{if(i.aggregate)throw console.info({column:i}),new Error("React Table: Invalid column.aggregate option for column listed above");o[i.id]=null}}})),o}(b,g,s),w={id:v,isGrouped:!0,groupByID:f,groupByVal:d,values:x,subRows:y,leafRows:b,depth:s,index:i};return y.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(l.push(e),c[e.id]=e):(u.push(e),p[e.id]=e)})),w}))}(r);return f.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(l.push(e),c[e.id]=e):(u.push(e),p[e.id]=e)})),[f,t,n,l,c,u,p]}),[h,b,r,o,s,a,m,d]),A=R[0],M=R[1],P=R[2],D=R[3],F=R[4],L=R[5],B=R[6],U=y(C);x((function(){U()&&w({type:l.resetGroupBy})}),[w,h?null:n]),Object.assign(e,{preGroupedRows:r,preGroupedFlatRow:o,preGroupedRowsById:s,groupedRows:A,groupedFlatRows:M,groupedRowsById:P,onlyGroupedFlatRows:D,onlyGroupedRowsById:F,nonGroupedFlatRows:L,nonGroupedRowsById:B,rows:A,flatRows:M,rowsById:P,toggleGroupBy:E,setGroupBy:O})}function $e(e){e.allCells.forEach((function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&(null==(n=e.subRows)?void 0:n.length)}))}function qe(e,t){return e.reduce((function(e,n,r){var o=""+n.values[t];return e[o]=Array.isArray(e[o])?e[o]:[],e[o].push(n),e}),{})}var ze=/([0-9]+)/gm;function Ve(e,t){return e===t?0:e>t?1:-1}function He(e,t,n){return[e.values[n],t.values[n]]}function We(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var Ye=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=He(e,t,n),o=r[0],i=r[1];for(o=We(o),i=We(i),o=o.split(ze).filter(Boolean),i=i.split(ze).filter(Boolean);o.length&&i.length;){var s=o.shift(),a=i.shift(),l=parseInt(s,10),c=parseInt(a,10),u=[l,c].sort();if(isNaN(u[0])){if(s>a)return 1;if(a>s)return-1}else{if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}}return o.length-i.length},datetime:function(e,t,n){var r=He(e,t,n),o=r[0],i=r[1];return Ve(o=o.getTime(),i=i.getTime())},basic:function(e,t,n){var r=He(e,t,n);return Ve(r[0],r[1])},string:function(e,t,n){var r=He(e,t,n),o=r[0],i=r[1];for(o=o.split("").filter(Boolean),i=i.split("").filter(Boolean);o.length&&i.length;){var s=o.shift(),a=i.shift(),l=s.toLowerCase(),c=a.toLowerCase();if(l>c)return 1;if(c>l)return-1;if(s>a)return 1;if(a>s)return-1}return o.length-i.length},number:function(e,t,n){var r=He(e,t,n),o=r[0],i=r[1],s=/[^0-9.]/gi;return Ve(o=Number(String(o).replace(s,"")),i=Number(String(i).replace(s,"")))}});l.resetSortBy="resetSortBy",l.setSortBy="setSortBy",l.toggleSortBy="toggleSortBy",l.clearSortBy="clearSortBy",d.sortType="alphanumeric",d.sortDescFirst=!1;var Qe=function(e){e.getSortByToggleProps=[Je],e.stateReducers.push(Ke),e.useInstance.push(Xe)};Qe.pluginName="useSortBy";var Je=function(e,t){var n=t.instance,r=t.column,o=n.isMultiSortEvent,i=void 0===o?function(e){return e.shiftKey}:o;return[e,{onClick:r.canSort?function(e){e.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&i(e))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Ke(e,t,n,r){if(t.type===l.init)return i({sortBy:[]},e);if(t.type===l.resetSortBy)return i({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===l.clearSortBy)return i({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===l.setSortBy)return i({},e,{sortBy:t.sortBy});if(t.type===l.toggleSortBy){var o,s=t.columnId,a=t.desc,c=t.multi,u=r.allColumns,d=r.disableMultiSort,h=r.disableSortRemove,p=r.disableMultiRemove,f=r.maxMultiSortColCount,m=void 0===f?Number.MAX_SAFE_INTEGER:f,g=e.sortBy,v=u.find((function(e){return e.id===s})).sortDescFirst,y=g.find((function(e){return e.id===s})),b=g.findIndex((function(e){return e.id===s})),x=null!=a,w=[];return"toggle"!==(o=!d&&c?y?"toggle":"add":b!==g.length-1||1!==g.length?"replace":y?"toggle":"replace")||h||x||c&&p||!(y&&y.desc&&!v||!y.desc&&v)||(o="remove"),"replace"===o?w=[{id:s,desc:x?a:v}]:"add"===o?(w=[].concat(g,[{id:s,desc:x?a:v}])).splice(0,w.length-m):"toggle"===o?w=g.map((function(e){return e.id===s?i({},e,{desc:x?a:!y.desc}):e})):"remove"===o&&(w=g.filter((function(e){return e.id!==s}))),i({},e,{sortBy:w})}}function Xe(e){var n=e.data,r=e.rows,o=e.flatRows,i=e.allColumns,s=e.orderByFn,a=void 0===s?Ze:s,c=e.sortTypes,u=e.manualSortBy,d=e.defaultCanSort,h=e.disableSortBy,f=e.flatHeaders,m=e.state.sortBy,v=e.dispatch,b=e.plugins,w=e.getHooks,S=e.autoResetSortBy,C=void 0===S||S;g(b,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var j=t.useCallback((function(e){v({type:l.setSortBy,sortBy:e})}),[v]),_=t.useCallback((function(e,t,n){v({type:l.toggleSortBy,columnId:e,desc:t,multi:n})}),[v]),k=y(e);f.forEach((function(e){var t=e.accessor,n=e.canSort,r=e.disableSortBy,o=e.id,i=t?T(!0!==r&&void 0,!0!==h&&void 0,!0):T(d,n,!1);e.canSort=i,e.canSort&&(e.toggleSortBy=function(t,n){return _(e.id,t,n)},e.clearSortBy=function(){v({type:l.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=p(w().getSortByToggleProps,{instance:k(),column:e});var s=m.find((function(e){return e.id===o}));e.isSorted=!!s,e.sortedIndex=m.findIndex((function(e){return e.id===o})),e.isSortedDesc=e.isSorted?s.desc:void 0}));var N=t.useMemo((function(){if(u||!m.length)return[r,o];var e=[],t=m.filter((function(e){return i.find((function(t){return t.id===e.id}))}));return[function n(r){var o=a(r,t.map((function(e){var t=i.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,r=O(n)||(c||{})[n]||Ye[n];if(!r)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return r(t,n,e.id,e.desc)}})),t.map((function(e){var t=i.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return o.forEach((function(t){e.push(t),t.subRows&&0!==t.subRows.length&&(t.subRows=n(t.subRows))})),o}(r),e]}),[u,m,r,o,i,a,c]),E=N[0],I=N[1],R=y(C);x((function(){R()&&v({type:l.resetSortBy})}),[u?null:n]),Object.assign(e,{preSortedRows:r,preSortedFlatRows:o,sortedRows:E,sortedFlatRows:I,rows:E,flatRows:I,setSortBy:j,toggleSortBy:_})}function Ze(e,t,n){return[].concat(e).sort((function(e,r){for(var o=0;o<t.length;o+=1){var i=t[o],s=!1===n[o]||"desc"===n[o],a=i(e,r);if(0!==a)return s?-a:a}return n[0]?e.index-r.index:r.index-e.index}))}l.resetPage="resetPage",l.gotoPage="gotoPage",l.setPageSize="setPageSize";var et=function(e){e.stateReducers.push(tt),e.useInstance.push(nt)};function tt(e,t,n,r){if(t.type===l.init)return i({pageSize:10,pageIndex:0},e);if(t.type===l.resetPage)return i({},e,{pageIndex:r.initialState.pageIndex||0});if(t.type===l.gotoPage){var o=r.pageCount,s=r.page,a=v(t.pageIndex,e.pageIndex),c=!1;return a>e.pageIndex?c=-1===o?s.length>=e.pageSize:a<o:a<e.pageIndex&&(c=a>-1),c?i({},e,{pageIndex:a}):e}if(t.type===l.setPageSize){var u=t.pageSize,d=e.pageSize*e.pageIndex;return i({},e,{pageIndex:Math.floor(d/u),pageSize:u})}}function nt(e){var n=e.rows,r=e.autoResetPage,o=void 0===r||r,i=e.manualExpandedKey,s=void 0===i?"expanded":i,a=e.plugins,c=e.pageCount,u=e.paginateExpandedRows,d=void 0===u||u,h=e.expandSubRows,p=void 0===h||h,f=e.state,m=f.pageSize,v=f.pageIndex,b=f.expanded,w=f.globalFilter,S=f.filters,C=f.groupBy,j=f.sortBy,_=e.dispatch,k=e.data,N=e.manualPagination;g(a,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var E=y(o);x((function(){E()&&_({type:l.resetPage})}),[_,N?null:k,w,S,C,j]);var T=N?c:Math.ceil(n.length/m),O=t.useMemo((function(){return T>0?[].concat(new Array(T)).fill(null).map((function(e,t){return t})):[]}),[T]),I=t.useMemo((function(){var e;if(N)e=n;else{var t=m*v,r=t+m;e=n.slice(t,r)}return d?e:R(e,{manualExpandedKey:s,expanded:b,expandSubRows:p})}),[p,b,s,N,v,m,d,n]),A=v>0,M=-1===T?I.length>=m:v<T-1,P=t.useCallback((function(e){_({type:l.gotoPage,pageIndex:e})}),[_]),D=t.useCallback((function(){return P((function(e){return e-1}))}),[P]),F=t.useCallback((function(){return P((function(e){return e+1}))}),[P]),L=t.useCallback((function(e){_({type:l.setPageSize,pageSize:e})}),[_]);Object.assign(e,{pageOptions:O,pageCount:T,page:I,canPreviousPage:A,canNextPage:M,gotoPage:P,previousPage:D,nextPage:F,setPageSize:L})}et.pluginName="usePagination",l.resetPivot="resetPivot",l.togglePivot="togglePivot";var rt=function(e){e.getPivotToggleProps=[it],e.stateReducers.push(st),e.useInstanceAfterData.push(at),e.allColumns.push(lt),e.accessValue.push(ct),e.materializedColumns.push(ut),e.materializedColumnsDeps.push(dt),e.visibleColumns.push(ht),e.visibleColumnsDeps.push(pt),e.useInstance.push(ft),e.prepareRow.push(mt)};rt.pluginName="usePivotColumns";var ot=[],it=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(e){e.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function st(e,t,n,r){if(t.type===l.init)return i({pivotColumns:ot},e);if(t.type===l.resetPivot)return i({},e,{pivotColumns:r.initialState.pivotColumns||ot});if(t.type===l.togglePivot){var o=t.columnId,s=t.value,a=void 0!==s?s:!e.pivotColumns.includes(o);return i({},e,a?{pivotColumns:[].concat(e.pivotColumns,[o])}:{pivotColumns:e.pivotColumns.filter((function(e){return e!==o}))})}}function at(e){e.allColumns.forEach((function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)}))}function lt(e,t){var n=t.instance;return e.forEach((function(e){e.isPivotSource=n.state.pivotColumns.includes(e.id),e.uniqueValues=new Set})),e}function ct(e,t){var n=t.column;return n.uniqueValues&&void 0!==e&&n.uniqueValues.add(e),e}function ut(e,t){var n=t.instance,r=n.allColumns,o=n.state;if(!o.pivotColumns.length||!o.groupBy||!o.groupBy.length)return e;var s=o.pivotColumns.map((function(e){return r.find((function(t){return t.id===e}))})).filter(Boolean),a=r.filter((function(e){return!e.isPivotSource&&!o.groupBy.includes(e.id)&&!o.pivotColumns.includes(e.id)})),l=j(function e(t,n,r){void 0===t&&(t=0),void 0===r&&(r=[]);var o=s[t];return o?Array.from(o.uniqueValues).sort().map((function(s){var a=i({},o,{Header:o.PivotHeader||"string"==typeof o.header?o.Header+": "+s:s,isPivotGroup:!0,parent:n,depth:t,id:n?n.id+"."+o.id+"."+s:o.id+"."+s,pivotValue:s});return a.columns=e(t+1,a,[].concat(r,[function(e){return e.values[o.id]===s}])),a})):a.map((function(e){return i({},e,{canPivot:!1,isPivoted:!0,parent:n,depth:t,id:""+(n?n.id+"."+e.id:e.id),accessor:function(t,n,o){if(r.every((function(e){return e(o)})))return o.values[e.id]}})}))}());return[].concat(e,l)}function dt(e,t){var n=t.instance.state,r=n.pivotColumns,o=n.groupBy;return[].concat(e,[r,o])}function ht(e,t){var n=t.instance.state;return e=e.filter((function(e){return!e.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter((function(e){return e.isGrouped||e.isPivoted}))),e}function pt(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function ft(e){var t=e.columns,n=e.allColumns,r=e.flatHeaders,o=e.getHooks,i=e.plugins,s=e.dispatch,a=e.autoResetPivot,c=void 0===a||a,u=e.manaulPivot,d=e.disablePivot,h=e.defaultCanPivot;g(i,["useGroupBy"],"usePivotColumns");var f=y(e);n.forEach((function(t){var n=t.accessor,r=t.defaultPivot,o=t.disablePivot;t.canPivot=n?T(t.canPivot,!0!==o&&void 0,!0!==d&&void 0,!0):T(t.canPivot,r,h,!1),t.canPivot&&(t.togglePivot=function(){return e.togglePivot(t.id)}),t.Aggregated=t.Aggregated||t.Cell})),r.forEach((function(e){e.getPivotToggleProps=p(o().getPivotToggleProps,{instance:f(),header:e})}));var m=y(c);x((function(){m()&&s({type:l.resetPivot})}),[s,u?null:t]),Object.assign(e,{togglePivot:function(e,t){s({type:l.togglePivot,columnId:e,value:t})}})}function mt(e){e.allCells.forEach((function(e){e.isPivoted=e.column.isPivoted}))}l.resetSelectedRows="resetSelectedRows",l.toggleAllRowsSelected="toggleAllRowsSelected",l.toggleRowSelected="toggleRowSelected",l.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var gt=function(e){e.getToggleRowSelectedProps=[vt],e.getToggleAllRowsSelectedProps=[yt],e.getToggleAllPageRowsSelectedProps=[bt],e.stateReducers.push(xt),e.useInstance.push(wt),e.prepareRow.push(St)};gt.pluginName="useRowSelect";var vt=function(e,t){var n=t.instance,r=t.row,o=n.manualRowSelectedKey,i=void 0===o?"isSelected":o;return[e,{onChange:function(e){r.toggleRowSelected(e.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[i])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},yt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},bt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllPageRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(e){var t=e.id;return n.state.selectedRowIds[t]})))}]};function xt(e,t,n,r){if(t.type===l.init)return i({selectedRowIds:{}},e);if(t.type===l.resetSelectedRows)return i({},e,{selectedRowIds:r.initialState.selectedRowIds||{}});if(t.type===l.toggleAllRowsSelected){var o=t.value,s=r.isAllRowsSelected,a=r.rowsById,c=r.nonGroupedRowsById,u=void 0===c?a:c,d=void 0!==o?o:!s,h=Object.assign({},e.selectedRowIds);return d?Object.keys(u).forEach((function(e){h[e]=!0})):Object.keys(u).forEach((function(e){delete h[e]})),i({},e,{selectedRowIds:h})}if(t.type===l.toggleRowSelected){var p=t.id,f=t.value,m=r.rowsById,g=r.selectSubRows,v=void 0===g||g,y=r.getSubRows,b=e.selectedRowIds[p],x=void 0!==f?f:!b;if(b===x)return e;var w=i({},e.selectedRowIds);return function e(t){var n=m[t];if(n&&(n.isGrouped||(x?w[t]=!0:delete w[t]),v&&y(n)))return y(n).forEach((function(t){return e(t.id)}))}(p),i({},e,{selectedRowIds:w})}if(t.type===l.toggleAllPageRowsSelected){var S=t.value,C=r.page,j=r.rowsById,_=r.selectSubRows,k=void 0===_||_,N=r.isAllPageRowsSelected,E=r.getSubRows,T=void 0!==S?S:!N,O=i({},e.selectedRowIds);return C.forEach((function(e){return function e(t){var n=j[t];if(n.isGrouped||(T?O[t]=!0:delete O[t]),k&&E(n))return E(n).forEach((function(t){return e(t.id)}))}(e.id)})),i({},e,{selectedRowIds:O})}return e}function wt(e){var n=e.data,r=e.rows,o=e.getHooks,i=e.plugins,s=e.rowsById,a=e.nonGroupedRowsById,c=void 0===a?s:a,u=e.autoResetSelectedRows,d=void 0===u||u,h=e.state.selectedRowIds,f=e.selectSubRows,m=void 0===f||f,v=e.dispatch,b=e.page,w=e.getSubRows;g(i,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var S=t.useMemo((function(){var e=[];return r.forEach((function(t){var n=m?function e(t,n,r){if(n[t.id])return!0;var o=r(t);if(o&&o.length){var i=!0,s=!1;return o.forEach((function(t){s&&!i||(e(t,n,r)?s=!0:i=!1)})),!!i||!!s&&null}return!1}(t,h,w):!!h[t.id];t.isSelected=!!n,t.isSomeSelected=null===n,n&&e.push(t)})),e}),[r,m,h,w]),C=Boolean(Object.keys(c).length&&Object.keys(h).length),j=C;C&&Object.keys(c).some((function(e){return!h[e]}))&&(C=!1),C||b&&b.length&&b.some((function(e){var t=e.id;return!h[t]}))&&(j=!1);var _=y(d);x((function(){_()&&v({type:l.resetSelectedRows})}),[v,n]);var k=t.useCallback((function(e){return v({type:l.toggleAllRowsSelected,value:e})}),[v]),N=t.useCallback((function(e){return v({type:l.toggleAllPageRowsSelected,value:e})}),[v]),E=t.useCallback((function(e,t){return v({type:l.toggleRowSelected,id:e,value:t})}),[v]),T=y(e),O=p(o().getToggleAllRowsSelectedProps,{instance:T()}),I=p(o().getToggleAllPageRowsSelectedProps,{instance:T()});Object.assign(e,{selectedFlatRows:S,isAllRowsSelected:C,isAllPageRowsSelected:j,toggleRowSelected:E,toggleAllRowsSelected:k,getToggleAllRowsSelectedProps:O,getToggleAllPageRowsSelectedProps:I,toggleAllPageRowsSelected:N})}function St(e,t){var n=t.instance;e.toggleRowSelected=function(t){return n.toggleRowSelected(e.id,t)},e.getToggleRowSelectedProps=p(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var Ct=function(e){return{}},jt=function(e){return{}};l.setRowState="setRowState",l.setCellState="setCellState",l.resetRowState="resetRowState";var _t=function(e){e.stateReducers.push(kt),e.useInstance.push(Nt),e.prepareRow.push(Et)};function kt(e,t,n,r){var o=r.initialRowStateAccessor,s=void 0===o?Ct:o,a=r.initialCellStateAccessor,c=void 0===a?jt:a,u=r.rowsById;if(t.type===l.init)return i({rowState:{}},e);if(t.type===l.resetRowState)return i({},e,{rowState:r.initialState.rowState||{}});if(t.type===l.setRowState){var d,h=t.rowId,p=t.value,f=void 0!==e.rowState[h]?e.rowState[h]:s(u[h]);return i({},e,{rowState:i({},e.rowState,(d={},d[h]=v(p,f),d))})}if(t.type===l.setCellState){var m,g,y,b,x,w=t.rowId,S=t.columnId,C=t.value,j=void 0!==e.rowState[w]?e.rowState[w]:s(u[w]),_=void 0!==(null==j||null==(m=j.cellState)?void 0:m[S])?j.cellState[S]:c(null==(g=u[w])||null==(y=g.cells)?void 0:y.find((function(e){return e.column.id===S})));return i({},e,{rowState:i({},e.rowState,(x={},x[w]=i({},j,{cellState:i({},j.cellState||{},(b={},b[S]=v(C,_),b))}),x))})}}function Nt(e){var n=e.autoResetRowState,r=void 0===n||n,o=e.data,i=e.dispatch,s=t.useCallback((function(e,t){return i({type:l.setRowState,rowId:e,value:t})}),[i]),a=t.useCallback((function(e,t,n){return i({type:l.setCellState,rowId:e,columnId:t,value:n})}),[i]),c=y(r);x((function(){c()&&i({type:l.resetRowState})}),[o]),Object.assign(e,{setRowState:s,setCellState:a})}function Et(e,t){var n=t.instance,r=n.initialRowStateAccessor,o=void 0===r?Ct:r,i=n.initialCellStateAccessor,s=void 0===i?jt:i,a=n.state.rowState;e&&(e.state=void 0!==a[e.id]?a[e.id]:o(e),e.setState=function(t){return n.setRowState(e.id,t)},e.cells.forEach((function(t){e.state.cellState||(e.state.cellState={}),t.state=void 0!==e.state.cellState[t.column.id]?e.state.cellState[t.column.id]:s(t),t.setState=function(r){return n.setCellState(e.id,t.column.id,r)}})))}_t.pluginName="useRowState",l.resetColumnOrder="resetColumnOrder",l.setColumnOrder="setColumnOrder";var Tt=function(e){e.stateReducers.push(Ot),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.columnOrder])})),e.visibleColumns.push(It),e.useInstance.push(Rt)};function Ot(e,t,n,r){return t.type===l.init?i({columnOrder:[]},e):t.type===l.resetColumnOrder?i({},e,{columnOrder:r.initialState.columnOrder||[]}):t.type===l.setColumnOrder?i({},e,{columnOrder:v(t.columnOrder,e.columnOrder)}):void 0}function It(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var r=[].concat(n),o=[].concat(e),i=[],s=function(){var e=r.shift(),t=o.findIndex((function(t){return t.id===e}));t>-1&&i.push(o.splice(t,1)[0])};o.length&&r.length;)s();return[].concat(i,o)}function Rt(e){var n=e.dispatch;e.setColumnOrder=t.useCallback((function(e){return n({type:l.setColumnOrder,columnOrder:e})}),[n])}Tt.pluginName="useColumnOrder",d.canResize=!0,l.columnStartResizing="columnStartResizing",l.columnResizing="columnResizing",l.columnDoneResizing="columnDoneResizing",l.resetResize="resetResize";var At=function(e){e.getResizerProps=[Mt],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(Pt),e.useInstance.push(Ft),e.useInstanceBeforeDimensions.push(Dt)},Mt=function(e,t){var n=t.instance,r=t.header,o=n.dispatch,i=function(e,t){var n=!1;if("touchstart"===e.type){if(e.touches&&e.touches.length>1)return;n=!0}var r,i,s=function(e){var t=[];return function e(n){n.columns&&n.columns.length&&n.columns.map(e),t.push(n)}(e),t}(t).map((function(e){return[e.id,e.totalWidth]})),a=n?Math.round(e.touches[0].clientX):e.clientX,c=function(){window.cancelAnimationFrame(r),r=null,o({type:l.columnDoneResizing})},u=function(){window.cancelAnimationFrame(r),r=null,o({type:l.columnResizing,clientX:i})},d=function(e){i=e,r||(r=window.requestAnimationFrame(u))},h={mouse:{moveEvent:"mousemove",moveHandler:function(e){return d(e.clientX)},upEvent:"mouseup",upHandler:function(e){document.removeEventListener("mousemove",h.mouse.moveHandler),document.removeEventListener("mouseup",h.mouse.upHandler),c()}},touch:{moveEvent:"touchmove",moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(e){document.removeEventListener(h.touch.moveEvent,h.touch.moveHandler),document.removeEventListener(h.touch.upEvent,h.touch.moveHandler),c()}}},p=n?h.touch:h.mouse,f=!!function(){if("boolean"==typeof D)return D;var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return D=e}()&&{passive:!1};document.addEventListener(p.moveEvent,p.moveHandler,f),document.addEventListener(p.upEvent,p.upHandler,f),o({type:l.columnStartResizing,columnId:t.id,columnWidth:t.totalWidth,headerIdWidths:s,clientX:a})};return[e,{onMouseDown:function(e){return e.persist()||i(e,r)},onTouchStart:function(e){return e.persist()||i(e,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Pt(e,t){if(t.type===l.init)return i({columnResizing:{columnWidths:{}}},e);if(t.type===l.resetResize)return i({},e,{columnResizing:{columnWidths:{}}});if(t.type===l.columnStartResizing){var n=t.clientX,r=t.columnId,o=t.columnWidth,s=t.headerIdWidths;return i({},e,{columnResizing:i({},e.columnResizing,{startX:n,headerIdWidths:s,columnWidth:o,isResizingColumn:r})})}if(t.type===l.columnResizing){var a=t.clientX,c=e.columnResizing,u=c.startX,d=c.columnWidth,h=c.headerIdWidths,p=(a-u)/d,f={};return(void 0===h?[]:h).forEach((function(e){var t=e[0],n=e[1];f[t]=Math.max(n+n*p,0)})),i({},e,{columnResizing:i({},e.columnResizing,{columnWidths:i({},e.columnResizing.columnWidths,{},f)})})}return t.type===l.columnDoneResizing?i({},e,{columnResizing:i({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}At.pluginName="useResizeColumns";var Dt=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,o=e.state.columnResizing,i=y(e);t.forEach((function(e){var t=T(!0!==e.disableResizing&&void 0,!0!==n&&void 0,!0);e.canResize=t,e.width=o.columnWidths[e.id]||e.originalWidth||e.width,e.isResizing=o.isResizingColumn===e.id,t&&(e.getResizerProps=p(r().getResizerProps,{instance:i(),header:e}))}))};function Ft(e){var n=e.plugins,r=e.dispatch,o=e.autoResetResize,i=void 0===o||o,s=e.columns;g(n,["useAbsoluteLayout"],"useResizeColumns");var a=y(i);x((function(){a()&&r({type:l.resetResize})}),[s]);var c=t.useCallback((function(){return r({type:l.resetResize})}),[r]);Object.assign(e,{resetResizing:c})}var Lt={position:"absolute",top:0},Bt=function(e){e.getTableBodyProps.push(Ut),e.getRowProps.push(Ut),e.getHeaderGroupProps.push(Ut),e.getFooterGroupProps.push(Ut),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Lt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Lt,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Lt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};Bt.pluginName="useAbsoluteLayout";var Ut=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},Gt={display:"inline-block",boxSizing:"border-box"},$t=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},qt=function(e){e.getRowProps.push($t),e.getHeaderGroupProps.push($t),e.getFooterGroupProps.push($t),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Gt,{width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Gt,{width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Gt,{width:n.totalWidth+"px"})}]}))};function zt(e){e.getTableProps.push(Vt),e.getRowProps.push(Ht),e.getHeaderGroupProps.push(Ht),e.getFooterGroupProps.push(Ht),e.getHeaderProps.push(Wt),e.getCellProps.push(Yt),e.getFooterProps.push(Qt)}qt.pluginName="useBlockLayout",zt.pluginName="useFlexLayout";var Vt=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Ht=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Wt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Yt=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},Qt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function Jt(e){e.stateReducers.push(en),e.getTableProps.push(Kt),e.getHeaderProps.push(Xt),e.getRowProps.push(Zt)}l.columnStartResizing="columnStartResizing",l.columnResizing="columnResizing",l.columnDoneResizing="columnDoneResizing",l.resetResize="resetResize",Jt.pluginName="useGridLayout";var Kt=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map((function(e){var t;return n.state.gridLayout.columnWidths[e.id]?n.state.gridLayout.columnWidths[e.id]+"px":(null==(t=n.state.columnResizing)?void 0:t.isResizingColumn)?n.state.gridLayout.startWidths[e.id]+"px":"number"==typeof e.width?e.width+"px":e.width})).join(" ")}}]},Xt=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Zt=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function en(e,t,n,r){if(t.type===l.init)return i({gridLayout:{columnWidths:{}}},e);if(t.type===l.resetResize)return i({},e,{gridLayout:{columnWidths:{}}});if(t.type===l.columnStartResizing){var o=t.columnId,s=t.headerIdWidths,a=tn(o);if(void 0!==a){var c=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=tn(t.id),n))}),{}),u=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.minWidth,n))}),{}),d=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.maxWidth,n))}),{}),h=s.map((function(e){var t=e[0];return[t,tn(t)]}));return i({},e,{gridLayout:i({},e.gridLayout,{startWidths:c,minWidths:u,maxWidths:d,headerIdGridWidths:h,columnWidth:a})})}return e}if(t.type===l.columnResizing){var p=t.clientX,f=e.columnResizing.startX,m=e.gridLayout,g=m.columnWidth,v=m.minWidths,y=m.maxWidths,b=m.headerIdGridWidths,x=(p-f)/g,w={};return(void 0===b?[]:b).forEach((function(e){var t=e[0],n=e[1];w[t]=Math.min(Math.max(v[t],n+n*x),y[t])})),i({},e,{gridLayout:i({},e.gridLayout,{columnWidths:i({},e.gridLayout.columnWidths,{},w)})})}return t.type===l.columnDoneResizing?i({},e,{gridLayout:i({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function tn(e){var t,n=null==(t=document.getElementById("header-cell-"+e))?void 0:t.offsetWidth;if(void 0!==n)return n}e._UNSTABLE_usePivotColumns=rt,e.actions=l,e.defaultColumn=d,e.defaultGroupByFn=qe,e.defaultOrderByFn=Ze,e.defaultRenderer=c,e.emptyRenderer=u,e.ensurePluginOrder=g,e.flexRender=S,e.functionalUpdate=v,e.loopHooks=m,e.makePropGetter=p,e.makeRenderer=w,e.reduceHooks=f,e.safeUseLayoutEffect=b,e.useAbsoluteLayout=Bt,e.useAsyncDebounce=function(e,n){void 0===n&&(n=0);var i=t.useRef({}),s=y(e),a=y(n);return t.useCallback(function(){var e=o(r.mark((function e(){var t,n,l,c=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=c.length,n=new Array(t),l=0;l<t;l++)n[l]=c[l];return i.current.promise||(i.current.promise=new Promise((function(e,t){i.current.resolve=e,i.current.reject=t}))),i.current.timeout&&clearTimeout(i.current.timeout),i.current.timeout=setTimeout(o(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete i.current.timeout,e.prev=1,e.t0=i.current,e.next=5,s().apply(void 0,n);case 5:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=12;break;case 9:e.prev=9,e.t2=e.catch(1),i.current.reject(e.t2);case 12:return e.prev=12,delete i.current.promise,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])}))),a()),e.abrupt("return",i.current.promise);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),[s,a])},e.useBlockLayout=qt,e.useColumnOrder=Tt,e.useExpanded=ce,e.useFilters=ke,e.useFlexLayout=zt,e.useGetLatest=y,e.useGlobalFilter=Te,e.useGridLayout=Jt,e.useGroupBy=De,e.useMountedLayoutEffect=x,e.usePagination=et,e.useResizeColumns=At,e.useRowSelect=gt,e.useRowState=_t,e.useSortBy=Qe,e.useTable=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e=se(e),r=[Y].concat(r);var s=y(t.useRef({}).current);Object.assign(s(),i({},e,{plugins:r,hooks:W()})),r.filter(Boolean).forEach((function(e){e(s().hooks)}));var a=y(s().hooks);s().getHooks=a,delete s().hooks,Object.assign(s(),f(a().useOptions,se(e)));var c=s(),u=c.data,d=c.columns,h=c.initialState,g=c.defaultColumn,v=c.getSubRows,b=c.getRowId,x=c.stateReducer,S=c.useControlledState,E=y(x),T=t.useCallback((function(e,t){if(!t.type)throw console.info({action:t}),new Error("Unknown Action \ud83d\udc46");return[].concat(a().stateReducers,Array.isArray(E())?E():[E()]).reduce((function(n,r){return r(n,t,e,s())||n}),e)}),[a,E,s]),O=t.useReducer(T,void 0,(function(){return T(h,{type:l.init})})),I=O[0],R=O[1],A=f([].concat(a().useControlledState,[S]),I,{instance:s()});Object.assign(s(),{state:A,dispatch:R});var M=t.useMemo((function(){return C(f(a().columns,d,{instance:s()}))}),[a,s,d].concat(f(a().columnsDeps,[],{instance:s()})));s().columns=M;var P=t.useMemo((function(){return f(a().allColumns,j(M),{instance:s()}).map(_)}),[M,a,s].concat(f(a().allColumnsDeps,[],{instance:s()})));s().allColumns=P;var D=t.useMemo((function(){for(var e=[],t=[],n={},r=[].concat(P);r.length;){var o=r.shift();le({data:u,rows:e,flatRows:t,rowsById:n,column:o,getRowId:b,getSubRows:v,accessValueHooks:a().accessValue,getInstance:s})}return[e,t,n]}),[P,u,b,v,a,s]),F=D[0],L=D[1],B=D[2];Object.assign(s(),{rows:F,initialRows:[].concat(F),flatRows:L,rowsById:B}),m(a().useInstanceAfterData,s());var U=t.useMemo((function(){return f(a().visibleColumns,P,{instance:s()}).map((function(e){return k(e,g)}))}),[a,P,s,g].concat(f(a().visibleColumnsDeps,[],{instance:s()})));P=t.useMemo((function(){var e=[].concat(U);return P.forEach((function(t){e.find((function(e){return e.id===t.id}))||e.push(t)})),e}),[P,U]),s().allColumns=P;var G=t.useMemo((function(){return f(a().headerGroups,N(U,g),s())}),[a,U,g,s].concat(f(a().headerGroupsDeps,[],{instance:s()})));s().headerGroups=G;var $=t.useMemo((function(){return G.length?G[0].headers:[]}),[G]);s().headers=$,s().flatHeaders=G.reduce((function(e,t){return[].concat(e,t.headers)}),[]),m(a().useInstanceBeforeDimensions,s());var q=U.filter((function(e){return e.isVisible})).map((function(e){return e.id})).sort().join("_");U=t.useMemo((function(){return U.filter((function(e){return e.isVisible}))}),[U,q]),s().visibleColumns=U;var z=ae($),V=z[0],H=z[1],Q=z[2];return s().totalColumnsMinWidth=V,s().totalColumnsWidth=H,s().totalColumnsMaxWidth=Q,m(a().useInstance,s()),[].concat(s().flatHeaders,s().allColumns).forEach((function(e){e.render=w(s(),e),e.getHeaderProps=p(a().getHeaderProps,{instance:s(),column:e}),e.getFooterProps=p(a().getFooterProps,{instance:s(),column:e})})),s().headerGroups=t.useMemo((function(){return G.filter((function(e,t){return e.headers=e.headers.filter((function(e){return e.headers?function e(t){return t.filter((function(t){return t.headers?e(t.headers):t.isVisible})).length}(e.headers):e.isVisible})),!!e.headers.length&&(e.getHeaderGroupProps=p(a().getHeaderGroupProps,{instance:s(),headerGroup:e,index:t}),e.getFooterGroupProps=p(a().getFooterGroupProps,{instance:s(),headerGroup:e,index:t}),!0)}))}),[G,s,a]),s().footerGroups=[].concat(s().headerGroups).reverse(),s().prepareRow=t.useCallback((function(e){e.getRowProps=p(a().getRowProps,{instance:s(),row:e}),e.allCells=P.map((function(t){var n=e.values[t.id],r={column:t,row:e,value:n};return r.getCellProps=p(a().getCellProps,{instance:s(),cell:r}),r.render=w(s(),t,{row:e,cell:r,value:n}),r})),e.cells=U.map((function(t){return e.allCells.find((function(e){return e.column.id===t.id}))})),m(a().prepareRow,e,{instance:s()})}),[a,s,P,U]),s().getTableProps=p(a().getTableProps,{instance:s()}),s().getTableBodyProps=p(a().getTableBodyProps,{instance:s()}),m(a().useFinalInstance,s()),s()},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(5043))},1094:(e,t,n)=>{e.exports=n(3310)},9435:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(5173));var r=a(n(9066)),o=a(n(6403)),i=a(n(5043)),s=a(n(7324));n(927);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}var c=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),c(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,i=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),c(e,i),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),c(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),c(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&u(e,r),o&&u(e,o),i&&u(e,i)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,c(e,t))},o.render=function(){var e=l({},this.props);return delete e.classNames,i.default.createElement(s.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(i.default.Component);d.defaultProps={classNames:""},d.propTypes={};var h=d;t.default=h,e.exports=t.default},6324:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;s(n(5173));var r=s(n(5043)),o=n(7950),i=s(n(1665));function s(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t,n;function s(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=s.prototype;return a.handleLifecycle=function(e,t,n){var i,s=this.props.children,a=r.default.Children.toArray(s)[t];a.props[e]&&(i=a.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},a.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),s=r.default.Children.toArray(t),a=s[0],l=s[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},s}(r.default.Component);a.propTypes={};var l=a;t.default=l,e.exports=t.default},7324:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(5173));var r=a(n(5043)),o=a(n(7950)),i=n(5484),s=(n(927),a(n(9738)));function a(e){return e&&e.__esModule?e:{default:e}}var l="unmounted";t.UNMOUNTED=l;var c="exited";t.EXITED=c;var u="entering";t.ENTERING=u;var d="entered";t.ENTERED=d;var h="exiting";t.EXITING=h;var p=function(e){var t,n;function i(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=c,r.appearStatus=u):o=d:o=t.unmountOnExit||t.mountOnEnter?l:c,r.state={status:o},r.nextCallback=null,r}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:c}:null};var a=i.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):n!==u&&n!==d||(t=h)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=o.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:l})},a.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.getTimeouts(),s=o?i.appear:i.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:u},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,s,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:d},(function(){n.props.onEntered(e)}))},a.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:h},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:c},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:c},(function(){t.props.onExited(e)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},a.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"===typeof n)return r.default.createElement(s.default.Provider,{value:null},n(e,o));var i=r.default.Children.only(n);return r.default.createElement(s.default.Provider,{value:null},r.default.cloneElement(i,o))},i}(r.default.Component);function f(){}p.contextType=s.default,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var m=(0,i.polyfill)(p);t.default=m},1665:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;a(n(5173));var r=a(n(5043)),o=n(5484),i=a(n(9738)),s=n(8377);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function o(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(c(c(r)));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=o.prototype;return a.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},a.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,s.getInitialChildMapping)(e,r):(0,s.getNextChildMapping)(e,n,r),firstRender:!1}},a.handleExited=function(e,t){var n=(0,s.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},a.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),s=this.state.contextValue,a=u(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.default.createElement(i.default.Provider,{value:s},a):r.default.createElement(i.default.Provider,{value:s},r.default.createElement(t,o,a))},o}(r.default.Component);d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var h=(0,o.polyfill)(d);t.default=h,e.exports=t.default},9738:(e,t,n)=>{"use strict";var r;t.__esModule=!0,t.default=void 0;var o=((r=n(5043))&&r.__esModule?r:{default:r}).default.createContext(null);t.default=o,e.exports=t.default},7111:(e,t,n)=>{"use strict";var r=a(n(9435)),o=a(n(6324)),i=a(n(1665)),s=a(n(7324));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:s.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},8377:(e,t,n)=>{"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:s(n,"appear",e),enter:s(n,"enter",e),exit:s(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var a=o(e.children),l=i(t,a);return Object.keys(l).forEach((function(o){var i=l[o];if((0,r.isValidElement)(i)){var c=o in t,u=o in a,d=t[o],h=(0,r.isValidElement)(d)&&!d.props.in;!u||c&&!h?u||!c||h?u&&c&&(0,r.isValidElement)(d)&&(l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:d.props.in,exit:s(i,"exit",e),enter:s(i,"enter",e)})):l[o]=(0,r.cloneElement)(i,{in:!1}):l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:s(i,"exit",e),enter:s(i,"enter",e)})}})),l};var r=n(5043);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];a[o[l][r]]=n(c)}a[l]=n(l)}for(r=0;r<i.length;r++)a[i[r]]=n(i[r]);return a}function s(e,t,n){return null!=n[t]?n[t]:e.props[t]}},927:(e,t,n)=>{"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(5173))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},1153:(e,t,n)=>{"use strict";var r=n(5043),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},4202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var x=b.prototype=new y;x.constructor=b,m(x,v.prototype),x.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var o,i={},s=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,o)&&!j.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:s,ref:a,props:i,_owner:C.current}}function k(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var N=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,o,i,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return s=s(l=e),e=""===i?"."+E(l,0):i,w(s)?(o="",null!=e&&(o=e.replace(N,"$&/")+"/"),T(s,t,o,"",(function(e){return e}))):null!=s&&(k(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,o+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(N,"$&/")+"/")+e)),t.push(s)),1;if(l=0,i=""===i?".":i+":",w(e))for(var c=0;c<e.length;c++){var u=i+E(a=e[c],c);l+=T(a,t,o,u,s)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)l+=T(a=a.value,t,o,u=i+E(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function O(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function I(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},A={transition:null},M={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:A,ReactCurrentOwner:C};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=s,t.PureComponent=b,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),i=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=C.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:s,props:o,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=A.transition;A.transition={};try{e()}finally{A.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},5043:(e,t,n)=>{"use strict";e.exports=n(4202)},579:(e,t,n)=>{"use strict";e.exports=n(1153)},9211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=n(840),i=(r=o)&&r.__esModule?r:{default:r},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var a={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},l=t.autoprefix=function(e){var t={};return(0,i.default)(e,(function(e,n){var r={};(0,i.default)(e,(function(e,t){var n=a[t];n?r=s({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=l},4973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5043),s=(r=i)&&r.__esModule?r:{default:r};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return i=l=a(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return s.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},s.default.createElement(e,o({},l.props,l.state)))},a(l,i)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(s.default.Component)};t.default=l},4157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5043),s=(r=i)&&r.__esModule?r:{default:r};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return i=l=a(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return s.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},s.default.createElement(e,o({},l.props,l.state)))},a(l,i)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(s.default.Component)};t.default=l},218:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=a(n(620)),o=a(n(840)),i=a(n(2322)),s=a(n(3411));function a(e){return e&&e.__esModule?e:{default:e}}var l=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,s.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=l},7514:(e,t,n)=>{"use strict";t.H8=void 0;var r=c(n(218)),o=c(n(9144)),i=c(n(9211)),s=c(n(4157)),a=c(n(4973)),l=c(n(7642));function c(e){return e&&e.__esModule?e:{default:e}}s.default,t.H8=s.default,a.default,l.default;var u=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];var a=(0,r.default)(n),l=(0,o.default)(e,a);return(0,i.default)(l)};t.Ay=u},7642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2===0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},9144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=s(n(840)),o=s(n(6434)),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function s(e){return e&&e.__esModule?e:{default:e}}var a=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])})),t})),n};t.default=a},2940:(e,t,n)=>{"use strict";var r=n(2981),o=n(2521),i=Object;e.exports=r((function(){if(null==this||this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e}),"get flags",!0)},2488:(e,t,n)=>{"use strict";var r=n(1779),o=n(1712),i=n(2940),s=n(201),a=n(855),l=o(s());r(l,{getPolyfill:s,implementation:i,shim:a}),e.exports=l},201:(e,t,n)=>{"use strict";var r=n(2940),o=n(1779).supportsDescriptors,i=Object.getOwnPropertyDescriptor;e.exports=function(){if(o&&"gim"===/a/gim.flags){var e=i(RegExp.prototype,"flags");if(e&&"function"===typeof e.get&&"boolean"===typeof RegExp.prototype.dotAll&&"boolean"===typeof RegExp.prototype.hasIndices){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),"dy"===t)return e.get}}return r}},855:(e,t,n)=>{"use strict";var r=n(1779).supportsDescriptors,o=n(201),i=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!r||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=o(),t=l(c),n=i(t,"flags");return n&&n.get===e||s(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},48:(e,t,n)=>{"use strict";e.exports=n(5043)},6699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AjaxError:()=>S,AjaxResponse:()=>w,AjaxTimeoutError:()=>j,ajax:()=>_});var r=n(4243),o="undefined"!==typeof window&&window,i="undefined"!==typeof self&&"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,s="undefined"!==typeof n.g&&n.g,a=o||s||i,l=n(2566),c=n(2501),u=n(2012),d=n(529);function h(e,t){return void 0===t&&(t=null),new b({method:"GET",url:e,headers:t})}function p(e,t,n){return new b({method:"POST",url:e,body:t,headers:n})}function f(e,t){return new b({method:"DELETE",url:e,headers:t})}function m(e,t,n){return new b({method:"PUT",url:e,body:t,headers:n})}function g(e,t,n){return new b({method:"PATCH",url:e,body:t,headers:n})}var v=(0,n(499).T)((function(e,t){return e.response}));function y(e,t){return v(new b({method:"GET",url:e,responseType:"json",headers:t}))}var b=function(e){function t(t){var n=e.call(this)||this,r={async:!0,createXHR:function(){return this.crossDomain?function(){if(a.XMLHttpRequest)return new a.XMLHttpRequest;if(a.XDomainRequest)return new a.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(a.XMLHttpRequest)return new a.XMLHttpRequest;var e=void 0;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=0;n<3;n++)try{if(e=t[n],new a.ActiveXObject(e))break}catch(r){}return new a.ActiveXObject(e)}catch(r){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"===typeof t)r.url=t;else for(var o in t)t.hasOwnProperty(o)&&(r[o]=t[o]);return n.request=r,n}return r.C6(t,e),t.prototype._subscribe=function(e){return new x(e,this.request)},t.create=function(){var e=function(e){return new t(e)};return e.get=h,e.post=p,e.delete=f,e.put=m,e.patch=g,e.getJSON=y,e}(),t}(u.c),x=function(e){function t(t,n){var r=e.call(this,t)||this;r.request=n,r.done=!1;var o=n.headers=n.headers||{};return n.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),"Content-Type"in o||a.FormData&&n.body instanceof a.FormData||"undefined"===typeof n.body||(o["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),n.body=r.serializeBody(n.body,n.headers["Content-Type"]),r.send(),r}return r.C6(t,e),t.prototype.next=function(e){this.done=!0;var t=this,n=t.xhr,r=t.request,o=t.destination,i=new w(e,n,r);o.next(i)},t.prototype.send=function(){var e=this.request,t=this.request,n=t.user,r=t.method,o=t.url,i=t.async,s=t.password,a=t.headers,u=t.body,d=e.createXHR,h=(0,l.T)(d).call(e);if(h===c.M)this.error(c.M.e);else{this.xhr=h,this.setupEvents(h,e);if((n?(0,l.T)(h.open).call(h,r,o,i,n,s):(0,l.T)(h.open).call(h,r,o,i))===c.M)return this.error(c.M.e),null;if(i&&(h.timeout=e.timeout,h.responseType=e.responseType),"withCredentials"in h&&(h.withCredentials=!!e.withCredentials),this.setHeaders(h,a),(u?(0,l.T)(h.send).call(h,u):(0,l.T)(h.send).call(h))===c.M)return this.error(c.M.e),null}return h},t.prototype.serializeBody=function(e,t){if(!e||"string"===typeof e)return e;if(a.FormData&&e instanceof a.FormData)return e;if(t){var n=t.indexOf(";");-1!==n&&(t=t.substring(0,n))}switch(t){case"application/x-www-form-urlencoded":return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");case"application/json":return JSON.stringify(e);default:return e}},t.prototype.setHeaders=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setRequestHeader(n,t[n])},t.prototype.setupEvents=function(e,t){var n=t.progressSubscriber;function r(e){var t=r,n=t.subscriber,o=t.progressSubscriber,i=t.request;o&&o.error(e),n.error(new j(this,i))}if(e.ontimeout=r,r.request=t,r.subscriber=this,r.progressSubscriber=n,e.upload&&"withCredentials"in e){var o,i;if(n)o=function(e){o.progressSubscriber.next(e)},a.XDomainRequest?e.onprogress=o:e.upload.onprogress=o,o.progressSubscriber=n;i=function(e){var t=i,n=t.progressSubscriber,r=t.subscriber,o=t.request;n&&n.error(e),r.error(new S("ajax error",this,o))},e.onerror=i,i.request=t,i.subscriber=this,i.progressSubscriber=n}function s(e){}function l(e){var t=l,n=t.subscriber,r=t.progressSubscriber,o=t.request;if(4===this.readyState){var i=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;0===i&&(i=s?200:0),i<400?(r&&r.complete(),n.next(e),n.complete()):(r&&r.error(e),n.error(new S("ajax error "+i,this,o)))}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=n,s.request=t,e.onload=l,l.subscriber=this,l.progressSubscriber=n,l.request=t},t.prototype.unsubscribe=function(){var t=this.done,n=this.xhr;!t&&n&&4!==n.readyState&&"function"===typeof n.abort&&n.abort(),e.prototype.unsubscribe.call(this)},t}(d.v),w=function(){return function(e,t,n){this.originalEvent=e,this.xhr=t,this.request=n,this.status=t.status,this.responseType=t.responseType||n.responseType,this.response=C(this.responseType,t)}}(),S=function(e){function t(n,r,o){var i=e.call(this,n)||this;return i.name="AjaxError",i.message=n,i.xhr=r,i.request=o,i.status=r.status,i.responseType=r.responseType||o.responseType,i.response=C(i.responseType,r),Object.setPrototypeOf(i,t.prototype),i}return r.C6(t,e),t}(Error);function C(e,t){switch(e){case"json":return"response"in t?t.responseType?t.response:JSON.parse(t.response||t.responseText||"null"):JSON.parse(t.responseText||"null");case"xml":return t.responseXML;default:return"response"in t?t.response:t.responseText}}var j=function(e){function t(n,r){var o=e.call(this,"ajax timeout",n,r)||this;return o.name="AjaxTimeoutError",Object.setPrototypeOf(o,t.prototype),o}return r.C6(t,e),t}(S),_=b.create},2012:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var r=n(529),o=n(5502),i=n(4149);var s=n(3563),a=n(7742),l=n(161),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var s=this.operator,a=function(e,t,n){if(e){if(e instanceof r.v)return e;if(e[o.D])return e[o.D]()}return e||t||n?new r.v(e,t,n):new r.v(i.I)}(e,t,n);if(s?s.call(a,this.source):a.add(this.source||l.$.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.$.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){l.$.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=u(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(n){r(n),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[s.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0,a.m)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=u(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function u(e){if(e||(e=l.$.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},4149:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var r=n(161),o=n(1890),i={closed:!0,next:function(e){},error:function(e){if(r.$.useDeprecatedSynchronousErrorHandling)throw e;(0,o.T)(e)},complete:function(){}}},529:(e,t,n)=>{"use strict";n.d(t,{v:()=>u});var r=n(4243),o=n(9406),i=n(4149),s=n(7353),a=n(5502),l=n(161),c=n(1890),u=function(e){function t(t,n,r){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=i.I;break;case 1:if(!t){o.destination=i.I;break}if("object"===typeof t){if(h(t)){var s=t[a.D]();o.syncErrorThrowable=s.syncErrorThrowable,o.destination=s,s.add(o)}else o.syncErrorThrowable=!0,o.destination=new d(o,t);break}default:o.syncErrorThrowable=!0,o.destination=new d(o,t,n,r)}return o}return r.C6(t,e),t.prototype[a.D]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parent,t=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this},t}(s.y),d=function(e){function t(t,n,r,s){var a,l=e.call(this)||this;l._parentSubscriber=t;var c=l;return(0,o.T)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==i.I&&(c=Object.create(n),(0,o.T)(c.unsubscribe)&&l.add(c.unsubscribe.bind(c)),c.unsubscribe=l.unsubscribe.bind(l))),l._context=c,l._next=a,l._error=r,l._complete=s,l}return r.C6(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.$.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=l.$.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,c.T)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,c.T)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};l.$.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),l.$.useDeprecatedSynchronousErrorHandling)throw n;(0,c.T)(n)}},t.prototype.__tryOrSetError=function(e,t,n){if(!l.$.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return l.$.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):((0,c.T)(r),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(u);function h(e){return e instanceof u||"syncErrorThrowable"in e&&e[a.D]}},7353:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(8621),o=n(7737),i=n(9406),s=n(2566),a=n(2501),l=n(4243),c=function(e){function t(n){var r=e.call(this,n?n.length+" errors occurred during unsubscription:\n  "+n.map((function(e,t){return t+1+") "+e.toString()})).join("\n  "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,t.prototype),r}return l.C6(t,e),t}(Error),u=function(){function e(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){var n=this,l=n._parent,u=n._parents,h=n._unsubscribe,p=n._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var f=-1,m=u?u.length:0;l;)l.remove(this),l=++f<m&&u[f]||null;if((0,i.T)(h))(0,s.T)(h).call(this)===a.M&&(t=!0,e=e||(a.M.e instanceof c?d(a.M.e.errors):[a.M.e]));if((0,r.c)(p))for(f=-1,m=p.length;++f<m;){var g=p[f];if((0,o.G)(g))if((0,s.T)(g.unsubscribe).call(g)===a.M){t=!0,e=e||[];var v=a.M.e;v instanceof c?e=e.concat(d(v.errors)):e.push(v)}}if(t)throw new c(e)}},e.prototype.add=function(t){if(!t||t===e.EMPTY)return e.EMPTY;if(t===this)return this;var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n.closed||"function"!==typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!==typeof n._addParent){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.prototype._addParent=function(e){var t=this._parent,n=this._parents;t&&t!==e?n?-1===n.indexOf(e)&&n.push(e):this._parents=[e]:this._parent=e},e.EMPTY=((t=new e).closed=!0,t),e}();function d(e){return e.reduce((function(e,t){return e.concat(t instanceof c?t.errors:t)}),[])}},161:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},499:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var r=n(4243),o=n(529);function i(e,t){return function(n){if("function"!==typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}}var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return r.C6(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(o.v)},3563:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var r="function"===typeof Symbol&&Symbol.observable||"@@observable"},5502:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var r="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber"},2501:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var r={e:{}}},1890:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}))}n.d(t,{T:()=>r})},8621:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var r=Array.isArray||function(e){return e&&"number"===typeof e.length}},9406:(e,t,n)=>{"use strict";function r(e){return"function"===typeof e}n.d(t,{T:()=>r})},7737:(e,t,n)=>{"use strict";function r(e){return null!=e&&"object"===typeof e}n.d(t,{G:()=>r})},4010:(e,t,n)=>{"use strict";function r(){}n.d(t,{l:()=>r})},7742:(e,t,n)=>{"use strict";n.d(t,{F:()=>o,m:()=>i});var r=n(4010);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)}function i(e){return e?1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}:r.l}},2566:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var r,o=n(2501);function i(){try{return r.apply(this,arguments)}catch(e){return o.M.e=e,o.M}}function s(e){return r=e,i}},5079:(e,t,n)=>{"use strict";n.r(t),n.d(t,{audit:()=>C,auditTime:()=>D,buffer:()=>F,bufferCount:()=>U,bufferTime:()=>z,bufferToggle:()=>K,bufferWhen:()=>ee,catchError:()=>re,combineAll:()=>ce,combineLatest:()=>he,concat:()=>_e,concatAll:()=>Ce,concatMap:()=>ke,concatMapTo:()=>Ne,count:()=>Ee,debounce:()=>Ie,debounceTime:()=>Me,defaultIfEmpty:()=>Le,delay:()=>Ve,delayWhen:()=>Qe,dematerialize:()=>et,distinct:()=>rt,distinctUntilChanged:()=>st,distinctUntilKeyChanged:()=>ct,elementAt:()=>_t,endWith:()=>kt,every:()=>Nt,exhaust:()=>Ot,exhaustMap:()=>At,expand:()=>Dt,filter:()=>dt,finalize:()=>Bt,find:()=>$t,findIndex:()=>Vt,first:()=>Ht,flatMap:()=>ye,groupBy:()=>Zt,ignoreElements:()=>sn,isEmpty:()=>cn,last:()=>mn,map:()=>ve.T,mapTo:()=>gn,materialize:()=>bn,max:()=>Nn,merge:()=>Tn,mergeAll:()=>Se,mergeMap:()=>ye,mergeMapTo:()=>On,mergeScan:()=>In,min:()=>Mn,multicast:()=>Gn,observeOn:()=>qn,onErrorResumeNext:()=>Wn,pairwise:()=>Jn,partition:()=>er,pluck:()=>tr,publish:()=>nr,publishBehavior:()=>or,publishLast:()=>sr,publishReplay:()=>dr,race:()=>mr,reduce:()=>kn,refCount:()=>Pn,repeat:()=>gr,repeatWhen:()=>br,retry:()=>Sr,retryWhen:()=>_r,sample:()=>Er,sampleTime:()=>Ir,scan:()=>Sn,sequenceEqual:()=>Pr,share:()=>Ur,shareReplay:()=>Gr,single:()=>$r,skip:()=>Vr,skipLast:()=>Yr,skipUntil:()=>Kr,skipWhile:()=>eo,startWith:()=>ro,subscribeOn:()=>po,switchAll:()=>yo,switchMap:()=>mo,switchMapTo:()=>bo,take:()=>St,takeLast:()=>hn,takeUntil:()=>xo,takeWhile:()=>Co,tap:()=>gt,throttle:()=>No,throttleTime:()=>Oo,throwIfEmpty:()=>xt,timeInterval:()=>Mo,timeout:()=>Uo,timeoutWith:()=>Fo,timestamp:()=>Go,toArray:()=>zo,window:()=>Vo,windowCount:()=>Yo,windowTime:()=>Ko,windowToggle:()=>oi,windowWhen:()=>ai,withLatestFrom:()=>ui,zip:()=>bi,zipAll:()=>xi});var r=n(4243),o=n(2566),i=n(2501),s=n(529),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(s.v),l=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o.index=0,o}return r.C6(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(s.v),c=n(2012),u=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.closed||t.complete()}},d=n(1890),h=function(e){return function(t){return e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,d.T),t}};function p(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var f=p(),m=function(e){return function(t){for(var n=e[f]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"===typeof n.return&&t.add((function(){n.return&&n.return()})),t}},g=n(3563),v=function(e){return function(t){var n=e[g.s]();if("function"!==typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}},y=function(e){return e&&"number"===typeof e.length&&"function"!==typeof e};function b(e){return e&&"function"!==typeof e.subscribe&&"function"===typeof e.then}var x=n(7737),w=function(e){if(e instanceof c.c)return function(t){return e._isScalar?(t.next(e.value),void t.complete()):e.subscribe(t)};if(e&&"function"===typeof e[g.s])return v(e);if(y(e))return u(e);if(b(e))return h(e);if(e&&"function"===typeof e[f])return m(e);var t=(0,x.G)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function S(e,t,n,r){var o=new l(e,n,r);return w(t)(o)}function C(e){return function(t){return t.lift(new j(e))}}var j=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new _(e,this.durationSelector))},e}(),_=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.C6(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=(0,o.T)(this.durationSelector)(e);if(t===i.M)this.destination.error(i.M.e);else{var n=S(this,t);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},t.prototype.clearThrottle=function(){var e=this,t=e.value,n=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=null,r.unsubscribe()),n&&(this.value=null,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(e,t,n,r){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(a),k=n(7353),N=function(e){function t(t,n){return e.call(this)||this}return r.C6(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(k.y),E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.C6(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(o){n=!0,r=!!o&&o||new Error(o)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(N),T=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}(),O=function(e){function t(n,r){void 0===r&&(r=T.now);var o=e.call(this,n,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.C6(t,e),t.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(T),I=new O(E),R=n(8621);function A(e){return!(0,R.c)(e)&&e-parseFloat(e)+1>=0}function M(e){return e&&"function"===typeof e.schedule}function P(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}function D(e,t){return void 0===t&&(t=I),C((function(){return function(e,t,n){void 0===e&&(e=0);var r=-1;return A(t)?r=Number(t)<1?1:Number(t):M(t)&&(n=t),M(n)||(n=I),new c.c((function(t){var o=A(e)?e:+e-n.now();return n.schedule(P,o,{index:0,period:r,subscriber:t})}))}(e,t)}))}function F(e){return function(t){return t.lift(new L(e))}}var L=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new B(e,this.closingNotifier))},e}(),B=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(S(r,n)),r}return r.C6(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(e,t,n,r,o){var i=this.buffer;this.buffer=[],this.destination.next(i)},t}(a);function U(e,t){return void 0===t&&(t=null),function(n){return n.lift(new G(e,t))}}var G=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?q:$}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),$=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return r.C6(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(s.v),q=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return r.C6(t,e),t.prototype._next=function(e){var t=this,n=t.bufferSize,r=t.startBufferEvery,o=t.buffers,i=t.count;this.count++,i%r===0&&o.push([]);for(var s=o.length;s--;){var a=o[s];a.push(e),a.length===n&&(o.splice(s,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(s.v);function z(e){var t=arguments.length,n=I;M(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return t>=3&&(o=arguments[2]),function(t){return t.lift(new V(e,r,o,n))}}var V=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new W(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),H=function(){return function(){this.buffer=[]}}(),W=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var l={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=i.schedule(Y,n,l))}else{var c={subscriber:s,context:a},u={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(a.closeAction=i.schedule(J,n,c)),s.add(i.schedule(Q,r,u))}return s}return r.C6(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(e),s.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(Y,n,r))}},t.prototype.openContext=function(){var e=new H;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(s.v);function Y(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function Q(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,o=e.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(J,n,{subscriber:r,context:i})),this.schedule(e,t))}function J(e){var t=e.subscriber,n=e.context;t.closeContext(n)}function K(e,t){return function(n){return n.lift(new X(e,t))}}var X=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Z(e,this.openings,this.closingSelector))},e}(),Z=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(S(o,n)),o}return r.C6(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,n,r,o){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(n){this._error(n)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new k.y,r={buffer:[],subscription:n};t.push(r);var o=S(this,e,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},t}(a);function ee(e){return function(t){return t.lift(new te(e))}}var te=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new ne(e,this.closingSelector))},e}(),ne=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.C6(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},t.prototype.notifyNext=function(e,t,n,r,o){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t=this.buffer;this.buffer&&this.destination.next(t),this.buffer=[];var n=(0,o.T)(this.closingSelector)();n===i.M?this.error(i.M.e):(e=new k.y,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(S(this,n)),this.subscribing=!1)},t}(a);function re(e){return function(t){var n=new oe(e),r=t.lift(n);return n.caught=r}}var oe=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new ie(e,this.selector,this.caught))},e}(),ie=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.selector=n,o.caught=r,o}return r.C6(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(r){return void e.prototype.error.call(this,r)}this._unsubscribeAndRecycle(),this.add(S(this,n))}},t}(a),se={};var ae=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new le(e,this.resultSelector))},e}(),le=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.C6(t,e),t.prototype._next=function(e){this.values.push(se),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(S(this,r,r,n))}}},t.prototype.notifyComplete=function(e){0===(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,o){var i=this.values,s=i[n],a=this.toRespond?s===se?--this.toRespond:this.toRespond:0;i[n]=t,0===a&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(a);function ce(e){return function(t){return t.lift(new ae(e))}}function ue(e,t){return t?new c.c((function(n){var r=new k.y,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r})):new c.c(u(e))}function de(e,t){if(!t)return e instanceof c.c?e:new c.c(w(e));if(null!=e){if(function(e){return e&&"function"===typeof e[g.s]}(e))return function(e,t){return t?new c.c((function(n){var r=new k.y;return r.add(t.schedule((function(){var o=e[g.s]();r.add(o.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r})):new c.c(v(e))}(e,t);if(b(e))return function(e,t){return t?new c.c((function(n){var r=new k.y;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r})):new c.c(h(e))}(e,t);if(y(e))return ue(e,t);if(function(e){return e&&"function"===typeof e[f]}(e)||"string"===typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return t?new c.c((function(n){var r,o=new k.y;return o.add((function(){r&&"function"===typeof r.return&&r.return()})),o.add(t.schedule((function(){r=e[f](),o.add(t.schedule((function(){if(!n.closed){var e,t;try{var o=r.next();e=o.value,t=o.done}catch(i){return void n.error(i)}t?n.complete():(n.next(e),this.schedule())}})))}))),o})):new c.c(m(e))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function he(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"===typeof e[e.length-1]&&(n=e.pop()),1===e.length&&(0,R.c)(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(de([t].concat(e)),new ae(n))}}var pe=new c.c((function(e){return e.complete()}));function fe(e){return e?function(e){return new c.c((function(t){return e.schedule((function(){return t.complete()}))}))}(e):pe}function me(e){var t=new c.c((function(t){t.next(e),t.complete()}));return t._isScalar=!0,t.value=e,t}function ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];switch(M(n)?e.pop():n=void 0,e.length){case 0:return fe(n);case 1:return n?ue(e,n):me(e[0]);default:return ue(e,n)}}var ve=n(499);function ye(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof t?function(r){return r.pipe(ye((function(n,r){return de(e(n,r)).pipe((0,ve.T)((function(e,o){return t(n,e,r,o)})))}),n))}:("number"===typeof t&&(n=t),function(t){return t.lift(new be(e,n))})}var be=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new xe(e,this.project,this.concurrent))},e}(),xe=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.C6(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){this.add(S(this,e,t,n))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(a);function we(e){return e}function Se(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),ye(we,e)}function Ce(){return Se(1)}function je(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length||2===e.length&&M(e[1])?de(e[0]):Ce()(ge.apply(void 0,e))}function _e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(je.apply(void 0,[t].concat(e)))}}function ke(e,t){return ye(e,t,1)}function Ne(e,t){return ke((function(){return e}),t)}function Ee(e){return function(t){return t.lift(new Te(e,t))}}var Te=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.predicate,this.source))},e}(),Oe=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return r.C6(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(s.v);function Ie(e){return function(t){return t.lift(new Re(e))}}var Re=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Ae(e,this.durationSelector))},e}(),Ae=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}return r.C6(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=S(this,t))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(e,t,n,r,o){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(a);function Me(e,t){return void 0===t&&(t=I),function(n){return n.lift(new Pe(e,t))}}var Pe=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new De(e,this.dueTime,this.scheduler))},e}(),De=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return r.C6(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Fe,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(s.v);function Fe(e){e.debouncedNext()}function Le(e){return void 0===e&&(e=null),function(t){return t.lift(new Be(e))}}var Be=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new Ue(e,this.defaultValue))},e}(),Ue=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.C6(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(s.v);function Ge(e){return e instanceof Date&&!isNaN(+e)}function $e(e,t){return t?new c.c((function(n){return t.schedule(qe,0,{error:e,subscriber:n})})):new c.c((function(t){return t.error(e)}))}function qe(e){var t=e.error;e.subscriber.error(t)}var ze=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"===typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return ge(this.value);case"E":return $e(this.error);case"C":return fe()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return"undefined"!==typeof t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();function Ve(e,t){void 0===t&&(t=I);var n=Ge(e)?+e-t.now():Math.abs(e);return function(e){return e.lift(new He(n,t))}}var He=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new We(e,this.delay,this.scheduler))},e}(),We=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return r.C6(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,o=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new Ye(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(ze.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e)},t.prototype._complete=function(){this.scheduleNotification(ze.createComplete())},t}(s.v),Ye=function(){return function(e,t){this.time=e,this.notification=t}}();function Qe(e,t){return t?function(n){return new Xe(n,t).lift(new Je(e))}:function(t){return t.lift(new Je(e))}}var Je=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Ke(e,this.delayDurationSelector))},e}(),Ke=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){try{var t=this.delayDurationSelector(e);t&&this.tryDelay(t,e)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=S(this,e,t);n&&!n.closed&&(this.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(a),Xe=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return r.C6(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new Ze(e,this.source))},t}(c.c),Ze=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return r.C6(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(s.v);function et(){return function(e){return e.lift(new tt)}}var tt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new nt(e))},e}(),nt=function(e){function t(t){return e.call(this,t)||this}return r.C6(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(s.v);function rt(e,t){return function(n){return n.lift(new ot(e,t))}}var ot=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new it(e,this.keySelector,this.flushes))},e}(),it=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(S(o,r)),o}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.values.clear()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(r){return void n.error(r)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(a);function st(e,t){return function(n){return n.lift(new at(e,t))}}var at=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new lt(e,this.compare,this.keySelector))},e}(),lt=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=r,o.hasKey=!1,"function"===typeof n&&(o.compare=n),o}return r.C6(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t=e;if(this.keySelector&&(t=(0,o.T)(this.keySelector)(e))===i.M)return this.destination.error(i.M.e);var n=!1;if(this.hasKey){if((n=(0,o.T)(this.compare)(this.key,t))===i.M)return this.destination.error(i.M.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=t,this.destination.next(e))},t}(s.v);function ct(e,t){return st((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}var ut=function(e){function t(){var n=e.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,t.prototype),n}return r.C6(t,e),t}(Error);function dt(e,t){return function(n){return n.lift(new ht(e,t))}}var ht=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new pt(e,this.predicate,this.thisArg))},e}(),pt=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return r.C6(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)},t}(s.v),ft=n(4010),mt=n(9406);function gt(e,t,n){return function(r){return r.lift(new vt(e,t,n))}}var vt=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new yt(e,this.nextOrObserver,this.error,this.complete))},e}(),yt=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=ft.l,i._tapError=ft.l,i._tapComplete=ft.l,i._tapError=r||ft.l,i._tapComplete=o||ft.l,(0,mt.T)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||ft.l,i._tapError=n.error||ft.l,i._tapComplete=n.complete||ft.l),i}return r.C6(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(s.v),bt=function(e){function t(){var n=e.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,t.prototype),n}return r.C6(t,e),t}(Error),xt=function(e){return void 0===e&&(e=wt),gt({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw e()}})};function wt(){return new bt}function St(e){return function(t){return 0===e?fe():t.lift(new Ct(e))}}var Ct=function(){function e(e){if(this.total=e,this.total<0)throw new ut}return e.prototype.call=function(e,t){return t.subscribe(new jt(e,this.total))},e}(),jt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.C6(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(s.v);function _t(e,t){if(e<0)throw new ut;var n=arguments.length>=2;return function(r){return r.pipe(dt((function(t,n){return n===e})),St(1),n?Le(t):xt((function(){return new ut})))}}function kt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=e[e.length-1];M(n)?e.pop():n=null;var r=e.length;return je(t,1!==r||n?r>0?ue(e,n):fe(n):me(e[0]))}}function Nt(e,t){return function(n){return n.lift(new Et(e,t,n))}}var Et=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new Tt(e,this.predicate,this.thisArg,this.source))},e}(),Tt=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return r.C6(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(s.v);function Ot(){return function(e){return e.lift(new It)}}var It=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Rt(e))},e}(),Rt=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.C6(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(S(this,e)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(e){this.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(a);function At(e,t){return t?function(n){return n.pipe(At((function(n,r){return de(e(n,r)).pipe((0,ve.T)((function(e,o){return t(n,e,r,o)})))})))}:function(t){return t.lift(new Mt(e))}}var Mt=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new Pt(e,this.project))},e}(),Pt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.C6(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t=this.index++,n=this.destination;try{var r=this.project(e,t);this.hasSubscription=!0,this.add(S(this,r,e,t))}catch(o){n.error(o)}},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(a);function Dt(e,t,n){return void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(r){return r.lift(new Ft(e,t,n))}}var Ft=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new Lt(e,this.project,this.concurrent,this.scheduler))},e}(),Lt=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return r.C6(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,o=e.index;t.subscribeToProjection(n,r,o)},t.prototype._next=function(e){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(e);var s=(0,o.T)(this.project)(e,r);if(s===i.M)n.error(i.M.e);else if(this.scheduler){var a={subscriber:this,result:s,value:e,index:r};this.add(this.scheduler.schedule(t.dispatch,0,a))}else this.subscribeToProjection(s,e,r)}else this.buffer.push(e)}},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.add(S(this,e,t,n))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,o){this._next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(a);function Bt(e){return function(t){return t.lift(new Ut(e))}}var Ut=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new Gt(e,this.callback))},e}(),Gt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new k.y(n)),r}return r.C6(t,e),t}(s.v);function $t(e,t){if("function"!==typeof e)throw new TypeError("predicate is not a function");return function(n){return n.lift(new qt(e,n,!1,t))}}var qt=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new zt(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}(),zt=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return r.C6(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(o){this.destination.error(o)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(s.v);function Vt(e,t){return function(n){return n.lift(new qt(e,n,!0,t))}}function Ht(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?dt((function(t,n){return e(t,n,r)})):we,St(1),n?Le(t):xt((function(){return new bt})))}}var Wt=function(e){function t(){var n=e.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,t.prototype),n}return r.C6(t,e),t}(Error),Yt=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.C6(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(k.y),Qt=n(5502),Jt=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.C6(t,e),t}(s.v),Kt=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.C6(t,e),t.prototype[Qt.D]=function(){return new Jt(this)},t.prototype.lift=function(e){var t=new Xt(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new Wt;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new Wt;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new Wt;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new Wt;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new Wt;return this.hasError?(e.error(this.thrownError),k.y.EMPTY):this.isStopped?(e.complete(),k.y.EMPTY):(this.observers.push(e),new Yt(this,e))},t.prototype.asObservable=function(){var e=new c.c;return e.source=this,e},t.create=function(e,t){return new Xt(e,t)},t}(c.c),Xt=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.C6(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):k.y.EMPTY},t}(Kt);function Zt(e,t,n,r){return function(o){return o.lift(new en(e,t,n,r))}}var en=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new tn(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),tn=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.C6(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(n){return void this.error(n)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(a){this.error(a)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new Kt,n.set(t,o);var i=new rn(t,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new rn(t,o))}catch(a){return void this.error(a)}this.add(s.subscribe(new nn(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach((function(t,n){t.error(e)})),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach((function(e,t){e.complete()})),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(s.v),nn=function(e){function t(t,n,r){var o=e.call(this,n)||this;return o.key=t,o.group=n,o.parent=r,o}return r.C6(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(s.v),rn=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=r,o}return r.C6(t,e),t.prototype._subscribe=function(e){var t=new k.y,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new on(n)),t.add(r.subscribe(e)),t},t}(c.c),on=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.C6(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(k.y);function sn(){return function(e){return e.lift(new an)}}var an=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new ln(e))},e}(),ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.C6(t,e),t.prototype._next=function(e){},t}(s.v);function cn(){return function(e){return e.lift(new un)}}var un=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new dn(e))},e}(),dn=function(e){function t(t){return e.call(this,t)||this}return r.C6(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(s.v);function hn(e){return function(t){return 0===e?fe():t.lift(new pn(e))}}var pn=function(){function e(e){if(this.total=e,this.total<0)throw new ut}return e.prototype.call=function(e,t){return t.subscribe(new fn(e,this.total))},e}(),fn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.C6(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=t++%n;e.next(r[i])}e.complete()},t}(s.v);function mn(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?dt((function(t,n){return e(t,n,r)})):we,hn(1),n?Le(t):xt((function(){return new bt})))}}function gn(e){return function(t){return t.lift(new vn(e))}}var vn=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new yn(e,this.value))},e}(),yn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return r.C6(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(s.v);function bn(){return function(e){return e.lift(new xn)}}var xn=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new wn(e))},e}(),wn=function(e){function t(t){return e.call(this,t)||this}return r.C6(t,e),t.prototype._next=function(e){this.destination.next(ze.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(ze.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(ze.createComplete()),e.complete()},t}(s.v);function Sn(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Cn(e,t,n))}}var Cn=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new jn(e,this.accumulator,this.seed,this.hasSeed))},e}(),jn=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return r.C6(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)},t}(s.v),_n=n(7742);function kn(e,t){return arguments.length>=2?function(n){return(0,_n.F)(Sn(e,t),hn(1),Le(t))(n)}:function(t){return(0,_n.F)(Sn((function(t,n,r){return e(t,n,r+1)})),hn(1))(t)}}function Nn(e){return kn("function"===typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}function En(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,r=null,o=e[e.length-1];return M(o)?(r=e.pop(),e.length>1&&"number"===typeof e[e.length-1]&&(n=e.pop())):"number"===typeof o&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof c.c?e[0]:Se(n)(ue(e,r))}function Tn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(En.apply(void 0,[t].concat(e)))}}function On(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof t?ye((function(){return e}),t,n):("number"===typeof t&&(n=t),ye((function(){return e}),n))}function In(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Rn(e,t,n))}}var Rn=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new An(e,this.accumulator,this.seed,this.concurrent))},e}(),An=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.C6(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=(0,o.T)(this.accumulator)(this.acc,e),r=this.destination;n===i.M?r.error(i.M.e):(this.active++,this._innerSub(n,e,t))}else this.buffer.push(e)},t.prototype._innerSub=function(e,t,n){this.add(S(this,e,t,n))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t.prototype.notifyNext=function(e,t,n,r,o){var i=this.destination;this.acc=t,this.hasValue=!0,i.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(a);function Mn(e){return kn("function"===typeof e?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}function Pn(){return function(e){return e.lift(new Dn(e))}}var Dn=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new Fn(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),Fn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.C6(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(s.v),Ln=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.C6(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new k.y).add(this.source.subscribe(new Un(this.getSubject(),this))),e.closed?(this._connection=null,e=k.y.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return Pn()(this)},t}(c.c).prototype,Bn={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:Ln._subscribe},_isComplete:{value:Ln._isComplete,writable:!0},getSubject:{value:Ln.getSubject},connect:{value:Ln.connect},refCount:{value:Ln.refCount}},Un=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.C6(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(Jt);function Gn(e,t){return function(n){var r;if(r="function"===typeof e?e:function(){return e},"function"===typeof t)return n.lift(new $n(r,t));var o=Object.create(n,Bn);return o.source=n,o.subjectFactory=r,o}}var $n=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(e);return o.add(t.subscribe(r)),o},e}();function qn(e,t){return void 0===t&&(t=0),function(n){return n.lift(new zn(e,t))}}var zn=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new Vn(e,this.scheduler,this.delay))},e}(),Vn=function(e){function t(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return r.C6(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.add(this.scheduler.schedule(t.dispatch,this.delay,new Hn(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(ze.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(ze.createError(e))},t.prototype._complete=function(){this.scheduleMessage(ze.createComplete())},t}(s.v),Hn=function(){return function(e,t){this.notification=e,this.destination=t}}();function Wn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&(0,R.c)(e[0])&&(e=e[0]),function(t){return t.lift(new Yn(e))}}var Yn=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new Qn(e,this.nextSources))},e}(),Qn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return r.C6(t,e),t.prototype.notifyError=function(e,t){this.subscribeToNextSource()},t.prototype.notifyComplete=function(e){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource()},t.prototype._complete=function(){this.subscribeToNextSource()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();e?this.add(S(this,e)):this.destination.complete()},t}(a);function Jn(){return function(e){return e.lift(new Kn)}}var Kn=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Xn(e))},e}(),Xn=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return r.C6(t,e),t.prototype._next=function(e){this.hasPrev?this.destination.next([this.prev,e]):this.hasPrev=!0,this.prev=e},t}(s.v);function Zn(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}function er(e,t){return function(n){return[dt(e,t)(n),dt(Zn(e,t))(n)]}}function tr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(t){return(0,ve.T)(function(e,t){var n=function(n){for(var r=n,o=0;o<t;o++){var i=r[e[o]];if("undefined"===typeof i)return;r=i}return r};return n}(e,n))(t)}}function nr(e){return e?Gn((function(){return new Kt}),e):Gn(new Kt)}var rr=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return r.C6(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Wt;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Kt);function or(e){return function(t){return Gn(new rr(e))(t)}}var ir=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.C6(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),k.y.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),k.y.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(Kt);function sr(){return function(e){return Gn(new ir)(e)}}var ar=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.C6(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(E),lr=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.C6(t,e),t}(O))(ar),cr=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return r.C6(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new ur(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new Wt;if(this.isStopped||this.hasError?t=k.y.EMPTY:(this.observers.push(e),t=new Yt(this,e)),o&&e.add(e=new Vn(e,o)),n)for(var s=0;s<i&&!e.closed;s++)e.next(r[s]);else for(s=0;s<i&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||lr).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(e-r[i].time<n);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&r.splice(0,i),r},t}(Kt),ur=function(){return function(e,t){this.time=e,this.value=t}}();function dr(e,t,n,r){n&&"function"!==typeof n&&(r=n);var o="function"===typeof n?n:void 0,i=new cr(e,t,r);return function(e){return Gn((function(){return i}),o)(e)}}function hr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!(0,R.c)(e[0]))return e[0];e=e[0]}return ue(e,void 0).lift(new pr)}var pr=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new fr(e))},e}(),fr=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.C6(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],o=S(this,r,r,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,n,r,o){if(!this.hasFirst){this.hasFirst=!0;for(var i=0;i<this.subscriptions.length;i++)if(i!==n){var s=this.subscriptions[i];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(t)},t}(a);function mr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&(0,R.c)(e[0])&&(e=e[0]),t.lift.call(hr.apply(void 0,[t].concat(e)))}}function gr(e){return void 0===e&&(e=-1),function(t){return 0===e?fe():e<0?t.lift(new vr(-1,t)):t.lift(new vr(e-1,t))}}var vr=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new yr(e,this.count,this.source))},e}(),yr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return r.C6(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(s.v);function br(e){return function(t){return t.lift(new xr(e))}}var xr=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new wr(e,this.notifier,t))},e}(),wr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(t){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=null),t&&(t.unsubscribe(),this.retriesSubscription=null),this.retries=null},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new Kt;var t=(0,o.T)(this.notifier)(this.notifications);if(t===i.M)return e.prototype.complete.call(this);this.retries=t,this.retriesSubscription=S(this,t)},t}(a);function Sr(e){return void 0===e&&(e=-1),function(t){return t.lift(new Cr(e,t))}}var Cr=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new jr(e,this.count,this.source))},e}(),jr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return r.C6(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(s.v);function _r(e){return function(t){return t.lift(new kr(e,t))}}var kr=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Nr(e,this.notifier,this.source))},e}(),Nr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o}return r.C6(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,s=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{if(n=new Kt,(r=(0,o.T)(this.notifier)(n))===i.M)return e.prototype.error.call(this,i.M.e);s=S(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=s,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=null),t&&(t.unsubscribe(),this.retriesSubscription=null),this.retries=null},t.prototype.notifyNext=function(e,t,n,r,o){var i=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=i,this.source.subscribe(this)},t}(a);function Er(e){return function(t){return t.lift(new Tr(e))}}var Tr=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new Or(e),r=t.subscribe(n);return r.add(S(n,this.notifier)),r},e}(),Or=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return r.C6(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(e,t,n,r,o){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(a);function Ir(e,t){return void 0===t&&(t=I),function(n){return n.lift(new Rr(e,t))}}var Rr=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new Ar(e,this.period,this.scheduler))},e}(),Ar=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(Mr,n,{subscriber:o,period:n})),o}return r.C6(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(s.v);function Mr(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}function Pr(e,t){return function(n){return n.lift(new Dr(e,t))}}var Dr=function(){function e(e,t){this.compareTo=e,this.comparor=t}return e.prototype.call=function(e,t){return t.subscribe(new Fr(e,this.compareTo,this.comparor))},e}(),Fr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.compareTo=n,o.comparor=r,o._a=[],o._b=[],o._oneComplete=!1,o.add(n.subscribe(new Lr(t,o))),o}return r.C6(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t.prototype.checkValues=function(){for(var e=this,t=e._a,n=e._b,r=e.comparor;t.length>0&&n.length>0;){var s=t.shift(),a=n.shift(),l=!1;r?(l=(0,o.T)(r)(s,a))===i.M&&this.destination.error(i.M.e):l=s===a,l||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t}(s.v),Lr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return r.C6(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e)},t.prototype._complete=function(){this.parent._complete()},t}(s.v);function Br(){return new Kt}function Ur(){return function(e){return Pn()(Gn(Br)(e))}}function Gr(e,t,n){return function(r){return r.lift(function(e,t,n){var r,o,i=0,s=!1,a=!1;return function(l){i++,r&&!s||(s=!1,r=new cr(e,t,n),o=l.subscribe({next:function(e){r.next(e)},error:function(e){s=!0,r.error(e)},complete:function(){a=!0,r.complete()}}));var c=r.subscribe(this);return function(){i--,c.unsubscribe(),o&&0===i&&a&&o.unsubscribe()}}}(e,t,n))}}function $r(e){return function(t){return t.lift(new qr(e,t))}}var qr=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new zr(e,this.predicate,this.source))},e}(),zr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return r.C6(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new bt)},t}(s.v);function Vr(e){return function(t){return t.lift(new Hr(e))}}var Hr=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new Wr(e,this.total))},e}(),Wr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.C6(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(s.v);function Yr(e){return function(t){return t.lift(new Qr(e))}}var Qr=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new ut}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new s.v(e)):t.subscribe(new Jr(e,this._skipCount))},e}(),Jr=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.C6(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,o=this._ring,i=o[r];o[r]=e,this.destination.next(i)}},t}(s.v);function Kr(e){return function(t){return t.lift(new Xr(e))}}var Xr=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new Zr(e,this.notifier))},e}(),Zr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.hasValue=!1,r.add(r.innerSubscription=S(r,n)),r}return r.C6(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(e,t,n,r,o){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(a);function eo(e){return function(t){return t.lift(new to(e))}}var to=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new no(e,this.predicate))},e}(),no=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.C6(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(n){this.destination.error(n)}},t}(s.v);function ro(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=e[e.length-1];M(n)?e.pop():n=null;var r=e.length;return je(1!==r||n?r>0?ue(e,n):fe(n):me(e[0]),t)}}var oo=1,io={};var so=function(e){var t=oo++;return io[t]=e,Promise.resolve().then((function(){return function(e){var t=io[e];t&&t()}(t)})),t},ao=function(e){delete io[e]},lo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.C6(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=so(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(ao(n),t.scheduled=void 0)},t}(E),co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.C6(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,o=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<o&&(e=n.shift()));if(this.active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(O),uo=new co(lo),ho=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=uo);var o=e.call(this)||this;return o.source=t,o.delayTime=n,o.scheduler=r,(!A(n)||n<0)&&(o.delayTime=0),r&&"function"===typeof r.schedule||(o.scheduler=uo),o}return r.C6(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=uo),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(c.c);function po(e,t){return void 0===t&&(t=0),function(n){return n.lift(new fo(e,t))}}var fo=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new ho(t,this.delay,this.scheduler).subscribe(e)},e}();function mo(e,t){return"function"===typeof t?function(n){return n.pipe(mo((function(n,r){return de(e(n,r)).pipe((0,ve.T)((function(e,o){return t(n,e,r,o)})))})))}:function(t){return t.lift(new go(e))}}var go=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new vo(e,this.project))},e}(),vo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return r.C6(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=S(this,e,t,n))},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.innerSubscription=null},t.prototype.notifyComplete=function(t){this.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t}(a);function yo(){return mo(we)}function bo(e,t){return t?mo((function(){return e}),t):mo((function(){return e}))}function xo(e){return function(t){return t.lift(new wo(e))}}var wo=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new So(e),r=S(n,this.notifier);return r&&!r.closed?(n.add(r),t.subscribe(n)):n},e}(),So=function(e){function t(t){return e.call(this,t)||this}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.complete()},t.prototype.notifyComplete=function(){},t}(a);function Co(e){return function(t){return t.lift(new jo(e))}}var jo=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new _o(e,this.predicate))},e}(),_o=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.index=0,r}return r.C6(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;Boolean(t)?n.next(e):n.complete()},t}(s.v),ko={leading:!0,trailing:!1};function No(e,t){return void 0===t&&(t=ko),function(n){return n.lift(new Eo(e,t.leading,t.trailing))}}var Eo=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new To(e,this.durationSelector,this.leading,this.trailing))},e}(),To=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return r.C6(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=null},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=S(this,t))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(t){return this.destination.error(t),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=null,t&&this.send()},t.prototype.notifyNext=function(e,t,n,r,o){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(a);function Oo(e,t,n){return void 0===t&&(t=I),void 0===n&&(n=ko),function(r){return r.lift(new Io(e,t,n.leading,n.trailing))}}var Io=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new Ro(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),Ro=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.C6(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Ao,this.duration,{subscriber:this})),this.leading&&this.destination.next(e))},t.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(s.v);function Ao(e){e.subscriber.clearThrottle()}function Mo(e){return void 0===e&&(e=I),function(t){return n=function(){return t.pipe(Sn((function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}}),{current:e.now(),value:void 0,last:void 0}),(0,ve.T)((function(e){var t=e.current,n=e.last,r=e.value;return new Po(r,t-n)})))},new c.c((function(e){var t;try{t=n()}catch(r){return void e.error(r)}return(t?de(t):fe()).subscribe(e)}));var n}}var Po=function(){return function(e,t){this.value=e,this.interval=t}}(),Do=function(e){function t(){var n=e.call(this,"Timeout has occurred")||this;return n.name="TimeoutError",Object.setPrototypeOf(n,t.prototype),n}return r.C6(t,e),t}(Error);function Fo(e,t,n){return void 0===n&&(n=I),function(r){var o=Ge(e),i=o?+e-n.now():Math.abs(e);return r.lift(new Lo(i,o,t,n))}}var Lo=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new Bo(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),Bo=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.action=null,s.scheduleTimeout(),s}return r.C6(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(S(e,t))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},t}(a);function Uo(e,t){return void 0===t&&(t=I),Fo(e,$e(new Do),t)}function Go(e){return void 0===e&&(e=I),(0,ve.T)((function(t){return new $o(t,e.now())}))}var $o=function(){return function(e,t){this.value=e,this.timestamp=t}}();function qo(e,t,n){return 0===n?[t]:(e.push(t),e)}function zo(){return kn(qo,[])}function Vo(e){return function(t){return t.lift(new Ho(e))}}var Ho=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new Wo(e),r=t.subscribe(n);return r.closed||n.add(S(n,this.windowBoundaries)),r},e}(),Wo=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new Kt,t.next(n.window),n}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new Kt;t.next(n)},t}(a);function Yo(e,t){return void 0===t&&(t=0),function(n){return n.lift(new Qo(e,t))}}var Qo=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new Jo(e,this.windowSize,this.startWindowEvery))},e}(),Jo=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=n,o.startWindowEvery=r,o.windows=[new Kt],o.count=0,t.next(o.windows[0]),o}return r.C6(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var a=this.count-r+1;if(a>=0&&a%t===0&&!this.closed&&o.shift().complete(),++this.count%t===0&&!this.closed){var l=new Kt;o.push(l),n.next(l)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(s.v);function Ko(e){var t=I,n=null,r=Number.POSITIVE_INFINITY;return M(arguments[3])&&(t=arguments[3]),M(arguments[2])?t=arguments[2]:A(arguments[2])&&(r=arguments[2]),M(arguments[1])?t=arguments[1]:A(arguments[1])&&(n=arguments[1]),function(o){return o.lift(new Xo(e,n,r,t))}}var Xo=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new ei(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return r.C6(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(Kt),ei=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.destination=t,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var l={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(ri,n,l)),s.add(i.schedule(ni,r,c))}else{var u={subscriber:s,window:a,windowTimeSpan:n};s.add(i.schedule(ti,n,u))}return s}return r.C6(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var o=t[r];o.closed||(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new Zo;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.v);function ti(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function ni(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,o=e.windowCreationInterval,i=n.openWindow(),s=this,a={action:s,subscription:null},l={subscriber:n,window:i,context:a};a.subscription=r.schedule(ri,t,l),s.add(a.subscription),s.schedule(e,o)}function ri(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}function oi(e,t){return function(n){return n.lift(new ii(e,t))}}var ii=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new si(e,this.openings,this.closingSelector))},e}(),si=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=S(o,n,n)),o}return r.C6(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,s){if(e===this.openings){var a=this.closingSelector,l=(0,o.T)(a)(t);if(l===i.M)return this.error(i.M.e);var c=new Kt,u=new k.y,d={window:c,subscription:u};this.contexts.push(d);var h=S(this,l,d);h.closed?this.closeWindow(this.contexts.length-1):(h.context=d,u.add(h)),this.destination.next(c)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,o=n.subscription;t.splice(e,1),r.complete(),o.unsubscribe()}},t}(a);function ai(e){return function(t){return t.lift(new li(e))}}var li=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new ci(e,this.closingSelector))},e}(),ci=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow(o)},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var n=this.window=new Kt;this.destination.next(n);var r=(0,o.T)(this.closingSelector)();if(r===i.M){var s=i.M.e;this.destination.error(s),this.window.error(s)}else this.add(this.closingNotification=S(this,r))},t}(a);function ui(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;"function"===typeof e[e.length-1]&&(n=e.pop());var r=e;return t.lift(new di(r,n))}}var di=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new hi(e,this.observables,this.project))},e}(),hi=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=new Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(s=0;s<i;s++){var a=n[s];o.add(S(o,a,a,s))}return o}return r.C6(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.values[n]=t;var i=this.toRespond;if(i.length>0){var s=i.indexOf(n);-1!==s&&i.splice(s,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(a);function pi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"===typeof n&&e.pop(),ue(e,void 0).lift(new fi(n))}var fi=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new mi(e,this.resultSelector))},e}(),mi=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var o=e.call(this,t)||this;return o.iterators=[],o.active=0,o.resultSelector="function"===typeof n?n:null,o.values=r,o}return r.C6(t,e),t.prototype._next=function(e){var t=this.iterators;(0,R.c)(e)?t.push(new vi(e)):"function"===typeof e[f]?t.push(new gi(e[f]())):t.push(new yi(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){if("function"===typeof(s=e[r]).hasValue&&!s.hasValue())return}var o=!1,i=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(o=!0),a.done)return void n.complete();i.push(a.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(s.v),gi=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),vi=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[f]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),yi=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return r.C6(t,e),t.prototype[f]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,o){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return S(this,this.observable,this,t)},t}(a);function bi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(pi.apply(void 0,[t].concat(e)))}}function xi(e){return function(t){return t.lift(new fi(e))}}},4243:(e,t,n)=>{"use strict";n.d(t,{C6:()=>o});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},7234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,x(e),!m)if(null!==r(c))m=!0,A(S);else{var t=r(u);null!==t&&M(w,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,y(k),k=-1),f=!0;var i=p;try{for(x(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!T());){var s=h.callback;if("function"===typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?h.callback=a:h===r(c)&&o(c),x(n)}else o(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&M(w,d.startTime-n),l=!1}return l}finally{h=null,p=i,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C,j=!1,_=null,k=-1,N=5,E=-1;function T(){return!(t.unstable_now()-E<N)}function O(){if(null!==_){var e=t.unstable_now();E=e;var n=!0;try{n=_(!0,e)}finally{n?C():(j=!1,_=null)}}else j=!1}if("function"===typeof b)C=function(){b(O)};else if("undefined"!==typeof MessageChannel){var I=new MessageChannel,R=I.port2;I.port1.onmessage=O,C=function(){R.postMessage(null)}}else C=function(){v(O,0)};function A(e){_=e,j||(j=!0,C())}function M(e,n){k=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,A(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var s=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?s+i:s:i=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>s?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(y(k),k=-1):g=!0,M(w,i-s))):(e.sortIndex=a,n(c,e),m||f||(m=!0,A(S))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},8853:(e,t,n)=>{"use strict";e.exports=n(7234)},5438:(e,t,n)=>{"use strict";var r=n(2),o=n(4992),i=n(2101)(),s=n(5558),a=n(2521),l=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new a("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&s){var u=s(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},2981:(e,t,n)=>{"use strict";var r=n(4992),o=n(2101)(),i=n(7699).functionsHaveConfigurableNames(),s=n(2521);e.exports=function(e,t){if("function"!==typeof e)throw new s("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?r(e,"name",t,!0,!0):r(e,"name",t)),e}},4943:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!a(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},4222:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(4403));t.default=function(e,t){var n=null;if(!e||"string"!==typeof e)return n;var r=(0,o.default)(e),i="function"===typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},5527:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServerStyleSheet:()=>Ge,StyleSheetConsumer:()=>ie,StyleSheetContext:()=>oe,StyleSheetManager:()=>de,ThemeConsumer:()=>Ae,ThemeContext:()=>Re,ThemeProvider:()=>Me,__PRIVATE__:()=>ze,createGlobalStyle:()=>Be,css:()=>we,default:()=>Ve,isStyledComponent:()=>w,keyframes:()=>Ue,useTheme:()=>qe,version:()=>C,withTheme:()=>$e});var r=n(2086),o=n(5043),i=n(4943),s=n.n(i);const a=function(e){function t(e,r,l,c,h){for(var p,f,m,g,x,S=0,C=0,j=0,_=0,k=0,R=0,M=m=p=0,D=0,F=0,L=0,B=0,U=l.length,G=U-1,$="",q="",z="",V="";D<U;){if(f=l.charCodeAt(D),D===G&&0!==C+_+j+S&&(0!==C&&(f=47===C?10:47),_=j=S=0,U++,G++),0===C+_+j+S){if(D===G&&(0<F&&($=$.replace(d,"")),0<$.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:$+=l.charAt(D)}f=59}switch(f){case 123:for(p=($=$.trim()).charCodeAt(0),m=1,B=++D;D<U;){switch(f=l.charCodeAt(D)){case 123:m++;break;case 125:m--;break;case 47:switch(f=l.charCodeAt(D+1)){case 42:case 47:e:{for(M=D+1;M<G;++M)switch(l.charCodeAt(M)){case 47:if(42===f&&42===l.charCodeAt(M-1)&&D+2!==M){D=M+1;break e}break;case 10:if(47===f){D=M+1;break e}}D=M}}break;case 91:f++;case 40:f++;case 34:case 39:for(;D++<G&&l.charCodeAt(D)!==f;);}if(0===m)break;D++}if(m=l.substring(B,D),0===p&&(p=($=$.replace(u,"").trim()).charCodeAt(0)),64===p){switch(0<F&&($=$.replace(d,"")),f=$.charCodeAt(1)){case 100:case 109:case 115:case 45:F=r;break;default:F=I}if(B=(m=t(r,F,m,f,h+1)).length,0<A&&(x=a(3,m,F=n(I,$,L),r,E,N,B,f,h,c),$=F.join(""),void 0!==x&&0===(B=(m=x.trim()).length)&&(f=0,m="")),0<B)switch(f){case 115:$=$.replace(w,s);case 100:case 109:case 45:m=$+"{"+m+"}";break;case 107:m=($=$.replace(v,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=$+m,112===c&&(q+=m,m="")}else m=""}else m=t(r,n(r,$,L),m,c,h+1);z+=m,m=L=F=M=p=0,$="",f=l.charCodeAt(++D);break;case 125:case 59:if(1<(B=($=(0<F?$.replace(d,""):$).trim()).length))switch(0===M&&(p=$.charCodeAt(0),45===p||96<p&&123>p)&&(B=($=$.replace(" ",":")).length),0<A&&void 0!==(x=a(1,$,r,e,E,N,q.length,c,h,c))&&0===(B=($=x.trim()).length)&&($="\0\0"),p=$.charCodeAt(0),f=$.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){V+=$+l.charAt(D);break}default:58!==$.charCodeAt(B-1)&&(q+=o($,p,f,$.charCodeAt(2)))}L=F=M=p=0,$="",f=l.charCodeAt(++D)}}switch(f){case 13:case 10:47===C?C=0:0===1+p&&107!==c&&0<$.length&&(F=1,$+="\0"),0<A*P&&a(0,$,r,e,E,N,q.length,c,h,c),N=1,E++;break;case 59:case 125:if(0===C+_+j+S){N++;break}default:switch(N++,g=l.charAt(D),f){case 9:case 32:if(0===_+S+C)switch(k){case 44:case 58:case 9:case 32:g="";break;default:32!==f&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===_+C+S&&(F=L=1,g="\f"+g);break;case 108:if(0===_+C+S+T&&0<M)switch(D-M){case 2:112===k&&58===l.charCodeAt(D-3)&&(T=k);case 8:111===R&&(T=R)}break;case 58:0===_+C+S&&(M=D);break;case 44:0===C+j+_+S&&(F=1,g+="\r");break;case 34:case 39:0===C&&(_=_===f?0:0===_?f:_);break;case 91:0===_+C+j&&S++;break;case 93:0===_+C+j&&S--;break;case 41:0===_+C+S&&j--;break;case 40:if(0===_+C+S){if(0===p)if(2*k+3*R===533);else p=1;j++}break;case 64:0===C+j+_+S+M+m&&(m=1);break;case 42:case 47:if(!(0<_+S+j))switch(C){case 0:switch(2*f+3*l.charCodeAt(D+1)){case 235:C=47;break;case 220:B=D,C=42}break;case 42:47===f&&42===k&&B+2!==D&&(33===l.charCodeAt(B+2)&&(q+=l.substring(B,D+1)),g="",C=0)}}0===C&&($+=g)}R=k,k=f,D++}if(0<(B=q.length)){if(F=r,0<A&&(void 0!==(x=a(2,q,F,e,E,N,B,c,h,c))&&0===(q=x).length))return V+q+z;if(q=F.join(",")+"{"+q+"}",0!==O*T){switch(2!==O||i(q,2)||(T=0),T){case 111:q=q.replace(b,":-moz-$1")+q;break;case 112:q=q.replace(y,"::-webkit-input-$1")+q.replace(y,"::-moz-$1")+q.replace(y,":-ms-input-$1")+q}T=0}}return V+q+z}function n(e,t,n){var o=t.trim().split(m);t=o;var i=o.length,s=e.length;switch(s){case 0:case 1:var a=0;for(e=0===s?"":e[0]+" ";a<i;++a)t[a]=r(e,t[a],n).trim();break;default:var l=a=0;for(t=[];a<i;++a)for(var c=0;c<s;++c)t[l++]=r(e[c]+" ",o[a],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var s=e+";",a=2*t+3*n+4*r;if(944===a){e=s.indexOf(":",9)+1;var l=s.substring(e,s.length-1).trim();return l=s.substring(0,e).trim()+l+";",1===O||2===O&&i(l,1)?"-webkit-"+l+l:l}if(0===O||2===O&&!i(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(k,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(l=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+l+s;case 1005:return p.test(s)?s.replace(h,":-webkit-")+s.replace(h,":-moz-")+s:s;case 1e3:switch(t=(l=s.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=s.replace(x,"tb");break;case 232:l=s.replace(x,"tb-rl");break;case 220:l=s.replace(x,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+l+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,a=(l=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(l,"-webkit-"+l)+";"+s.replace(l,"-ms-"+l+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return l=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+l+"-ms-flex-"+l+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(C,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(C,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):s.replace(l,"-webkit-"+l)+s.replace(l,"-moz-"+l.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+r&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+s}return s}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(j,"$1"),n,t)}function s(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,s,a,l,u){for(var d,h=0,p=t;h<A;++h)switch(d=R[h].call(c,e,p,n,r,o,i,s,a,l,u)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!==typeof e?O=1:(O=2,M=e):O=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<A){var o=a(-1,n,r,r,E,N,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(I,r,n,0,0);return 0<A&&(void 0!==(o=a(-2,i,r,r,E,N,i.length,0,0,0))&&(i=o)),"",T=0,N=E=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,C=/-self|flex-/g,j=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,N=1,E=1,T=0,O=1,I=[],R=[],A=0,M=null,P=0;return c.use=function e(t){switch(t){case void 0:case null:A=R.length=0;break;default:if("function"===typeof t)R[A++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else P=0|!!t}return e},c.set=l,void 0!==e&&l(e),c};const l={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var c=n(918),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,c.A)((function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=n(219),p=n.n(h);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var m=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},g=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,r.typeOf)(e)},v=Object.freeze([]),y=Object.freeze({});function b(e){return"function"==typeof e}function x(e){return e.displayName||e.name||"Component"}function w(e){return e&&"string"==typeof e.styledComponentId}var S="undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}&&({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.SC_ATTR)||"data-styled",C="5.3.11",j="undefined"!=typeof window&&"HTMLElement"in window,_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}&&(void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_SC_DISABLE_SPEEDY:void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.SC_DISABLE_SPEEDY))),k={};function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&N(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var s=this.indexOfGroup(e+1),a=0,l=t.length;a<l;a++)this.tag.insertRule(s,t[a])&&(this.groupSizes[e]++,s++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),T=new Map,O=new Map,I=1,R=function(e){if(T.has(e))return T.get(e);for(;O.has(I);)I++;var t=I++;return T.set(e,t),O.set(t,e),t},A=function(e){return O.get(e)},M=function(e,t){t>=I&&(I=t+1),T.set(e,t),O.set(t,e)},P="style["+S+'][data-styled-version="5.3.11"]',D=new RegExp("^"+S+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(e,t,n){for(var r,o=n.split(","),i=0,s=o.length;i<s;i++)(r=o[i])&&e.registerName(t,r)},L=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var s=n[o].trim();if(s){var a=s.match(D);if(a){var l=0|parseInt(a[1],10),c=a[2];0!==l&&(M(c,l),F(e,c,a[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(s)}}},B=function(){return n.nc},U=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(S))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.3.11");var s=B();return s&&r.setAttribute("nonce",s),n.insertBefore(r,i),r},G=function(){function e(e){var t=this.element=U(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<r;n++){var o=t[n];if(o.ownerNode===e)return o}N(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),$=function(){function e(e){var t=this.element=U(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=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.length?this.nodes[e].textContent:""},e}(),q=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),z=j,V={isServer:!j,useCSSOMInjection:!_},H=function(){function e(e,t,n){void 0===e&&(e=y),void 0===t&&(t={}),this.options=f({},V,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&j&&z&&(z=!1,function(e){for(var t=document.querySelectorAll(P),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(S)&&(L(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return R(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(f({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new q(o):r?new G(o):new $(o),new E(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(R(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(R(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(R(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=A(o);if(void 0!==i){var s=e.names.get(i),a=t.getGroup(o);if(s&&a&&s.size){var l=S+".g"+o+'[id="'+i+'"]',c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+a+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),W=/(a)(d)/gi,Y=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Y(t%52)+n;return(Y(t%52)+n).replace(W,"$1-$2")}var J=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},K=function(e){return J(5381,e)};function X(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!w(n))return!1}return!0}var Z=K("5.3.11"),ee=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&X(e),this.componentId=t,this.baseHash=J(Z,t),this.baseStyle=n,H.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=be(this.rules,e,t,n).join(""),s=Q(J(this.baseHash,i)>>>0);if(!t.hasNameForId(r,s)){var a=n(i,"."+s,void 0,r);t.insertRules(r,s,a)}o.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,c=J(this.baseHash,n.hash),u="",d=0;d<l;d++){var h=this.rules[d];if("string"==typeof h)u+=h;else if(h){var p=be(h,e,t,n),f=Array.isArray(p)?p.join(""):p;c=J(c,f+d),u+=f}}if(u){var m=Q(c>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),te=/^\s*\/\/.*$/gm,ne=[":","[",".","#"];function re(e){var t,n,r,o,i=void 0===e?y:e,s=i.options,l=void 0===s?y:s,c=i.plugins,u=void 0===c?v:c,d=new a(l),h=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,s,a,l,c,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),f=function(e,r,i){return 0===r&&-1!==ne.indexOf(i[n.length])||i.match(o)?e:"."+t};function m(e,i,s,a){void 0===a&&(a="&");var l=e.replace(te,""),c=i&&s?s+" "+i+" { "+l+" }":l;return t=a,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(s||!i?"":i,c)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||N(15),J(e,t.name)}),5381).toString():"",m}var oe=o.createContext(),ie=oe.Consumer,se=o.createContext(),ae=(se.Consumer,new H),le=re();function ce(){return(0,o.useContext)(oe)||ae}function ue(){return(0,o.useContext)(se)||le}function de(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=ce(),a=(0,o.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,o.useMemo)((function(){return re({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.createElement(oe.Provider,{value:a},o.createElement(se.Provider,{value:l},e.children))}var he=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=le);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return N(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=le),this.name+e.hash},e}(),pe=/([A-Z])/,fe=/([A-Z])/g,me=/^ms-/,ge=function(e){return"-"+e.toLowerCase()};function ve(e){return pe.test(e)?e.replace(fe,ge).replace(me,"-ms-"):e}var ye=function(e){return null==e||!1===e||""===e};function be(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],s=0,a=e.length;s<a;s+=1)""!==(o=be(e[s],t,n,r))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return ye(e)?"":w(e)?"."+e.styledComponentId:b(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:be(e(t),t,n,r):e instanceof he?n?(e.inject(n,r),e.getName(r)):e:g(e)?function e(t,n){var r,o,i=[];for(var s in t)t.hasOwnProperty(s)&&!ye(t[s])&&(Array.isArray(t[s])&&t[s].isCss||b(t[s])?i.push(ve(s)+":",t[s],";"):g(t[s])?i.push.apply(i,e(t[s],s)):i.push(ve(s)+": "+(r=s,(null==(o=t[s])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l||r.startsWith("--")?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString();var c}var xe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function we(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||g(e)?xe(be(m(v,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:xe(be(m(e,n)))}new Set;var Se=function(e,t,n){return void 0===n&&(n=y),e.theme!==n.theme&&e.theme||t||n.theme},Ce=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function _e(e){return e.replace(Ce,"-").replace(je,"")}var ke=function(e){return Q(K(e)>>>0)};function Ne(e){return"string"==typeof e&&!0}var Ee=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Oe(e,t,n){var r=e[n];Ee(t)&&Ee(r)?Ie(r,t):e[n]=t}function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var s=i[o];if(Ee(s))for(var a in s)Te(a)&&Oe(e,s[a],a)}return e}var Re=o.createContext(),Ae=Re.Consumer;function Me(e){var t=(0,o.useContext)(Re),n=(0,o.useMemo)((function(){return function(e,t){return e?b(e)?e(t):Array.isArray(e)||"object"!=typeof e?N(8):t?f({},t,{},e):e:N(14)}(e.theme,t)}),[e.theme,t]);return e.children?o.createElement(Re.Provider,{value:n},e.children):null}var Pe={};function De(e,t,n){var r=w(e),i=!Ne(e),s=t.attrs,a=void 0===s?v:s,l=t.componentId,c=void 0===l?function(e,t){var n="string"!=typeof e?"sc":_e(e);Pe[n]=(Pe[n]||0)+1;var r=n+"-"+ke("5.3.11"+n+Pe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,u=t.displayName,h=void 0===u?function(e){return Ne(e)?"styled."+e:"Styled("+x(e)+")"}(e):u,m=t.displayName&&t.componentId?_e(t.displayName)+"-"+t.componentId:t.componentId||c,g=r&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,S=t.shouldForwardProp;r&&e.shouldForwardProp&&(S=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,j=new ee(n,m,r?e.componentStyle:void 0),_=j.isStatic&&0===a.length,k=function(e,t){return function(e,t,n,r){var i=e.attrs,s=e.componentStyle,a=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,h=e.target,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,s=e;for(t in b(s)&&(s=s(r)),s)r[t]=o[t]="className"===t?(n=o[t],i=s[t],n&&i?n+" "+i:n||i):s[t]})),[r,o]}(Se(t,(0,o.useContext)(Re),a)||y,t,i),m=p[0],g=p[1],v=function(e,t,n,r){var o=ce(),i=ue();return t?e.generateAndInjectStyles(y,o,i):e.generateAndInjectStyles(n,o,i)}(s,r,m),x=n,w=g.$as||t.$as||g.as||t.as||h,S=Ne(w),C=g!==t?f({},t,{},g):t,j={};for(var _ in C)"$"!==_[0]&&"as"!==_&&("forwardedAs"===_?j.as=C[_]:(c?c(_,d,w):!S||d(_))&&(j[_]=C[_]));return t.style&&g.style!==t.style&&(j.style=f({},t.style,{},g.style)),j.className=Array.prototype.concat(l,u,v!==u?v:null,t.className,g.className).filter(Boolean).join(" "),j.ref=x,(0,o.createElement)(w,j)}(C,e,t,_)};return k.displayName=h,(C=o.forwardRef(k)).attrs=g,C.componentStyle=j,C.displayName=h,C.shouldForwardProp=S,C.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,C.styledComponentId=m,C.target=r?e.target:e,C.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<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Ne(e)?e:_e(x(e)));return De(e,f({},o,{attrs:g,componentId:i}),n)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ie({},e.defaultProps,t):t}}),Object.defineProperty(C,"toString",{value:function(){return"."+C.styledComponentId}}),i&&p()(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var Fe=function(e){return function e(t,n,o){if(void 0===o&&(o=y),!(0,r.isValidElementType)(n))return N(1,String(n));var i=function(){return t(n,o,we.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}(De,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","textPath","tspan"].forEach((function(e){Fe[e]=Fe(e)}));var Le=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=X(e),H.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(be(this.rules,t,n,r).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){e>2&&H.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=we.apply(void 0,[e].concat(n)),s="sc-global-"+ke(JSON.stringify(i)),a=new Le(i,s);function l(e){var t=ce(),n=ue(),r=(0,o.useContext)(Re),i=(0,o.useRef)(t.allocateGSInstance(s)).current;return t.server&&c(i,e,t,r,n),(0,o.useLayoutEffect)((function(){if(!t.server)return c(i,e,t,r,n),function(){return a.removeStyles(i,t)}}),[i,e,t,r,n]),null}function c(e,t,n,r,o){if(a.isStatic)a.renderStyles(e,k,n,o);else{var i=f({},t,{theme:Se(t,r,l.defaultProps)});a.renderStyles(e,i,n,o)}}return o.memo(l)}function Ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=we.apply(void 0,[e].concat(n)).join(""),i=ke(o);return new he(i,o)}var Ge=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=B();return"<style "+[n&&'nonce="'+n+'"',S+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?N(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return N(2);var n=((t={})[S]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=B();return r&&(n.nonce=r),[o.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new H({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?N(2):o.createElement(de,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return N(3)},e}(),$e=function(e){var t=o.forwardRef((function(t,n){var r=(0,o.useContext)(Re),i=e.defaultProps,s=Se(t,r,i);return o.createElement(e,f({},t,{theme:s,ref:n}))}));return p()(t,e),t.displayName="WithTheme("+x(e)+")",t},qe=function(){return(0,o.useContext)(Re)},ze={StyleSheet:H,masterSheet:ae};const Ve=Fe},6440:e=>{"use strict";var t=function(){};e.exports=t},4953:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOMException:()=>S,Headers:()=>u,Request:()=>v,Response:()=>x,fetch:()=>C});var r="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g||{},o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(o.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function a(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o.iterable&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:o.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o.arrayBuffer&&o.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=d(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(o.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=h(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),o=r?r[1]:"utf-8";return t.readAsText(e,o),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=a(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},u.prototype.delete=function(e){delete this.map[a(e)]},u.prototype.get=function(e){return e=a(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},u.prototype.set=function(e,t){this.map[a(e)]=l(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),c(e)},u.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},u.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),c(e)},o.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=function(e){var t=e.toUpperCase();return g.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function b(e){var t=new u;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();try{t.append(r,o)}catch(i){console.warn("Response "+i.message)}}})),t}function x(e,t){if(!(this instanceof x))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];x.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})};var S=r.DOMException;try{new S}catch(j){(S=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),S.prototype.constructor=S}function C(e,t){return new Promise((function(n,i){var s=new v(e,t);if(s.signal&&s.signal.aborted)return i(new S("Aborted","AbortError"));var c=new XMLHttpRequest;function d(){c.abort()}if(c.onload=function(){var e={statusText:c.statusText,headers:b(c.getAllResponseHeaders()||"")};0===s.url.indexOf("file://")&&(c.status<200||c.status>599)?e.status=200:e.status=c.status,e.url="responseURL"in c?c.responseURL:e.headers.get("X-Request-URL");var t="response"in c?c.response:c.responseText;setTimeout((function(){n(new x(t,e))}),0)},c.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request timed out"))}),0)},c.onabort=function(){setTimeout((function(){i(new S("Aborted","AbortError"))}),0)},c.open(s.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?c.withCredentials=!0:"omit"===s.credentials&&(c.withCredentials=!1),"responseType"in c&&(o.blob?c.responseType="blob":o.arrayBuffer&&(c.responseType="arraybuffer")),t&&"object"===typeof t.headers&&!(t.headers instanceof u||r.Headers&&t.headers instanceof r.Headers)){var h=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){h.push(a(e)),c.setRequestHeader(e,l(t.headers[e]))})),s.headers.forEach((function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)}))}else s.headers.forEach((function(e,t){c.setRequestHeader(t,e)}));s.signal&&(s.signal.addEventListener("abort",d),c.onreadystatechange=function(){4===c.readyState&&s.signal.removeEventListener("abort",d)}),c.send("undefined"===typeof s._bodyInit?null:s._bodyInit)}))}C.polyfill=!0,r.fetch||(r.fetch=C,r.Headers=u,r.Request=v,r.Response=x)},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633:(e,t,n)=>{var r=n(3738).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},i=Object.prototype,s=i.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof x?t:x,i=Object.create(o.prototype),s=new A(r||[]);return a(i,"_invoke",{value:T(e,n,s)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=p;var m="suspendedStart",g="suspendedYield",v="executing",y="completed",b={};function x(){}function w(){}function S(){}var C={};h(C,c,(function(){return this}));var j=Object.getPrototypeOf,_=j&&j(j(M([])));_&&_!==i&&s.call(_,c)&&(C=_);var k=S.prototype=x.prototype=Object.create(C);function N(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,l){var c=f(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==r(d)&&s.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var o=m;return function(i,s){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw s;return{value:t,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var l=O(a,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var c=f(e,n,r);if("normal"===c.type){if(o=r.done?y:g,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=y,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var s=i.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(s.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=S,a(k,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=h(S,d,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,h(e,d,"GeneratorFunction")),e.prototype=Object.create(k),e},n.awrap=function(e){return{__await:e}},N(E.prototype),h(E.prototype,u,(function(){return this})),n.AsyncIterator=E,n.async=function(e,t,r,o,i){void 0===i&&(i=Promise);var s=new E(p(e,t,r,o),i);return n.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},N(k),h(k,d,"Generator"),h(k,c,(function(){return this})),h(k,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=M,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&s.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=s.call(i,"catchLoc"),c=s.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;R(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756:(e,t,n)=>{var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(o){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},8139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},1239:(e,t,n)=>{"use strict";var r=n(4706),o=n(5464),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},1608:(e,t,n)=>{"use strict";var r=n(6821),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},972:(e,t,n)=>{"use strict";var r=n(6774),o=n(2201),i=n(1591),s=function(e){return function(t,n,s){var a=r(t),l=i(a);if(0===l)return!e&&-1;var c,u=o(s,l);if(e&&n!==n){for(;l>u;)if((c=a[u++])!==c)return!0}else for(;l>u;u++)if((e||u in a)&&a[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},1659:(e,t,n)=>{"use strict";var r=n(7707);e.exports=r([].slice)},5687:(e,t,n)=>{"use strict";var r=n(7707),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},5555:(e,t,n)=>{"use strict";var r=n(6164),o=n(2682),i=n(5214),s=n(3572);e.exports=function(e,t,n){for(var a=o(t),l=s.f,c=i.f,u=0;u<a.length;u++){var d=a[u];r(e,d)||n&&r(n,d)||l(e,d,c(t,d))}}},9266:(e,t,n)=>{"use strict";var r=n(9519),o=n(3572),i=n(6369);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},6369:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5551:(e,t,n)=>{"use strict";var r=n(4706),o=n(3572),i=n(4416),s=n(3036);e.exports=function(e,t,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(r(n)&&i(n,c,a),a.global)l?e[t]=n:s(t,n);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},3036:(e,t,n)=>{"use strict";var r=n(8986),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9519:(e,t,n)=>{"use strict";var r=n(8084);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2760:(e,t,n)=>{"use strict";var r=n(8986),o=n(6821),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},2924:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},2660:(e,t,n)=>{"use strict";var r=n(8971);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},7741:(e,t,n)=>{"use strict";var r=n(8986),o=n(5687);e.exports="process"===o(r.process)},8971:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5083:(e,t,n)=>{"use strict";var r,o,i=n(8986),s=n(8971),a=i.process,l=i.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},6672:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6715:(e,t,n)=>{"use strict";var r=n(8986),o=n(5214).f,i=n(9266),s=n(5551),a=n(3036),l=n(5555),c=n(6079);e.exports=function(e,t){var n,u,d,h,p,f=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[f]||a(f,{}):r[f]&&r[f].prototype)for(u in t){if(h=t[u],d=e.dontCallGetSet?(p=o(n,u))&&p.value:n[u],!c(m?u:f+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;l(h,d)}(e.sham||d&&d.sham)&&i(h,"sham",!0),s(n,u,h,e)}}},8084:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},6464:(e,t,n)=>{"use strict";var r=n(5897),o=Function.prototype,i=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},9055:(e,t,n)=>{"use strict";var r=n(8097),o=n(1239),i=n(5897),s=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},5897:(e,t,n)=>{"use strict";var r=n(8084);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4850:(e,t,n)=>{"use strict";var r=n(5897),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},2345:(e,t,n)=>{"use strict";var r=n(9519),o=n(6164),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},8097:(e,t,n)=>{"use strict";var r=n(5687),o=n(7707);e.exports=function(e){if("Function"===r(e))return o(e)}},7707:(e,t,n)=>{"use strict";var r=n(5897),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},3542:(e,t,n)=>{"use strict";var r=n(8986),o=n(4706);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},7151:(e,t,n)=>{"use strict";var r=n(1239),o=n(3192);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},8986:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6164:(e,t,n)=>{"use strict";var r=n(7707),o=n(2522),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3114:e=>{"use strict";e.exports={}},904:(e,t,n)=>{"use strict";var r=n(3542);e.exports=r("document","documentElement")},9704:(e,t,n)=>{"use strict";var r=n(9519),o=n(8084),i=n(2760);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1178:(e,t,n)=>{"use strict";var r=n(7707),o=n(8084),i=n(5687),s=Object,a=r("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?a(e,""):s(e)}:s},5167:(e,t,n)=>{"use strict";var r=n(7707),o=n(4706),i=n(5704),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2428:(e,t,n)=>{"use strict";var r,o,i,s=n(9279),a=n(8986),l=n(6821),c=n(9266),u=n(6164),d=n(5704),h=n(4658),p=n(3114),f="Object already initialized",m=a.TypeError,g=a.WeakMap;if(s||d.state){var v=d.state||(d.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,r=function(e,t){if(v.has(e))throw new m(f);return t.facade=e,v.set(e,t),t},o=function(e){return v.get(e)||{}},i=function(e){return v.has(e)}}else{var y=h("state");p[y]=!0,r=function(e,t){if(u(e,y))throw new m(f);return t.facade=e,c(e,y,t),t},o=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},4706:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},6079:(e,t,n)=>{"use strict";var r=n(8084),o=n(4706),i=/#|\.prototype\./,s=function(e,t){var n=l[a(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},3192:e=>{"use strict";e.exports=function(e){return null===e||void 0===e}},6821:(e,t,n)=>{"use strict";var r=n(4706);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},7592:e=>{"use strict";e.exports=!1},7970:(e,t,n)=>{"use strict";var r=n(3542),o=n(4706),i=n(6864),s=n(4111),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,a(e))}},1591:(e,t,n)=>{"use strict";var r=n(8249);e.exports=function(e){return r(e.length)}},4416:(e,t,n)=>{"use strict";var r=n(7707),o=n(8084),i=n(4706),s=n(6164),a=n(9519),l=n(2345).CONFIGURABLE,c=n(5167),u=n(2428),d=u.enforce,h=u.get,p=String,f=Object.defineProperty,m=r("".slice),g=r("".replace),v=r([].join),y=a&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=e.exports=function(e,t,n){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&s(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var r=d(e);return s(r,"source")||(r.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x((function(){return i(this)&&h(this).source||c(this)}),"toString")},9344:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},3572:(e,t,n)=>{"use strict";var r=n(9519),o=n(9704),i=n(253),s=n(1608),a=n(3326),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";t.f=r?i?function(e,t,n){if(s(e),t=a(t),s(n),"function"===typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=a(t),s(n),o)try{return c(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},5214:(e,t,n)=>{"use strict";var r=n(9519),o=n(4850),i=n(4022),s=n(6369),a=n(6774),l=n(3326),c=n(6164),u=n(9704),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=l(t),u)try{return d(e,t)}catch(n){}if(c(e,t))return s(!o(i.f,e,t),e[t])}},7251:(e,t,n)=>{"use strict";var r=n(4061),o=n(6672).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},6842:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},6864:(e,t,n)=>{"use strict";var r=n(7707);e.exports=r({}.isPrototypeOf)},4061:(e,t,n)=>{"use strict";var r=n(7707),o=n(6164),i=n(6774),s=n(972).indexOf,a=n(3114),l=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,u=[];for(n in r)!o(a,n)&&o(r,n)&&l(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~s(u,n)||l(u,n));return u}},4022:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2509:(e,t,n)=>{"use strict";var r=n(4850),o=n(4706),i=n(6821),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&o(n=e.toString)&&!i(a=r(n,e)))return a;if(o(n=e.valueOf)&&!i(a=r(n,e)))return a;if("string"!==t&&o(n=e.toString)&&!i(a=r(n,e)))return a;throw new s("Can't convert object to primitive value")}},2682:(e,t,n)=>{"use strict";var r=n(3542),o=n(7707),i=n(7251),s=n(6842),a=n(1608),l=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=s.f;return n?l(t,n(e)):t}},9302:(e,t,n)=>{"use strict";var r=n(8986);e.exports=r},327:(e,t,n)=>{"use strict";var r=n(3192),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},1709:(e,t,n)=>{"use strict";var r=n(8986),o=n(6464),i=n(4706),s=n(2924),a=n(8971),l=n(1659),c=n(155),u=r.Function,d=/MSIE .\./.test(a)||s&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return d?function(r,s){var a=c(arguments.length,1)>n,d=i(r)?r:u(r),h=a?l(arguments,n):[],p=a?function(){o(d,this,h)}:d;return t?e(p,s):e(p)}:e}},4658:(e,t,n)=>{"use strict";var r=n(816),o=n(7899),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5704:(e,t,n)=>{"use strict";var r=n(7592),o=n(8986),i=n(3036),s="__core-js_shared__",a=e.exports=o[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:r?"pure":"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},816:(e,t,n)=>{"use strict";var r=n(5704);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},4030:(e,t,n)=>{"use strict";var r=n(5083),o=n(8084),i=n(8986).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},9464:(e,t,n)=>{"use strict";var r,o,i,s,a=n(8986),l=n(6464),c=n(9055),u=n(4706),d=n(6164),h=n(8084),p=n(904),f=n(1659),m=n(2760),g=n(155),v=n(2660),y=n(7741),b=a.setImmediate,x=a.clearImmediate,w=a.process,S=a.Dispatch,C=a.Function,j=a.MessageChannel,_=a.String,k=0,N={},E="onreadystatechange";h((function(){r=a.location}));var T=function(e){if(d(N,e)){var t=N[e];delete N[e],t()}},O=function(e){return function(){T(e)}},I=function(e){T(e.data)},R=function(e){a.postMessage(_(e),r.protocol+"//"+r.host)};b&&x||(b=function(e){g(arguments.length,1);var t=u(e)?e:C(e),n=f(arguments,1);return N[++k]=function(){l(t,void 0,n)},o(k),k},x=function(e){delete N[e]},y?o=function(e){w.nextTick(O(e))}:S&&S.now?o=function(e){S.now(O(e))}:j&&!v?(s=(i=new j).port2,i.port1.onmessage=I,o=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!h(R)?(o=R,a.addEventListener("message",I,!1)):o=E in m("script")?function(e){p.appendChild(m("script"))[E]=function(){p.removeChild(this),T(e)}}:function(e){setTimeout(O(e),0)}),e.exports={set:b,clear:x}},2201:(e,t,n)=>{"use strict";var r=n(466),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},6774:(e,t,n)=>{"use strict";var r=n(1178),o=n(327);e.exports=function(e){return r(o(e))}},466:(e,t,n)=>{"use strict";var r=n(9344);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},8249:(e,t,n)=>{"use strict";var r=n(466),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},2522:(e,t,n)=>{"use strict";var r=n(327),o=Object;e.exports=function(e){return o(r(e))}},9140:(e,t,n)=>{"use strict";var r=n(4850),o=n(6821),i=n(7970),s=n(7151),a=n(2509),l=n(4352),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=s(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},3326:(e,t,n)=>{"use strict";var r=n(9140),o=n(7970);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},5464:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(n){return"Object"}}},7899:(e,t,n)=>{"use strict";var r=n(7707),o=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},4111:(e,t,n)=>{"use strict";var r=n(4030);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},253:(e,t,n)=>{"use strict";var r=n(9519),o=n(8084);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},155:e=>{"use strict";var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},9279:(e,t,n)=>{"use strict";var r=n(8986),o=n(4706),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},2278:(e,t,n)=>{"use strict";var r=n(9302),o=n(6164),i=n(7512),s=n(3572).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||s(t,e,{value:i.f(e)})}},7512:(e,t,n)=>{"use strict";var r=n(4352);t.f=r},4352:(e,t,n)=>{"use strict";var r=n(8986),o=n(816),i=n(6164),s=n(7899),a=n(4030),l=n(4111),c=r.Symbol,u=o("wks"),d=l?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return i(u,e)||(u[e]=a&&i(c,e)?c[e]:d("Symbol."+e)),u[e]}},6184:(e,t,n)=>{"use strict";var r=n(8986),o=n(2278),i=n(3572).f,s=n(5214).f,a=r.Symbol;if(o("dispose"),a){var l=s(a,"dispose");l.enumerable&&l.configurable&&l.writable&&i(a,"dispose",{value:l.value,enumerable:!1,configurable:!1,writable:!1})}},4896:(e,t,n)=>{"use strict";n(2278)("observable")},5375:(e,t,n)=>{"use strict";n(2278)("patternMatch")},6023:(e,t,n)=>{"use strict";var r=n(6715),o=n(8986),i=n(9464).clear;r({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},4647:(e,t,n)=>{"use strict";n(6023),n(9286)},9286:(e,t,n)=>{"use strict";var r=n(6715),o=n(8986),i=n(9464).set,s=n(1709),a=o.setImmediate?s(i,!1):i;r({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==a},{setImmediate:a})},9076:(e,t,n)=>{"use strict";e.exports=n(8109)},8109:(e,t,n)=>{"use strict";var r=n(2521);e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},7581:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var r=n(6326),o=n(9238),i=n(3094),s=n(4273),a=n(8973),l=n(2172),c=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=(0,o.LV)(i.ct,{max:s.v["cache.fragmentQueryDocuments"]||1e3,cache:a.l})}return e.prototype.batch=function(e){var t,n=this,r="string"===typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,r.Cl)((0,r.Cl)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,r.Cl)((0,r.Cl)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,o=(0,r.Tt)(e,["id","data"]);return this.write(Object.assign(o,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,o=e.fragment,i=e.fragmentName,s=(0,r.Tt)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(o,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var o=n.readQuery(e),i=t(o);return void 0===i||null===i?o:(n.writeQuery((0,r.Cl)((0,r.Cl)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var o=n.readFragment(e),i=t(o);return void 0===i||null===i?o:(n.writeFragment((0,r.Cl)((0,r.Cl)({},e),{data:i})),i)}})},e}();!1!==globalThis.__DEV__&&(c.prototype.getMemoryInternals=l.tQ)},5944:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(6326),o=function(e){function t(n,r,o,i){var s,a=e.call(this,n)||this;if(a.message=n,a.path=r,a.query=o,a.variables=i,Array.isArray(a.path)){a.missing=a.message;for(var l=a.path.length-1;l>=0;--l)a.missing=((s={})[a.path[l]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,r.C6)(t,e),t}(Error)},7269:(e,t,n)=>{"use strict";n.d(t,{$3:()=>d,I6:()=>m,T9:()=>x,Ui:()=>v,Xx:()=>g,d1:()=>w,gk:()=>y,iJ:()=>b,lq:()=>C,mv:()=>S,or:()=>p});var r=n(8694),o=n(9761),i=n(659),s=n(8829),a=n(3985),l=n(421),c=n(3094),u=n(1955),d=Object.prototype.hasOwnProperty;function h(e){return null===e||void 0===e}function p(e,t){var n=e.__typename,r=e.id,o=e._id;if("string"===typeof n&&(t&&(t.keyObject=h(r)?h(o)?void 0:{_id:o}:{id:r}),h(r)&&!h(o)&&(r=o),!h(r)))return"".concat(n,":").concat("number"===typeof r||"string"===typeof r?r:JSON.stringify(r))}var f={dataIdFromObject:p,addTypename:!0,resultCaching:!0,canonizeResults:!1};function m(e){return(0,r.o)(f,e)}function g(e){var t=e.canonizeResults;return void 0===t?f.canonizeResults:t}function v(e,t){return(0,o.A_)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var y=/^[_a-z][_0-9a-z]*/i;function b(e){var t=e.match(y);return t?t[0]:e}function x(e,t,n){return!!(0,i.U)(t)&&((0,s.c)(t)?t.every((function(t){return x(e,t,n)})):e.selections.every((function(e){if((0,o.dt)(e)&&(0,a.MS)(e,n)){var r=(0,o.ue)(e);return d.call(t,r)&&(!e.selectionSet||x(e.selectionSet,t[r],n))}return!0})))}function w(e){return(0,i.U)(e)&&!(0,o.A_)(e)&&!(0,s.c)(e)}function S(){return new l.ZI}function C(e,t){var n=(0,c.JG)((0,u.zK)(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}},933:(e,t,n)=>{"use strict";n.d(t,{D:()=>ye});var r=n(6326),o=n(7484),i=n(9238),s=n(4902),a=n(7581),l=n(5944),c=n(4704),u=n(2935),d=n(4273),h=n(9776),p=n(2920),f=n(9761),m=n(4705),g=n(2622),v=n(8694),y=n(1955),b=n(421),x=n(3985),w=n(3094),S=n(6250),C=n(659),j=n(5730),_=n(7269),k=Object.create(null),N=function(){return k},E=Object.create(null),T=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,S.G)((0,f.A_)(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,f.A_)(e)?n.has(e.__ref):"object"===typeof e},this.toReference=function(e,t){if("string"===typeof e)return(0,f.WU)(e);if((0,f.A_)(e))return e;var r=n.policies.identify(e)[0];if(r){var o=(0,f.WU)(r);return t&&n.merge(r,e),o}}}return e.prototype.toObject=function(){return(0,r.Cl)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),_.$3.call(this.data,e)){var n=this.data[e];if(n&&_.$3.call(n,t))return n[t]}return"__typename"===t&&_.$3.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof A?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),_.$3.call(this.data,e)?this.data[e]:this instanceof A?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;(0,f.A_)(e)&&(e=e.__ref),(0,f.A_)(t)&&(t=t.__ref);var i="string"===typeof e?this.lookup(n=e):e,s="string"===typeof t?this.lookup(n=t):t;if(s){(0,o.V1)("string"===typeof n,1);var a=new b.ZI(P).merge(i,s);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var l=Object.create(null);i||(l.__exists=1),Object.keys(s).forEach((function(e){if(!i||i[e]!==a[e]){l[e]=1;var t=(0,_.iJ)(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(l[t]=1),void 0!==a[e]||r instanceof A||delete a[e]}})),!l.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete l.__typename,Object.keys(l).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var s=Object.create(null),a=!1,l=!0,c={DELETE:k,INVALIDATE:E,isReference:f.A_,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"===typeof t?{fieldName:t,from:r||(0,f.WU)(e)}:t,{store:n})}};if(Object.keys(i).forEach((function(u){var d=(0,_.iJ)(u),h=i[u];if(void 0!==h){var p="function"===typeof t?t:t[u]||t[d];if(p){var m=p===N?k:p((0,S.G)(h),(0,r.Cl)((0,r.Cl)({},c),{fieldName:d,storeFieldName:u,storage:n.getStorage(e,u)}));if(m===E)n.group.dirty(e,u);else if(m===k&&(m=void 0),m!==h&&(s[u]=m,a=!0,h=m,!1!==globalThis.__DEV__)){var g=function(e){if(void 0===n.lookup(e.__ref))return!1!==globalThis.__DEV__&&o.V1.warn(2,e),!0};if((0,f.A_)(m))g(m);else if(Array.isArray(m))for(var v=!1,y=void 0,b=0,x=m;b<x.length;b++){var w=x[b];if((0,f.A_)(w)){if(v=!0,g(w))break}else if("object"===typeof w&&w)n.policies.identify(w)[0]&&(y=w);if(v&&void 0!==y){!1!==globalThis.__DEV__&&o.V1.warn(3,y);break}}}}void 0!==h&&(l=!1)}})),a)return this.merge(e,s),l&&(this instanceof A?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,o=this.lookup(e);if(o){var i=this.getFieldValue(o,"__typename"),s=t&&n?this.policies.getStoreFieldName({typename:i,fieldName:t,args:n}):t;return this.modify(e,s?((r={})[s]=N,r):N)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(_.$3.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof A&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){_.$3.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&_.$3.call(e,n)||t.delete(n)})),e){var n=e.__META,o=(0,r.Tt)(e,["__META"]);Object.keys(o).forEach((function(e){t.merge(e,o[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof A?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){_.$3.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var o=this;o instanceof A;)o=o.parent;r.forEach((function(e){return o.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!_.$3.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){(0,f.A_)(e)&&(t[e.__ref]=!0),(0,C.U)(e)&&Object.keys(e).forEach((function(t){var n=e[t];(0,C.U)(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),O=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,i.yN)():null,this.keyMaker=new j.b(g.et)},e.prototype.depend=function(e,t){if(this.d){this.d(I(e,t));var n=(0,_.iJ)(t);n!==t&&this.d(I(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(I(e,t),"__exists"===t?"forget":"setDirty")},e}();function I(e,t){return t+"#"+e}function R(e,t){D(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,o=void 0===r||r,i=t.seed,s=e.call(this,n,new O(o))||this;return s.stump=new M(s),s.storageTrie=new j.b(g.et),i&&s.replace(i),s}return(0,r.C6)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(T||(T={}));var A=function(e){function t(t,n,r,o){var i=e.call(this,n.policies,o)||this;return i.id=t,i.parent=n,i.replay=r,i.group=o,r(i),i}return(0,r.C6)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],o=n.lookup(e);o?r?r!==o&&Object.keys(r).forEach((function(n){(0,s.L)(r[n],o[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(o).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,r.Cl)((0,r.Cl)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return _.$3.call(this.data,t)?(0,r.Cl)((0,r.Cl)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(T),M=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new O(t.group.caching,t.group))||this}return(0,r.C6)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(A);function P(e,t,n){var r=e[n],o=t[n];return(0,s.L)(r,o)?r:o}function D(e){return!!(e instanceof T&&e.group.caching)}var F=n(8829);var L=function(){function e(){this.known=new(g.En?WeakSet:Set),this.pool=new j.b(g.et),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,C.U)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,C.U)(e)){var t=function(e){return(0,C.U)(e)?(0,F.c)(e)?e.slice(0):(0,r.Cl)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,C.U)(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(a=this.pool.lookupArray(r)).array||(this.known.add(a.array=r),!1!==globalThis.__DEV__&&Object.freeze(r)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var o=Object.getPrototypeOf(e),i=[o],s=this.sortedKeys(e);i.push(s.json);var a,l=i.length;if(s.sorted.forEach((function(n){i.push(t.admit(e[n]))})),!(a=this.pool.lookupArray(i)).object){var c=a.object=Object.create(o);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=i[l+t]})),!1!==globalThis.__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}();function B(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var U=function(){function e(e){var t=this;this.knownResults=new(g.et?WeakMap:Map),this.config=(0,v.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:(0,_.Xx)(e)}),this.canon=e.canon||new L,this.executeSelectionSet=(0,i.LV)((function(e){var n,o=e.context.canonizeResults,i=B(e);i[3]=!o;var s=(n=t.executeSelectionSet).peek.apply(n,i);return s?o?(0,r.Cl)((0,r.Cl)({},s),{result:t.canon.admit(s.result)}):s:(R(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:B,makeCacheKey:function(e,t,n,r){if(D(n.store))return n.store.makeCacheKey(e,(0,f.A_)(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=(0,i.LV)((function(e){return R(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(D(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new L},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,o=e.rootId,i=void 0===o?"ROOT_QUERY":o,s=e.variables,a=e.returnPartialData,c=void 0===a||a,u=e.canonizeResults,d=void 0===u?this.config.canonizeResults:u,p=this.config.cache.policies;s=(0,r.Cl)((0,r.Cl)({},(0,y.wY)((0,y.AT)(n))),s);var m,g=(0,f.WU)(i),v=this.executeSelectionSet({selectionSet:(0,y.Vn)(n).selectionSet,objectOrReference:g,enclosingRef:g,context:(0,r.Cl)({store:t,query:n,policies:p,variables:s,varString:(0,h.M)(s),canonizeResults:d},(0,_.lq)(n,this.config.fragments))});if(v.missing&&(m=[new l.Z(G(v.missing),v.missing,n,s)],!c))throw m[0];return{result:v.result,complete:!m,missing:m}},e.prototype.isFresh=function(e,t,n,r){if(D(r.store)&&this.knownResults.get(e)===n){var o=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(o&&e===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,s=e.context;if((0,f.A_)(r)&&!s.policies.rootTypenamesById[r.__ref]&&!s.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var a,l=s.variables,c=s.policies,d=s.store.getFieldValue(r,"__typename"),h=[],p=new b.ZI;function g(e,t){var n;return e.missing&&(a=p.merge(a,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"===typeof d&&!c.rootIdsByTypename[d]&&h.push({__typename:d});var v=new Set(n.selections);v.forEach((function(e){var n,y;if((0,x.MS)(e,l))if((0,f.dt)(e)){var b=c.readField({fieldName:e.name.value,field:e,variables:s.variables,from:r},s),S=(0,f.ue)(e);void 0===b?u.XY.added(e)||(a=p.merge(a,((n={})[S]="Can't find field '".concat(e.name.value,"' on ").concat((0,f.A_)(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):(0,F.c)(b)?b=g(t.executeSubSelectedArray({field:e,array:b,enclosingRef:i,context:s}),S):e.selectionSet?null!=b&&(b=g(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:b,enclosingRef:(0,f.A_)(b)?b:i,context:s}),S)):s.canonizeResults&&(b=t.canon.pass(b)),void 0!==b&&h.push(((y={})[S]=b,y))}else{var C=(0,w.HQ)(e,s.lookupFragment);if(!C&&e.kind===m.b.FRAGMENT_SPREAD)throw(0,o.vA)(9,e.name.value);C&&c.fragmentMatches(C,d)&&C.selectionSet.selections.forEach(v.add,v)}}));var y={result:(0,b.IM)(h),missing:a},C=s.canonizeResults?this.canon.admit(y):(0,S.G)(y);return C.result&&this.knownResults.set(C.result,n),C},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,s=e.enclosingRef,a=e.context,l=new b.ZI;function c(e,n){var r;return e.missing&&(t=l.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:(0,F.c)(e)?c(n.executeSubSelectedArray({field:r,array:e,enclosingRef:s,context:a}),t):r.selectionSet?c(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:(0,f.A_)(e)?e:s,context:a}),t):(!1!==globalThis.__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){(0,C.U)(n)&&((0,o.V1)(!(0,f.A_)(n),10,(0,_.Ui)(e,n),t.name.value),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function G(e){try{JSON.stringify(e,(function(e,t){if("string"===typeof t)throw t;return t}))}catch(t){return t}}var $=n(2596),q=n(1589),z=n(2499),V=Object.create(null);function H(e){var t=JSON.stringify(e);return V[t]||(V[t]=Object.create(null))}function W(e){var t=H(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=Q(e,(function(e){var i=X(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&_.$3.call(t,e[0])&&(i=X(t,e,K)),(0,o.V1)(void 0!==i,4,e.join("."),t),i}));return"".concat(n.typename,":").concat(JSON.stringify(i))})}function Y(e){var t=H(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,o=n.variables,i=n.fieldName,s=Q(e,(function(e){var n=e[0],i=n.charAt(0);if("@"!==i)if("$"!==i){if(t)return X(t,e)}else{var s=n.slice(1);if(o&&_.$3.call(o,s)){var a=e.slice(0);return a[0]=s,X(o,a)}}else if(r&&(0,F.E)(r.directives)){var l=n.slice(1),c=r.directives.find((function(e){return e.name.value===l})),u=c&&(0,f.MB)(c,o);return u&&X(u,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(i+=":"+a),i})}function Q(e,t){var n=new b.ZI;return J(e).reduce((function(e,r){var o,i=t(r);if(void 0!==i){for(var s=r.length-1;s>=0;--s)(o={})[r[s]]=i,i=o;e=n.merge(e,i)}return e}),Object.create(null))}function J(e){var t=H(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,o){(0,F.c)(t)?(J(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),(0,F.c)(e[o+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function K(e,t){return e[t]}function X(e,t,n){return n=n||K,Z(t.reduce((function e(t,r){return(0,F.c)(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function Z(e){return(0,C.U)(e)?(0,F.c)(e)?e.map(Z):Q(Object.keys(e).sort(),(function(t){return X(e,t)})):e}function ee(e){return void 0!==e.args?e.args:e.field?(0,f.MB)(e.field,e.variables):null}var te=function(){},ne=function(e,t){return t.fieldName},re=function(e,t,n){return(0,n.mergeObjects)(e,t)},oe=function(e,t){return t},ie=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,r.Cl)({dataIdFromObject:_.or},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,o=this,i=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,l=(0,r.Cl)((0,r.Cl)({},t),{typename:i,storeObject:a,readField:t&&t.readField||function(){var e=ae(arguments,a);return o.readField(e,{store:o.cache.data,variables:e.variables})}}),c=i&&this.getTypePolicy(i),u=c&&c.keyFn||this.config.dataIdFromObject;u;){var d=u((0,r.Cl)((0,r.Cl)({},e),a),l);if(!(0,F.c)(d)){s=d;break}u=W(d)}return s=s?String(s):void 0,l.keyObject?[s,l.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var o=e[n],i=o.queryType,s=o.mutationType,a=o.subscriptionType,l=(0,r.Tt)(o,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),s&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),_.$3.call(t.toBeAdded,n)?t.toBeAdded[n].push(l):t.toBeAdded[n]=[l]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),o=t.keyFields,i=t.fields;function s(e,t){e.merge="function"===typeof t?t:!0===t?re:!1===t?oe:e.merge}s(r,t.merge),r.keyFn=!1===o?te:(0,F.c)(o)?W(o):"function"===typeof o?o:r.keyFn,i&&Object.keys(i).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),o=i[t];if("function"===typeof o)r.read=o;else{var a=o.keyArgs,l=o.read,c=o.merge;r.keyFn=!1===a?ne:(0,F.c)(a)?Y(a):"function"===typeof a?a:r.keyFn,"function"===typeof l&&(r.read=l),s(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||ne)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&((0,o.V1)(!r||r===e,5,e),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(_.gk);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!_.$3.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var o=this.supertypeMap.get(e);!o&&this.fuzzySubtypes.size&&(o=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((function(n,r){if(n.test(e)){var i=t.supertypeMap.get(r);i&&i.forEach((function(e){return o.add(e)}))}}))),o&&o.size&&o.forEach((function(e){var o=t.getTypePolicy(e),i=o.fields,s=(0,r.Tt)(o,["fields"]);Object.assign(n,s),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var s=e.typeCondition.name.value;if(t===s)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(s))for(var a=this.getSupertypeSet(t,!0),l=[a],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&l.indexOf(t)<0&&l.push(t)},u=!(!n||!this.fuzzySubtypes.size),d=!1,h=0;h<l.length;++h){var p=l[h];if(p.has(s))return a.has(s)||(d&&!1!==globalThis.__DEV__&&o.V1.warn(6,t,s),a.add(s)),!0;p.forEach(c),u&&h===l.length-1&&(0,_.T9)(e.selectionSet,n,r)&&(u=!1,d=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&c(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,o=this.getFieldPolicy(n,r,!1),i=o&&o.keyFn;if(i&&n)for(var s={typename:n,fieldName:r,field:e.field||null,variables:e.variables},a=ee(e);i;){var l=i(a,s);if(!(0,F.c)(l)){t=l||r;break}i=Y(l)}return void 0===t&&(t=e.field?(0,f.Ii)(e.field,e.variables):(0,f.o5)(r,ee(e))),!1===t?r:r===(0,_.iJ)(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var o=this.getStoreFieldName(e),i=(0,_.iJ)(o),s=t.store.getFieldValue(n,o),a=this.getFieldPolicy(e.typename,i,!1),l=a&&a.read;if(l){var c=se(this,n,e,t,t.store.getStorage((0,f.A_)(n)?n.__ref:n,o));return z.bl.withValue(this.cache,l,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),o=r&&r.merge;return!o&&n&&(o=(r=this.getTypePolicy(n))&&r.merge),o},e.prototype.runMergeFunction=function(e,t,n,r,o){var i=n.field,s=n.typename,a=n.merge;return a===re?le(r.store)(e,t):a===oe?t:(r.overwrite&&(e=void 0),a(e,t,se(this,void 0,{typename:s,fieldName:i.name.value,field:i,variables:r.variables},r,o||Object.create(null))))},e}();function se(e,t,n,r,o){var i=e.getStoreFieldName(n),s=(0,_.iJ)(i),a=n.variables||r.variables,l=r.store,c=l.toReference,u=l.canRead;return{args:ee(n),field:n.field||null,fieldName:s,storeFieldName:i,variables:a,isReference:f.A_,toReference:c,storage:o,cache:e.cache,canRead:u,readField:function(){return e.readField(ae(arguments,t,a),r)},mergeObjects:le(r.store)}}function ae(e,t,n){var i,s=e[0],a=e[1],l=e.length;return"string"===typeof s?i={fieldName:s,from:l>1?a:t}:(i=(0,r.Cl)({},s),_.$3.call(i,"from")||(i.from=t)),!1!==globalThis.__DEV__&&void 0===i.from&&!1!==globalThis.__DEV__&&o.V1.warn(7,(0,q.p)(Array.from(e))),void 0===i.variables&&(i.variables=n),i}function le(e){return function(t,n){if((0,F.c)(t)||(0,F.c)(n))throw(0,o.vA)(8);if((0,C.U)(t)&&(0,C.U)(n)){var i=e.getFieldValue(t,"__typename"),s=e.getFieldValue(n,"__typename");if(i&&s&&i!==s)return n;if((0,f.A_)(t)&&(0,_.d1)(n))return e.merge(t.__ref,n),t;if((0,_.d1)(t)&&(0,f.A_)(n))return e.merge(t,n.__ref),n;if((0,_.d1)(t)&&(0,_.d1)(n))return(0,r.Cl)((0,r.Cl)({},t),n)}return n}}function ce(e,t,n){var o="".concat(t).concat(n),i=e.flavors.get(o);return i||e.flavors.set(o,i=e.clientOnly===t&&e.deferred===n?e:(0,r.Cl)((0,r.Cl)({},e),{clientOnly:t,deferred:n})),i}var ue=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,i=t.query,a=t.result,l=t.dataId,c=t.variables,u=t.overwrite,d=(0,y.Vu)(i),p=(0,_.mv)();c=(0,r.Cl)((0,r.Cl)({},(0,y.wY)(d)),c);var m=(0,r.Cl)((0,r.Cl)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:(0,h.M)(c)},(0,_.lq)(i,this.fragments)),{overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),g=this.processSelectionSet({result:a||Object.create(null),dataId:l,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:m});if(!(0,f.A_)(g))throw(0,o.vA)(11,a);return m.incomingById.forEach((function(t,r){var i=t.storeObject,a=t.mergeTree,l=t.fieldNodeSet,c=(0,f.WU)(r);if(a&&a.map.size){var u=n.applyMerges(a,c,i,m);if((0,f.A_)(u))return;i=u}if(!1!==globalThis.__DEV__&&!m.overwrite){var d=Object.create(null);l.forEach((function(e){e.selectionSet&&(d[e.name.value]=!0)}));Object.keys(i).forEach((function(e){(function(e){return!0===d[(0,_.iJ)(e)]})(e)&&!function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"===typeof t&&t},a=i(e);if(!a)return;var l=i(t);if(!l)return;if((0,f.A_)(a))return;if((0,s.L)(a,l))return;if(Object.keys(a).every((function(e){return void 0!==r.getFieldValue(l,e)})))return;var c=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=(0,_.iJ)(n),d="".concat(c,".").concat(u);if(ge.has(d))return;ge.add(d);var h=[];(0,F.c)(a)||(0,F.c)(l)||[a,l].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!==typeof t||h.includes(t)||h.push(t)}));!1!==globalThis.__DEV__&&o.V1.warn(14,u,c,h.length?"either ensure all objects of type "+h.join(" and ")+" have an ID or a custom merge function, or ":"",d,a,l)}(c,i,e,m.store)}))}e.merge(r,i)})),e.retain(g.__ref),g},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,s=e.selectionSet,a=e.context,l=e.mergeTree,c=this.cache.policies,d=Object.create(null),h=n&&c.rootTypenamesById[n]||(0,f.D$)(i,s,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"===typeof h&&(d.__typename=h);var p=function(){var e=ae(arguments,d,a.variables);if((0,f.A_)(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=c.readField((0,r.Cl)((0,r.Cl)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return c.readField(e,a)},m=new Set;this.flattenFields(s,i,a,h).forEach((function(e,n){var r,s=(0,f.ue)(n),a=i[s];if(m.add(n),void 0!==a){var g=c.getStoreFieldName({typename:h,fieldName:n.name.value,field:n,variables:e.variables}),v=he(l,g),y=t.processFieldValue(a,n,n.selectionSet?ce(e,!1,!1):e,v),b=void 0;n.selectionSet&&((0,f.A_)(y)||(0,_.d1)(y))&&(b=p("__typename",y));var x=c.getMergeFunction(h,n.name.value,b);x?v.info={field:n,typename:h,merge:x}:me(l,g),d=e.merge(d,((r={})[g]=y,r))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||u.XY.added(n)||c.getReadFunction(h,n.name.value)||!1!==globalThis.__DEV__&&o.V1.error(12,(0,f.ue)(n),i)}));try{var g=c.identify(i,{typename:h,selectionSet:s,fragmentMap:a.fragmentMap,storeObject:d,readField:p}),v=g[0],y=g[1];n=n||v,y&&(d=a.merge(d,y))}catch(S){if(!n)throw S}if("string"===typeof n){var b=(0,f.WU)(n),x=a.written[n]||(a.written[n]=[]);if(x.indexOf(s)>=0)return b;if(x.push(s),this.reader&&this.reader.isFresh(i,b,s,a))return b;var w=a.incomingById.get(n);return w?(w.storeObject=a.merge(w.storeObject,d),w.mergeTree=pe(w.mergeTree,l),m.forEach((function(e){return w.fieldNodeSet.add(e)}))):a.incomingById.set(n,{storeObject:d,mergeTree:fe(l)?void 0:l,fieldNodeSet:m}),b}return d},e.prototype.processFieldValue=function(e,t,n,r){var o=this;return t.selectionSet&&null!==e?(0,F.c)(e)?e.map((function(e,i){var s=o.processFieldValue(e,t,n,he(r,i));return me(r,i),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):!1!==globalThis.__DEV__?(0,$.m)(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=(0,f.D$)(t,e,n.fragmentMap));var i=new Map,s=this.cache.policies,a=new j.b(!1);return function e(l,c){var u=a.lookup(l,c.clientOnly,c.deferred);u.visited||(u.visited=!0,l.selections.forEach((function(a){if((0,x.MS)(a,n.variables)){var l=c.clientOnly,u=c.deferred;if(l&&u||!(0,F.E)(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(l=!0),"defer"===t){var r=(0,f.MB)(e,n.variables);r&&!1===r.if||(u=!0)}})),(0,f.dt)(a)){var d=i.get(a);d&&(l=l&&d.clientOnly,u=u&&d.deferred),i.set(a,ce(n,l,u))}else{var h=(0,w.HQ)(a,n.lookupFragment);if(!h&&a.kind===m.b.FRAGMENT_SPREAD)throw(0,o.vA)(13,a.name.value);h&&s.fragmentMatches(h,r,t,n.variables)&&e(h.selectionSet,ce(n,l,u))}}})))}(e,n),i},e.prototype.applyMerges=function(e,t,n,i,s){var a,l=this;if(e.map.size&&!(0,f.A_)(n)){var c,u=(0,F.c)(n)||!(0,f.A_)(t)&&!(0,_.d1)(t)?void 0:t,d=n;u&&!s&&(s=[(0,f.A_)(u)?u.__ref:u]);var h=function(e,t){return(0,F.c)(e)?"number"===typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=h(u,t),r=h(d,t);if(void 0!==r){s&&s.push(t);var a=l.applyMerges(e,n,r,i,s);a!==r&&(c=c||new Map).set(t,a),s&&(0,o.V1)(s.pop()===t)}})),c&&(n=(0,F.c)(d)?d.slice(0):(0,r.Cl)({},d),c.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,s&&(a=i.store).getStorage.apply(a,s)):n},e}(),de=[];function he(e,t){var n=e.map;return n.has(t)||n.set(t,de.pop()||{map:new Map}),n.get(t)}function pe(e,t){if(e===t||!t||fe(t))return e;if(!e||fe(e))return t;var n=e.info&&t.info?(0,r.Cl)((0,r.Cl)({},e.info),t.info):e.info||t.info,o=e.map.size&&t.map.size,i={info:n,map:o?new Map:e.map.size?e.map:t.map};if(o){var s=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,pe(e,t.map.get(n))),s.delete(n)})),s.forEach((function(n){i.map.set(n,pe(t.map.get(n),e.map.get(n)))}))}return i}function fe(e){return!e||!(e.info||e.map.size)}function me(e,t){var n=e.map,r=n.get(t);r&&fe(r)&&(de.push(r),n.delete(t))}var ge=new Set;var ve=n(2172),ye=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new c.c(u.XY),n.assumeImmutableResults=!0,n.makeVar=z.UT,n.txCount=0,n.config=(0,_.I6)(t),n.addTypename=!!n.config.addTypename,n.policies=new ie({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,r.C6)(t,e),t.prototype.init=function(){var e=this.data=new T.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new ue(this,this.storeReader=new U({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:(0,_.Xx)(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=(0,i.LV)((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize||d.v["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(D(n)){var r=e.optimistic,o=e.id,i=e.variables;return n.makeCacheKey(e.query,e.callback,(0,h.M)({optimistic:r,id:o,variables:i}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,r.Cl)((0,r.Cl)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(o){if(o instanceof l.Z)return null;throw o}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(_.$3.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,r.Cl)((0,r.Cl)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,z.MS)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,z.WR)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){var t;h.M.reset(),p.y.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var n=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),n},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,f.A_)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){!1!==globalThis.__DEV__&&o.V1.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(_.$3.call(e,"id"))return!1;e=(0,r.Cl)((0,r.Cl)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),h.M.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),(0,z.WR)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,o=e.update,i=e.optimistic,s=void 0===i||i,a=e.removeOptimistic,l=e.onWatchUpdated,c=function(e){var r=n,i=r.data,s=r.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=o(n)}finally{--n.txCount,n.data=i,n.optimisticData=s}},u=new Set;return l&&!this.txCount&&this.broadcastWatches((0,r.Cl)((0,r.Cl)({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"===typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"===typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),l&&u.size?(this.broadcastWatches((0,r.Cl)((0,r.Cl)({},e),{onWatchUpdated:function(e,t){var n=l.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"===typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&(0,s.L)(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(a.k);!1!==globalThis.__DEV__&&(ye.prototype.getMemoryInternals=ve.cM)},2499:(e,t,n)=>{"use strict";n.d(t,{MS:()=>l,UT:()=>c,WR:()=>a,bl:()=>o});var r=n(9238),o=new r.DX,i=new WeakMap;function s(e){var t=i.get(e);return t||i.set(e,t={vars:new Set,dep:(0,r.yN)()}),t}function a(e){s(e).vars.forEach((function(t){return t.forgetCache(e)}))}function l(e){s(e).vars.forEach((function(t){return t.attachCache(e)}))}function c(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach((function(e){s(e).dep.dirty(r),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var l=Array.from(n);n.clear(),l.forEach((function(t){return t(e)}))}}else{var c=o.getValue();c&&(i(c),s(c).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),s(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}},2526:(e,t,n)=>{"use strict";n.d(t,{R:()=>Z});var r=n(6326),o=n(7484),i=n(7320),s=n(892),a=n(9358),l=n(3978),c=n(4902),u=n(2490),d=n(3985),h=n(2935),p=n(9776),f=n(4704),m=n(6800);function g(e,t,n){return new m.c((function(r){var o={then:function(e){return new Promise((function(t){return t(e())}))}};function i(e,t){return function(n){if(e){var i=function(){return r.closed?0:e(n)};o=o.then(i,i).then((function(e){return r.next(e)}),(function(e){return r.error(e)}))}else r[t](n)}}var s={next:i(t,"next"),error:i(n,"error"),complete:function(){o.then((function(){return r.complete()}))}},a=e.subscribe(s);return function(){return a.unsubscribe()}}))}var v=n(8829);function y(e){var t=b(e);return(0,v.E)(t)}function b(e){var t=(0,v.E)(e.errors)?e.errors.slice(0):[];return(0,u.ST)(e)&&(0,v.E)(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var x=n(1955),w=n(9761),S=n(659),C=n(3559),j=n(8719),_=n(8238);function k(e){return e&&"function"===typeof e.then}var N=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),(0,j.w)(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),(0,j.w)(n.observers,"error",e))},complete:function(){var e=n,t=e.sub,r=e.sources;if(null!==t){var o=(void 0===r?[]:r).shift();o?k(o)?o.then((function(e){return n.sub=e.subscribe(n.handlers)}),n.handlers.error):n.sub=o.subscribe(n.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),(0,j.w)(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"===typeof t&&(t=[new m.c(t)]),k(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return(0,r.C6)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach((function(n){return n(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(n,r){t||(t=!0,e(n,r))}))},t}(m.c);(0,_.r)(N);var E=n(7832),T=n(9493),O=n(1388),I=n(9182),R=n(4705);function A(e){return e.kind===R.b.FIELD||e.kind===R.b.FRAGMENT_SPREAD||e.kind===R.b.INLINE_FRAGMENT}var M=n(421),P=n(3094),D=n(2499),F=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,o=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,M.D9)(t.resolvers,e)})):this.resolvers=(0,M.D9)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,o=e.context,i=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,o,i,this.fragmentMatcher,a).then((function(e){return(0,r.Cl)((0,r.Cl)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,d.d8)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,h.er)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,r.Cl)((0,r.Cl)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(o){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return(0,r.Cl)((0,r.Cl)({},t),e.exportedVariables)}))]:[2,(0,r.Cl)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,I.YR)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return I.sP}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,h.zc)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,o,i,s){return void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=function(){return!0}),void 0===s&&(s=!1),(0,r.sH)(this,void 0,void 0,(function(){var a,l,c,u,d,h,p,f,m,g;return(0,r.YH)(this,(function(v){return a=(0,x.Vn)(e),l=(0,x.zK)(e),c=(0,P.JG)(l),u=this.collectSelectionsToResolve(a,c),d=a.operation,h=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",f=(p=this).cache,m=p.client,g={fragmentMap:c,context:(0,r.Cl)((0,r.Cl)({},n),{cache:f,client:m}),variables:o,fragmentMatcher:i,defaultOperationType:h,exportedVariables:{},selectionsToResolve:u,onlyRunForcedResolvers:s},!1,[2,this.resolveSelectionSet(a.selectionSet,false,t,g).then((function(e){return{result:e,exportedVariables:g.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n,i){return(0,r.sH)(this,void 0,void 0,(function(){var s,a,l,c,u,h=this;return(0,r.YH)(this,(function(p){return s=i.fragmentMap,a=i.context,l=i.variables,c=[n],u=function(e){return(0,r.sH)(h,void 0,void 0,(function(){var u,h;return(0,r.YH)(this,(function(r){return(t||i.selectionsToResolve.has(e))&&(0,d.MS)(e,l)?(0,w.dt)(e)?[2,this.resolveField(e,t,n,i).then((function(t){var n;"undefined"!==typeof t&&c.push(((n={})[(0,w.ue)(e)]=t,n))}))]:((0,w.kd)(e)?u=e:(u=s[e.name.value],(0,o.V1)(u,18,e.name.value)),u&&u.typeCondition&&(h=u.typeCondition.name.value,i.fragmentMatcher(n,h,a))?[2,this.resolveSelectionSet(u.selectionSet,t,n,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(u)).then((function(){return(0,M.IM)(c)}))]}))}))},e.prototype.resolveField=function(e,t,n,o){return(0,r.sH)(this,void 0,void 0,(function(){var i,s,a,l,c,u,d,h,p,f=this;return(0,r.YH)(this,(function(r){return n?(i=o.variables,s=e.name.value,a=(0,w.ue)(e),l=s!==a,c=n[a]||n[s],u=Promise.resolve(c),o.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=n.__typename||o.defaultOperationType,(h=this.resolvers&&this.resolvers[d])&&(p=h[l?s:a])&&(u=Promise.resolve(D.bl.withValue(this.cache,p,[n,(0,w.MB)(e,i),o.context,{field:e,fragmentMap:o.fragmentMap}])))),[2,u.then((function(n){var r,i;if(void 0===n&&(n=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(o.exportedVariables[e.value.value]=n)}))})),!e.selectionSet)return n;if(null==n)return n;var s=null!==(i=null===(r=e.directives)||void 0===r?void 0:r.some((function(e){return"client"===e.name.value})))&&void 0!==i&&i;return Array.isArray(n)?f.resolveSubSelectedArray(e,t||s,n,o):e.selectionSet?f.resolveSelectionSet(e.selectionSet,t||s,n,o):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var o=this;return Promise.all(n.map((function(n){return null===n?null:Array.isArray(n)?o.resolveSubSelectedArray(e,t,n,r):e.selectionSet?o.resolveSelectionSet(e.selectionSet,t,n,r):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;return function e(i){if(!r.has(i)){var s=new Set;r.set(i,s),(0,I.YR)(i,{Directive:function(e,t,r,o,i){"client"===e.name.value&&i.forEach((function(e){n(e)&&A(e)&&s.add(e)}))},FragmentSpread:function(r,i,a,l,c){var u=t[r.name.value];(0,o.V1)(u,19,r.name.value);var d=e(u);d.size>0&&(c.forEach((function(e){n(e)&&A(e)&&s.add(e)})),s.add(r),d.forEach((function(e){s.add(e)})))}})}return r.get(i)}(e)},e}(),L=new(n(2622).et?WeakMap:Map);function B(e,t){var n=e[t];"function"===typeof n&&(e[t]=function(){return L.set(e,(L.get(e)+1)%1e15),n.apply(this,arguments)})}function U(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var G=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;L.has(n)||(L.set(n,0),B(n,"evict"),B(n,"modify"),B(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||O.pT.loading;return this.variables&&this.networkStatus!==O.pT.loading&&!(0,c.L)(this.variables,e.variables)&&(t=O.pT.setVariables),(0,c.L)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){U(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,c.L)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,n=this,r=this.lastDiff&&this.lastDiff.diff;(!e||e.complete||(null===(t=this.observableQuery)||void 0===t?void 0:t.options.returnPartialData)||r&&r.complete)&&(this.updateLastDiff(e),this.dirty||(0,c.L)(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return n.notify()}),0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():(0,T.e8)(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;U(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,O.bi)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var o=(0,r.Cl)((0,r.Cl)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,c.L)(o,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=o))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===L.get(this.cache)&&(0,c.L)(t,n.variables)&&(0,c.L)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var o=this,i=new M.ZI,s=(0,v.E)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,v.E)(e.incremental)){var a=(0,u.bd)(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var l=this.getDiff();e.data=i.merge(l.result,e.data)}this.graphQLErrors=s,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&($(e,n.errorPolicy)?this.cache.performTransaction((function(i){if(o.shouldWrite(e,n.variables))i.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),o.lastWrite={result:e,variables:n.variables,dmCount:L.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete)return void(e.data=o.lastDiff.diff.result);var s=o.getDiffOptions(n.variables),a=i.diff(s);!o.stopped&&(0,c.L)(o.variables,n.variables)&&o.updateWatch(n.variables),o.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=O.pT.ready},e.prototype.markError=function(e){return this.networkStatus=O.pT.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function $(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!y(e);return!r&&n&&e.data&&(r=!0),r}var q=n(2920),z=n(5730),V=n(4376),H=n(4273),W=Object.prototype.hasOwnProperty,Y=Object.create(null),Q=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,o=e.documentTransform,i=e.queryDeduplication,s=void 0!==i&&i,a=e.onBroadcast,l=e.ssrMode,c=void 0!==l&&l,u=e.clientAwareness,d=void 0===u?{}:u,h=e.localState,p=e.assumeImmutableResults,m=void 0===p?!!t.assumeImmutableResults:p,g=e.defaultContext,v=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new V.A(H.v["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new z.b(!1);var y=new f.c((function(e){return v.cache.transformDocument(e)}),{cache:!1});this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=s,this.clientAwareness=d,this.localState=h||new F({cache:t}),this.ssrMode=c,this.assumeImmutableResults=m,this.documentTransform=o?y.concat(o).concat(y):y,this.defaultContext=g||Object.create(null),(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches((0,o.vA)(25))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,i=e.mutation,s=e.variables,a=e.optimisticResponse,l=e.updateQueries,c=e.refetchQueries,u=void 0===c?[]:c,d=e.awaitRefetchQueries,h=void 0!==d&&d,p=e.update,f=e.onQueryUpdated,m=e.fetchPolicy,v=void 0===m?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":m,x=e.errorPolicy,w=void 0===x?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":x,S=e.keepRootFields,C=e.context;return(0,r.sH)(this,void 0,void 0,(function(){var e,t,n,c,d;return(0,r.YH)(this,(function(m){switch(m.label){case 0:return(0,o.V1)(i,26),(0,o.V1)("network-only"===v||"no-cache"===v,27),e=this.generateMutationId(),i=this.cache.transformForLink(this.transform(i)),t=this.getDocumentInfo(i).hasClientExports,s=this.getVariables(i,s),t?[4,this.localState.addExportedVariables(i,s,C)]:[3,2];case 1:s=m.sent(),m.label=2;case 2:return n=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:s,loading:!0,error:null}),c=a&&this.markMutationOptimistic(a,{mutationId:e,document:i,variables:s,fetchPolicy:v,errorPolicy:w,context:C,updateQueries:l,update:p,keepRootFields:S}),this.broadcastQueries(),d=this,[2,new Promise((function(t,o){return g(d.getObservableFromLink(i,(0,r.Cl)((0,r.Cl)({},C),{optimisticResponse:c?a:void 0}),s,!1),(function(t){if(y(t)&&"none"===w)throw new E.K4({graphQLErrors:b(t)});n&&(n.loading=!1,n.error=null);var o=(0,r.Cl)({},t);return"function"===typeof u&&(u=u(o)),"ignore"===w&&y(o)&&delete o.errors,d.markMutationResult({mutationId:e,result:o,document:i,variables:s,fetchPolicy:v,errorPolicy:w,context:C,update:p,updateQueries:l,awaitRefetchQueries:h,refetchQueries:u,removeOptimistic:c?e:void 0,onQueryUpdated:f,keepRootFields:S})})).subscribe({next:function(e){d.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){n&&(n.loading=!1,n.error=t),c&&d.cache.removeOptimistic(e),d.broadcastQueries(),o(t instanceof E.K4?t:new E.K4({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var o=e.result,i=[],s="no-cache"===e.fetchPolicy;if(!s&&$(o,e.errorPolicy)){if((0,u.ST)(o)||i.push({result:o.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,u.ST)(o)&&(0,v.E)(o.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;a.result&&(l=(0,u.bd)(a.result,o)),"undefined"!==typeof l&&(o.data=l,i.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,r){var s=e.observableQuery,a=s&&s.queryName;if(a&&W.call(c,a)){var l=c[a],u=n.queries.get(r),d=u.document,h=u.variables,p=t.diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),f=p.result;if(p.complete&&f){var m=l(f,{mutationResult:o,queryName:d&&(0,x.n4)(d)||void 0,queryVariables:h});m&&i.push({result:m,dataId:"ROOT_QUERY",query:d,variables:h})}}}))}if(i.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(t){s||i.forEach((function(e){return t.write(e)}));var a=e.update,l=!(0,u.YX)(o)||(0,u.ST)(o)&&!o.hasNext;if(a){if(!s){var c=t.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&("incremental"in(o=(0,r.Cl)((0,r.Cl)({},o),{data:c.result}))&&delete o.incremental,"hasNext"in o&&delete o.hasNext)}l&&a(t,o,{context:e.context,variables:e.variables})}s||e.keepRootFields||!l||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return d.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then((function(){return o}))}return Promise.resolve(o)},e.prototype.markMutationOptimistic=function(e,t){var n=this,i="function"===typeof e?e(t.variables,{IGNORE:Y}):e;return i!==Y&&(this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult((0,r.Cl)((0,r.Cl)({},t),{result:{data:i}}),e)}catch(s){!1!==globalThis.__DEV__&&o.V1.error(s)}}),t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:(0,d.f2)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,d.d8)(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,h.iz)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:(0,x.wY)((0,x.Vu)(e)),asQuery:(0,r.Cl)((0,r.Cl)({},e),{definitions:e.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,r.Cl)((0,r.Cl)({},e),{operation:"query"}):e}))})};t.set(e,n)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,r.Cl)((0,r.Cl)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);"undefined"===typeof(e=(0,r.Cl)((0,r.Cl)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=new G(this),o=new T.U5({queryManager:this,queryInfo:n,options:e});return o.lastQuery=t,this.queries.set(o.queryId,n),n.init({document:t,observableQuery:o,variables:o.variables}),o},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),(0,o.V1)(e.query,28),(0,o.V1)("Document"===e.query.kind,29),(0,o.V1)(!e.returnPartialData,30),(0,o.V1)(!e.pollInterval,31),this.fetchQuery(t,(0,r.Cl)((0,r.Cl)({},e),{query:this.transform(e.query)})).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,o.vA)(32)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=O.pT.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,i=new Map,s=new Set;return Array.isArray(e)&&e.forEach((function(e){"string"===typeof e?i.set(e,!1):(0,w.Kc)(e)?i.set(t.transform(e),!1):(0,S.U)(e)&&e.query&&s.add(e)})),this.queries.forEach((function(t,r){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void n.set(r,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(n.set(r,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),s.size&&s.forEach((function(e){var i=(0,C.v)("legacyOneTimeQuery"),s=t.getQuery(i).init({document:e.query,variables:e.variables}),a=new T.U5({queryManager:t,queryInfo:s,options:(0,r.Cl)((0,r.Cl)({},e),{fetchPolicy:"network-only"})});(0,o.V1)(a.queryId===i),s.setObservableQuery(a),n.set(i,a)})),!1!==globalThis.__DEV__&&i.size&&i.forEach((function(e,t){e||!1!==globalThis.__DEV__&&o.V1.warn("string"===typeof t?33:34,t)})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,o){var i=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==i&&"cache-only"!==i)&&n.push(r.refetch()),t.getQuery(o).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,o=e.errorPolicy,i=void 0===o?"none":o,s=e.variables,a=e.context,l=void 0===a?{}:a;n=this.transform(n),s=this.getVariables(n,s);var c=function(e){return t.getObservableFromLink(n,l,e).map((function(o){"no-cache"!==r&&($(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var s=y(o),a=(0,E.uR)(o);if(s||a){var l={};if(s&&(l.graphQLErrors=o.errors),a&&(l.protocolErrors=o.extensions[E.K$]),"none"===i||a)throw new E.K4(l)}return"ignore"===i&&delete o.errors,o}))};if(this.getDocumentInfo(n).hasClientExports){var u=this.localState.addExportedVariables(n,s,l).then(c);return new m.c((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return c(s)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,o){var i,a,l=this;void 0===o&&(o=null!==(i=null===t||void 0===t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var c=this.getDocumentInfo(e),u=c.serverQuery,d=c.clientQuery;if(u){var h=this.inFlightLinkObservables,f=this.link,v={query:u,variables:n,operationName:(0,x.n4)(u)||void 0,context:this.prepareContext((0,r.Cl)((0,r.Cl)({},t),{forceFetch:!o}))};if(t=v.context,o){var y=(0,q.y)(u),b=(0,p.M)(n),w=h.lookup(y,b);if(!(a=w.observable)){var S=new N([(0,s.g)(f,v)]);a=w.observable=S,S.beforeNext((function(){h.remove(y,b)}))}}else a=new N([(0,s.g)(f,v)])}else a=new N([m.c.of({data:{}})]),t=this.prepareContext(t);return d&&(a=g(a,(function(e){return l.localState.runResolvers({document:d,remoteResult:e,context:t,variables:n})}))),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(n.query);return g(this.getObservableFromLink(o,n.context,n.variables),(function(i){var s=b(i),a=s.length>0;if(r>=e.lastRequestId){if(a&&"none"===n.errorPolicy)throw e.markError(new E.K4({graphQLErrors:s}));e.markResult(i,o,n,t),e.markReady()}var l={data:i.data,loading:!1,networkStatus:O.pT.ready};return a&&"ignore"!==n.errorPolicy&&(l.errors=s,l.networkStatus=O.pT.error),l}),(function(t){var n=(0,E.Mn)(t)?t:new E.K4({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchConcastWithInfo=function(e,t,n,r){var o=this;void 0===n&&(n=O.pT.loading),void 0===r&&(r=t.query);var i,s,a=this.getVariables(r,t.variables),l=this.getQuery(e),c=this.defaultOptions.watchQuery,u=t.fetchPolicy,d=void 0===u?c&&c.fetchPolicy||"cache-first":u,h=t.errorPolicy,p=void 0===h?c&&c.errorPolicy||"none":h,f=t.returnPartialData,m=void 0!==f&&f,g=t.notifyOnNetworkStatusChange,v=void 0!==g&&g,y=t.context,b=void 0===y?{}:y,x=Object.assign({},t,{query:r,variables:a,fetchPolicy:d,errorPolicy:p,returnPartialData:m,notifyOnNetworkStatusChange:v,context:b}),w=function(e){x.variables=e;var r=o.fetchQueryByPolicy(l,x,n);return"standby"!==x.fetchPolicy&&r.sources.length>0&&l.observableQuery&&l.observableQuery.applyNextFetchPolicy("after-fetch",t),r},S=function(){return o.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,(function(e){S(),setTimeout((function(){return i.cancel(e)}))})),this.getDocumentInfo(x.query).hasClientExports)i=new N(this.localState.addExportedVariables(x.query,x.variables,x.context).then(w).then((function(e){return e.sources}))),s=!0;else{var C=w(x.variables);s=C.fromLink,i=new N(C.sources)}return i.promise.then(S,S),{concast:i,fromLink:s}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,o=e.optimistic,i=void 0!==o&&o,s=e.removeOptimistic,a=void 0===s?i?(0,C.v)("refetchQueries"):void 0:s,l=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var u=new Map;return n&&this.cache.batch({update:n,optimistic:i&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof G&&e.watcher.observableQuery;if(r){if(l){c.delete(r.queryId);var o=l(r,t,n);return!0===o&&(o=r.refetch()),!1!==o&&u.set(r,o),o}null!==l&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach((function(e,n){var r,o=e.oq,i=e.lastDiff,s=e.diff;if(l){if(!s){var a=o.queryInfo;a.reset(),s=a.getDiff()}r=l(o,s,i)}l&&!0!==r||(r=o.refetch()),!1!==r&&u.set(o,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),a&&this.cache.removeOptimistic(a),u},e.prototype.fetchQueryByPolicy=function(e,t,n){var o=this,i=t.query,s=t.variables,a=t.fetchPolicy,l=t.refetchWritePolicy,u=t.errorPolicy,d=t.returnPartialData,h=t.context,p=t.notifyOnNetworkStatusChange,f=e.networkStatus;e.init({document:i,variables:s,networkStatus:n});var g=function(){return e.getDiff()},v=function(t,n){void 0===n&&(n=e.networkStatus||O.pT.loading);var a=t.result;!1===globalThis.__DEV__||d||(0,c.L)(a,{})||(0,T.yd)(t.missing);var l=function(e){return m.c.of((0,r.Cl)({data:e,loading:(0,O.bi)(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&o.getDocumentInfo(i).hasForcedResolvers?o.localState.runResolvers({document:i,remoteResult:{data:a},context:h,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return l(e.data||void 0)})):"none"===u&&n===O.pT.refetch&&Array.isArray(t.missing)?l(void 0):l(a)},y="no-cache"===a?0:n===O.pT.refetch&&"merge"!==l?1:2,b=function(){return o.getResultsFromLink(e,y,{query:i,variables:s,context:h,fetchPolicy:a,errorPolicy:u})},x=p&&"number"===typeof f&&f!==n&&(0,O.bi)(n);switch(a){default:case"cache-first":return(w=g()).complete?{fromLink:!1,sources:[v(w,e.markReady())]}:d||x?{fromLink:!0,sources:[v(w),b()]}:{fromLink:!0,sources:[b()]};case"cache-and-network":var w;return(w=g()).complete||d||x?{fromLink:!0,sources:[v(w),b()]}:{fromLink:!0,sources:[b()]};case"cache-only":return{fromLink:!1,sources:[v(g(),e.markReady())]};case"network-only":return x?{fromLink:!0,sources:[v(g()),b()]}:{fromLink:!0,sources:[b()]};case"no-cache":return x?{fromLink:!0,sources:[v(e.getDiff()),b()]}:{fromLink:!0,sources:[b()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new G(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,r.Cl)((0,r.Cl)((0,r.Cl)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}(),J=n(2277),K=n(2172),X=!1,Z=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,o.vA)(15);var n=e.uri,r=e.credentials,s=e.headers,c=e.cache,u=e.documentTransform,d=e.ssrMode,h=void 0!==d&&d,p=e.ssrForceFetchDelay,f=void 0===p?0:p,m=e.connectToDevTools,g=void 0===m?"object"===typeof window&&!window.__APOLLO_CLIENT__&&!1!==globalThis.__DEV__:m,v=e.queryDeduplication,y=void 0===v||v,b=e.defaultOptions,x=e.defaultContext,w=e.assumeImmutableResults,S=void 0===w?c.assumeImmutableResults:w,C=e.resolvers,j=e.typeDefs,_=e.fragmentMatcher,k=e.name,N=e.version,E=e.link;E||(E=n?new l.P({uri:n,credentials:r,headers:s}):i.C.empty()),this.link=E,this.cache=c,this.disableNetworkFetches=h||f>0,this.queryDeduplication=y,this.defaultOptions=b||Object.create(null),this.typeDefs=j,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=a.r,this.localState=new F({cache:c,client:this,resolvers:C,fragmentMatcher:_}),this.queryManager=new Q({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:x,documentTransform:u,queryDeduplication:y,ssrMode:h,clientAwareness:{name:k,version:N},localState:this.localState,assumeImmutableResults:S,onBroadcast:g?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),g&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("object"===typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}X||!1===globalThis.__DEV__||(X=!0,setTimeout((function(){if("undefined"!==typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,n=void 0;"string"===typeof t&&(t.indexOf("Chrome/")>-1?n="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(n="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),n&&!1!==globalThis.__DEV__&&o.V1.log("Download the Apollo DevTools for a better development experience: %s",n)}}),1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,J.l)(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,r.Cl)((0,r.Cl)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,J.l)(this.defaultOptions.query,e)),(0,o.V1)("cache-and-network"!==e.fetchPolicy,16),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,r.Cl)((0,r.Cl)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,J.l)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,s.g)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){!1!==globalThis.__DEV__&&o.V1.debug(17,e)})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(Z.prototype.getMemoryInternals=K.ep)},9493:(e,t,n)=>{"use strict";n.d(t,{U5:()=>S,yd:()=>_,e8:()=>C});var r=n(6326),o=n(7484),i=n(4902),s=n(1388),a=n(1955),l=n(8694),c=n(2596),u=n(8719),d=n(6800),h=n(8238),p=n(3094),f=n(3985),m=n(9761);function g(e,t,n,o){var s=t.data,l=(0,r.Tt)(t,["data"]),c=n.data,u=(0,r.Tt)(n,["data"]);return(0,i.A)(l,u)&&v((0,a.Vn)(e).selectionSet,s,c,{fragmentMap:(0,p.JG)((0,a.zK)(e)),variables:o})}function v(e,t,n,r){if(t===n)return!0;var o=new Set;return e.selections.every((function(e){if(o.has(e))return!0;if(o.add(e),!(0,f.MS)(e,r.variables))return!0;if(y(e))return!0;if((0,m.dt)(e)){var s=(0,m.ue)(e),a=t&&t[s],l=n&&n[s],c=e.selectionSet;if(!c)return(0,i.A)(a,l);var u=Array.isArray(a),d=Array.isArray(l);if(u!==d)return!1;if(u&&d){var h=a.length;if(l.length!==h)return!1;for(var g=0;g<h;++g)if(!v(c,a[g],l[g],r))return!1;return!0}return v(c,a,l,r)}var b=(0,p.HQ)(e,r.fragmentMap);return b?!!y(b)||v(b.selectionSet,t,n,r):void 0}))}function y(e){return!!e.directives&&e.directives.some(b)}function b(e){return"nonreactive"===e.name.value}var x=Object.assign,w=Object.hasOwnProperty,S=function(e){function t(t){var n=t.queryManager,o=t.queryInfo,i=t.options,s=e.call(this,(function(e){try{var n=e._subscription._observer;n&&!n.error&&(n.error=j)}catch(t){}var r=!s.observers.size;s.observers.add(e);var o=s.last;return o&&o.error?e.error&&e.error(o.error):o&&o.result&&e.next&&e.next(o.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=o,s.queryManager=n,s.waitForOwnResult=k(i.fetchPolicy),s.isTornDown=!1;var l=n.defaultOptions.watchQuery,c=(void 0===l?{}:l).fetchPolicy,u=void 0===c?"cache-first":c,d=i.fetchPolicy,h=void 0===d?u:d,p=i.initialFetchPolicy,f=void 0===p?"standby"===h?u:h:p;s.options=(0,r.Cl)((0,r.Cl)({},i),{initialFetchPolicy:f,fetchPolicy:h}),s.queryId=o.queryId||n.generateQueryId();var m=(0,a.Vu)(s.query);return s.queryName=m&&m.name&&m.name.value,s}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){o.unsubscribe()}),0)},error:n},o=e.subscribe(r)}))},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||s.pT.ready,o=(0,r.Cl)((0,r.Cl)({},t),{loading:(0,s.bi)(n),networkStatus:n}),a=this.options.fetchPolicy,l=void 0===a?"cache-first":a;if(k(l)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(o.data=c.result),(0,i.L)(o.data,{})&&(o.data=void 0),c.complete?(delete o.partial,!c.complete||o.networkStatus!==s.pT.loading||"cache-first"!==l&&"cache-only"!==l||(o.networkStatus=s.pT.ready,o.loading=!1)):o.partial=!0,!1===globalThis.__DEV__||c.complete||this.options.partialRefetch||o.loading||o.data||o.error||_(c.missing)}return e&&this.updateLastResult(o),o},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||((this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!g(this.query,this.last.result,e,this.variables):!(0,i.L)(this.last.result,e))||t&&!(0,i.L)(this.last.variables,t))},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||(0,i.L)(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},l=this.options.fetchPolicy;if(n.fetchPolicy="cache-and-network"===l?l:"no-cache"===l?"no-cache":"network-only",!1!==globalThis.__DEV__&&e&&w.call(e,"variables")){var c=(0,a.AT)(this.query),u=c.variableDefinitions;u&&u.some((function(e){return"variables"===e.variable.name.value}))||!1!==globalThis.__DEV__&&o.V1.warn(20,e,(null===(t=c.name)||void 0===t?void 0:t.value)||c)}return e&&!(0,i.L)(this.options.variables,e)&&(n.variables=this.options.variables=(0,r.Cl)((0,r.Cl)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,s.pT.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,r.Cl)((0,r.Cl)({},e.query?e:(0,r.Cl)((0,r.Cl)((0,r.Cl)((0,r.Cl)({},this.options),{query:this.options.query}),e),{variables:(0,r.Cl)((0,r.Cl)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"});n.query=this.transformDocument(n.query);var o=this.queryManager.generateQueryId();this.lastQuery=e.query?this.transformDocument(this.options.query):n.query;var i=this.queryInfo,a=i.networkStatus;i.networkStatus=s.pT.fetchMore,n.notifyOnNetworkStatusChange&&this.observe();var l=new Set;return this.queryManager.fetchQuery(o,n,s.pT.fetchMore).then((function(r){return t.queryManager.removeQuery(o),i.networkStatus===s.pT.fetchMore&&(i.networkStatus=a),t.queryManager.cache.batch({update:function(o){var i=e.updateQuery;i?o.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return i(e,{fetchMoreResult:r.data,variables:n.variables})})):o.writeQuery({query:n.query,variables:n.variables,data:r.data})},onWatchUpdated:function(e){l.add(e.query)}}),r})).finally((function(){l.has(t.query)||C(t)}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var o=t.variables;return r(e,{subscriptionData:n,variables:o})}))},error:function(t){e.onError?e.onError(t):!1!==globalThis.__DEV__&&o.V1.error(21,t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.silentSetOptions=function(e){var t=(0,l.o)(this.options,e||{});x(this.options,t)},t.prototype.setVariables=function(e){return(0,i.L)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},s.pT.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var n=t.fetchPolicy,r=void 0===n?"cache-first":n,o=t.initialFetchPolicy,i=void 0===o?r:o;"standby"===r||("function"===typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(r,{reason:e,options:t,observable:this,initialFetchPolicy:i}):t.fetchPolicy="variables-changed"===e?i:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t,n){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,e,t,n)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){(0,o.V1)(n,22),(t||(this.pollingInfo={})).interval=n;var r=function(){var t,n;e.pollingInfo&&((0,s.bi)(e.queryInfo.networkStatus)||(null===(n=(t=e.options).skipPollAttempt)||void 0===n?void 0:n.call(t))?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},s.pT.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){void 0===t&&(t=this.variables);var n=this.getLastError();return n&&this.last&&!(0,i.L)(t,this.last.variables)&&(n=void 0),this.last=(0,r.Cl)({result:this.queryManager.assumeImmutableResults?e:(0,c.m)(e),variables:t},n?{error:n}:null)},t.prototype.reobserveAsConcast=function(e,t){var n=this;this.isTornDown=!1;var o=t===s.pT.refetch||t===s.pT.fetchMore||t===s.pT.poll,a=this.options.variables,c=this.options.fetchPolicy,u=(0,l.o)(this.options,e||{}),d=o?u:x(this.options,u),h=this.transformDocument(d.query);this.lastQuery=h,o||(this.updatePolling(),e&&e.variables&&!(0,i.L)(e.variables,a)&&"standby"!==d.fetchPolicy&&d.fetchPolicy===c&&(this.applyNextFetchPolicy("variables-changed",d),void 0===t&&(t=s.pT.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=k(d.fetchPolicy));var p=function(){n.concast===g&&(n.waitForOwnResult=!1)},f=d.variables&&(0,r.Cl)({},d.variables),m=this.fetch(d,t,h),g=m.concast,v=m.fromLink,y={next:function(e){(0,i.L)(n.variables,f)&&(p(),n.reportResult(e,f))},error:function(e){(0,i.L)(n.variables,f)&&(p(),n.reportError(e,f))}};return o||!v&&this.concast||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=g,this.observer=y),g.addObserver(y),g},t.prototype.reobserve=function(e,t){return this.reobserveAsConcast(e,t).promise},t.prototype.resubscribeAfterError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.last;this.resetLastResults();var r=this.subscribe.apply(this,e);return this.last=n,r},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var n=this.getLastError(),r=this.isDifferentFromLastResult(e,t);(n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),(n||r)&&(0,u.w)(this.observers,"next",e)},t.prototype.reportError=function(e,t){var n=(0,r.Cl)((0,r.Cl)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:s.pT.error,loading:!1});this.updateLastResult(n,t),(0,u.w)(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(d.c);function C(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return this.nextFetchPolicy=r,"function"===typeof this.nextFetchPolicy?this.nextFetchPolicy(e,t):n}}):e.reobserve()}function j(e){!1!==globalThis.__DEV__&&o.V1.error(23,e.message,e.stack)}function _(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&o.V1.debug(24,e)}function k(e){return"network-only"===e||"no-cache"===e||"standby"===e}(0,h.r)(S)},5637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ApolloCache:()=>c.k,ApolloClient:()=>o.R,ApolloError:()=>l.K4,ApolloLink:()=>m.C,Cache:()=>r,DocumentTransform:()=>P.c,HttpLink:()=>E.P,InMemoryCache:()=>u.D,MissingFieldError:()=>d.Z,NetworkStatus:()=>a.pT,Observable:()=>I.c,ObservableQuery:()=>s.U5,checkFetcher:()=>j.S,concat:()=>b,createHttpLink:()=>N.$,createSignalIfSupported:()=>_,defaultDataIdFromObject:()=>h.or,defaultPrinter:()=>C.i1,disableExperimentalFragmentVariables:()=>L.qj,disableFragmentWarnings:()=>L.gi,empty:()=>g,enableExperimentalFragmentVariables:()=>L.VC,execute:()=>x.g,fallbackHttpConfig:()=>C.R4,from:()=>v,fromError:()=>A.N,fromPromise:()=>R,gql:()=>L.J1,isApolloError:()=>l.Mn,isNetworkRequestSettled:()=>a.D2,isReference:()=>D.A_,makeReference:()=>D.WU,makeVar:()=>p.UT,mergeOptions:()=>i.l,parseAndCheckHttpResponse:()=>w.OQ,resetCaches:()=>L.Nh,rewriteURIForGET:()=>T.E,selectHttpOptionsAndBody:()=>C.Wz,selectHttpOptionsAndBodyInternal:()=>C.HY,selectURI:()=>k.z,serializeFetchParameter:()=>S.Y,setLogVerbosity:()=>F.Q9,split:()=>y,throwServerError:()=>M.A,toPromise:()=>O});var r,o=n(2526),i=n(2277),s=n(9493),a=n(1388),l=n(7832);r||(r={});var c=n(7581),u=n(933),d=n(5944),h=n(7269),p=n(2499),f=n(7484),m=n(7320),g=m.C.empty,v=m.C.from,y=m.C.split,b=m.C.concat,x=n(892),w=n(8590),S=n(73),C=n(2157),j=n(6253),_=function(){if("undefined"===typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},k=n(5262),N=n(4742),E=n(3978),T=n(5425);function O(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t?!1!==globalThis.__DEV__&&f.V1.warn(42):(t=!0,n(e))},error:r})}))}var I=n(6800);function R(e){return new I.c((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}var A=n(1915),M=n(1894),P=n(4704),D=n(9761),F=n(7657),L=n(5859);(0,F.Q9)(!1!==globalThis.__DEV__?"log":"silent")},1388:(e,t,n)=>{"use strict";var r;function o(e){return!!e&&e<7}function i(e){return 7===e||8===e}n.d(t,{D2:()=>i,bi:()=>o,pT:()=>r}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(r||(r={}))},7832:(e,t,n)=>{"use strict";n.d(t,{K$:()=>i,K4:()=>l,Mn:()=>a,uR:()=>s});var r=n(6326),o=(n(7484),n(659)),i=Symbol();function s(e){return!!e.extensions&&Array.isArray(e.extensions[i])}function a(e){return e.hasOwnProperty("graphQLErrors")}var l=function(e){function t(n){var i=n.graphQLErrors,s=n.protocolErrors,a=n.clientErrors,l=n.networkError,c=n.errorMessage,u=n.extraInfo,d=e.call(this,c)||this;return d.name="ApolloError",d.graphQLErrors=i||[],d.protocolErrors=s||[],d.clientErrors=a||[],d.networkError=l||null,d.message=c||function(e){var t=(0,r.fX)((0,r.fX)((0,r.fX)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map((function(e){return(0,o.U)(e)&&e.message||"Error message not found."})).join("\n")}(d),d.extraInfo=u,d.__proto__=t.prototype,d}return(0,r.C6)(t,e),t}(Error)},7320:(e,t,n)=>{"use strict";n.d(t,{C:()=>u});var r=n(7484),o=n(6800),i=n(6326);var s=n(1955);function a(e,t){return t?t(e):o.c.of()}function l(e){return"function"===typeof e?new u(e):e}function c(e){return e.request.length<=1}var u=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return o.c.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(l).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i,s=l(n),u=l(r||new e(a));return i=c(s)&&c(u)?new e((function(e){return t(e)?s.request(e)||o.c.of():u.request(e)||o.c.of()})):new e((function(e,n){return t(e)?s.request(e,n)||o.c.of():u.request(e,n)||o.c.of()})),Object.assign(i,{left:s,right:u})},e.execute=function(e,t){return e.request(function(e,t){var n=(0,i.Cl)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"===typeof e?(0,i.Cl)((0,i.Cl)({},n),e(n)):(0,i.Cl)((0,i.Cl)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,i.Cl)({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!==typeof t.query?(0,s.n4)(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,o=Object.keys(e);n<o.length;n++){var i=o[n];if(t.indexOf(i)<0)throw(0,r.vA)(43,i)}return e}(t))))||o.c.of()},e.concat=function(t,n){var i=l(t);if(c(i))return!1!==globalThis.__DEV__&&r.V1.warn(35,i),i;var s,a=l(n);return s=c(a)?new e((function(e){return i.request(e,(function(e){return a.request(e)||o.c.of()}))||o.c.of()})):new e((function(e,t){return i.request(e,(function(e){return a.request(e,t)||o.c.of()}))||o.c.of()})),Object.assign(s,{left:i,right:a})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(a)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,r.vA)(36)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},892:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var r=n(7320).C.execute},3978:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var r=n(6326),o=n(7320),i=n(4742),s=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,(0,i.$)(t).request)||this;return n.options=t,n}return(0,r.C6)(t,e),t}(o.C)},6253:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(7484),o=function(e){if(!e&&"undefined"===typeof fetch)throw(0,r.vA)(37)}},4742:(e,t,n)=>{"use strict";n.d(t,{$:()=>b});var r=n(6326),o=n(7484),i=n(7320),s=n(3985),a=n(6800),l=n(73),c=n(5262),u=n(8590),d=n(6253),h=n(2157),p=n(5425),f=n(1915),m=n(9182);var g=n(2935),v=n(1955),y=(0,o.no)((function(){return fetch})),b=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,b=e.fetch,x=e.print,w=void 0===x?h.i1:x,S=e.includeExtensions,C=e.preserveHeaderCase,j=e.useGETForQueries,_=e.includeUnusedVariables,k=void 0!==_&&_,N=(0,r.Tt)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);!1!==globalThis.__DEV__&&(0,d.S)(b||y);var E={http:{includeExtensions:S,preserveHeaderCase:C},options:N.fetchOptions,credentials:N.credentials,headers:N.headers};return new i.C((function(e){var t=(0,c.z)(e,n),i=e.getContext(),d={};if(i.clientAwareness){var x=i.clientAwareness,S=x.name,C=x.version;S&&(d["apollographql-client-name"]=S),C&&(d["apollographql-client-version"]=C)}var _=(0,r.Cl)((0,r.Cl)({},d),i.headers),N={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:_};if((0,s.d8)(["client"],e.query)){var T=(0,g.er)(e.query);if(!T)return(0,f.N)(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));e.query=T}var O,I=(0,h.HY)(e,w,h.R4,E,N),R=I.options,A=I.body;A.variables&&!k&&(A.variables=function(e,t){var n=(0,r.Cl)({},e),o=new Set(Object.keys(e));return(0,m.YR)(t,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&o.delete(e.name.value)}}),o.forEach((function(e){delete n[e]})),n}(A.variables,e.query)),R.signal||"undefined"===typeof AbortController||(O=new AbortController,R.signal=O.signal);var M,P="OperationDefinition"===(M=(0,v.Vn)(e.query)).kind&&"subscription"===M.operation,D=(0,s.d8)(["defer"],e.query);if(j&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(R.method="GET"),D||P){R.headers=R.headers||{};var F="multipart/mixed;";P&&D&&!1!==globalThis.__DEV__&&o.V1.warn(38),P?F+="boundary=graphql;subscriptionSpec=1.0,application/json":D&&(F+="deferSpec=20220824,application/json"),R.headers.accept=F}if("GET"===R.method){var L=(0,p.E)(t,A),B=L.newURI,U=L.parseError;if(U)return(0,f.N)(U);t=B}else try{R.body=(0,l.Y)(A,"Payload")}catch(U){return(0,f.N)(U)}return new a.c((function(n){var r=b||(0,o.no)((function(){return fetch}))||y,i=n.next.bind(n);return r(t,R).then((function(t){var n;e.setContext({response:t});var r=null===(n=t.headers)||void 0===n?void 0:n.get("content-type");return null!==r&&/^multipart\/mixed/i.test(r)?(0,u.tD)(t,i):(0,u.OQ)(e)(t).then(i)})).then((function(){O=void 0,n.complete()})).catch((function(e){O=void 0,(0,u.H4)(e,n)})),function(){O&&O.abort()}}))}))}},8590:(e,t,n)=>{"use strict";n.d(t,{H4:()=>m,OQ:()=>g,tD:()=>h});var r=n(6326),o=n(2622);function i(e){var t=null,n=null,r=!1,i=[],s=[];function a(e){if(!n){if(s.length){var t=s.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function l(e){n=e,s.slice().forEach((function(t){t[1](e)})),!t||t()}function c(){r=!0,s.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",l),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",l),e.on("end",c),e.on("finish",c),e.on("close",c);var u={next:function(){return new Promise((function(e,t){return n?t(n):i.length?e({value:i.shift(),done:!1}):r?e({value:void 0,done:!0}):void s.push([e,t])}))}};return o.uJ&&(u[Symbol.asyncIterator]=function(){return this}),u}function s(e){var t={next:function(){return e.read()}};return o.uJ&&(t[Symbol.asyncIterator]=function(){return this}),t}function a(e){var t=e;if(e.body&&(t=e.body),function(e){return!(!o.uJ||!e[Symbol.asyncIterator])}(t))return function(e){var t,n=e[Symbol.asyncIterator]();return(t={next:function(){return n.next()}})[Symbol.asyncIterator]=function(){return this},t}(t);if(function(e){return!!e.getReader}(t))return s(t.getReader());if(function(e){return!!e.stream}(t))return s(t.stream().getReader());if(function(e){return!!e.arrayBuffer}(t))return function(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise((function(t,n){e.then((function(e){t({value:e,done:!1})})).catch(n)})))}};return o.uJ&&(n[Symbol.asyncIterator]=function(){return this}),n}(t.arrayBuffer());if(function(e){return!!e.pipe}(t))return i(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var l=n(1894),c=n(7832),u=n(2490),d=Object.prototype.hasOwnProperty;function h(e,t){var n;return(0,r.sH)(this,void 0,void 0,(function(){var o,i,s,l,d,h,m,g,v,y,b,x,w,S,C,j,_,k,N,E,T,O,I;return(0,r.YH)(this,(function(R){switch(R.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");o=new TextDecoder("utf-8"),i=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),s="boundary=",l=(null===i||void 0===i?void 0:i.includes(s))?null===i||void 0===i?void 0:i.substring((null===i||void 0===i?void 0:i.indexOf(s))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",d="\r\n--".concat(l),h="",m=a(e),g=!0,R.label=1;case 1:return g?[4,m.next()]:[3,3];case 2:for(v=R.sent(),y=v.value,b=v.done,x="string"===typeof y?y:o.decode(y),w=h.length-d.length+1,g=!b,S=(h+=x).indexOf(d,w);S>-1;){if(C=void 0,O=[h.slice(0,S),h.slice(S+d.length)],h=O[1],j=(C=O[0]).indexOf("\r\n\r\n"),_=p(C.slice(0,j)),(k=_["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");if(N=C.slice(j))if(E=f(e,N),Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E||"payload"in E)(0,u.Nw)(E)?(T={},"payload"in E&&(T=(0,r.Cl)({},E.payload)),"errors"in E&&(T=(0,r.Cl)((0,r.Cl)({},T),{extensions:(0,r.Cl)((0,r.Cl)({},"extensions"in T?T.extensions:null),(I={},I[c.K$]=E.errors,I))})),t(T)):t(E);else if(1===Object.keys(E).length&&"hasNext"in E&&!E.hasNext)return[2];S=h.indexOf(d)}return[3,1];case 3:return[2]}}))}))}function p(e){var t={};return e.split("\n").forEach((function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),o=e.slice(n+1).trim();t[r]=o}})),t}function f(e,t){if(e.status>=300){(0,l.A)(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function m(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function g(e){return function(t){return t.text().then((function(e){return f(t,e)})).then((function(n){return Array.isArray(n)||d.call(n,"data")||d.call(n,"errors")||(0,l.A)(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),n}))}}},5425:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var r=n(73);function o(e,t){var n=[],o=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&o("query",t.query),t.operationName&&o("operationName",t.operationName),t.variables){var i=void 0;try{i=(0,r.Y)(t.variables,"Variables map")}catch(d){return{parseError:d}}o("variables",i)}if(t.extensions){var s=void 0;try{s=(0,r.Y)(t.extensions,"Extensions map")}catch(d){return{parseError:d}}o("extensions",s)}var a="",l=e,c=e.indexOf("#");-1!==c&&(a=e.substr(c),l=e.substr(0,c));var u=-1===l.indexOf("?")?"?":"&";return{newURI:l+u+n.join("&")+a}}},2157:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,R4:()=>i,Wz:()=>a,i1:()=>s});var r=n(6326),o=n(2920),i={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},s=function(e,t){return t(e)};function a(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return n.unshift(t),l.apply(void 0,(0,r.fX)([e,s],n,!1))}function l(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var s={},a={};n.forEach((function(e){s=(0,r.Cl)((0,r.Cl)((0,r.Cl)({},s),e.options),{headers:(0,r.Cl)((0,r.Cl)({},s.headers),e.headers)}),e.credentials&&(s.credentials=e.credentials),a=(0,r.Cl)((0,r.Cl)({},a),e.http)})),s.headers&&(s.headers=function(e,t){if(!t){var n=Object.create(null);return Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]=e[t]})),n}var r=Object.create(null);Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]={originalName:t,value:e[t]}}));var o=Object.create(null);return Object.keys(r).forEach((function(e){o[r[e].originalName]=r[e].value})),o}(s.headers,a.preserveHeaderCase));var l=e.operationName,c=e.extensions,u=e.variables,d=e.query,h={operationName:l,variables:u};return a.includeExtensions&&(h.extensions=c),a.includeQuery&&(h.query=t(d,o.y)),{options:s,body:h}}},5262:(e,t,n)=>{"use strict";n.d(t,{z:()=>r});var r=function(e,t){var n=e.getContext().uri;return n||("function"===typeof t?t(e):t||"/graphql")}},73:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var r=n(7484),o=function(e,t){var n;try{n=JSON.stringify(e)}catch(i){var o=(0,r.vA)(39,t,i.message);throw o.parseError=i,o}return n}},1915:(e,t,n)=>{"use strict";n.d(t,{N:()=>o});var r=n(6800);function o(e){return new r.c((function(t){t.error(e)}))}},1894:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r}},4376:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,V:()=>l});var r=n(8973),o=n(1742),i=new WeakSet;function s(e){i.has(e)||(i.add(e),setTimeout((function(){e.clean(),i.delete(e)}),100))}var a=function(e,t){var n=new r.l(e,t);return n.set=function(e,t){return s(this),r.l.prototype.set.call(this,e,t)},n},l=function(e,t){var n=new o.C(e,t);return n.set=function(e,t){return s(this),o.C.prototype.set.call(this,e,t)},n}},2172:(e,t,n)=>{"use strict";n.d(t,{D_:()=>s,cM:()=>l,ep:()=>a,tQ:()=>c});var r=n(6326),o=n(4273),i={};function s(e,t){i[e]=t}var a=!1!==globalThis.__DEV__?function(){var e,t,n,o,s;if(!1===globalThis.__DEV__)throw new Error("only supported in development mode");return{limits:u(),sizes:(0,r.Cl)({print:null===(e=i.print)||void 0===e?void 0:e.call(i),parser:null===(t=i.parser)||void 0===t?void 0:t.call(i),canonicalStringify:null===(n=i.canonicalStringify)||void 0===n?void 0:n.call(i),links:g(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:f(this.queryManager.documentTransform)}},null===(s=(o=this.cache).getMemoryInternals)||void 0===s?void 0:s.call(o))}}:void 0,l=!1!==globalThis.__DEV__?function(){var e=this.config.fragments;return(0,r.Cl)((0,r.Cl)({},d.apply(this)),{addTypenameDocumentTransform:f(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:h(this.storeReader.executeSelectionSet),executeSubSelectedArray:h(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:h(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:h(null===e||void 0===e?void 0:e.findFragmentSpreads),lookup:h(null===e||void 0===e?void 0:e.lookup),transform:h(null===e||void 0===e?void 0:e.transform)}})}:void 0,c=!1!==globalThis.__DEV__?d:void 0;function u(){return Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map((function(e){var t=e[0],n=e[1];return[t,o.v[t]||n]})))}function d(){return{cache:{fragmentQueryDocuments:h(this.getFragmentDoc)}}}function h(e){return function(e){return!!e&&"dirtyKey"in e}(e)?e.size:void 0}function p(e){return null!=e}function f(e){return m(e).map((function(e){return{cache:e}}))}function m(e){return e?(0,r.fX)((0,r.fX)([h(null===e||void 0===e?void 0:e.performWork)],m(null===e||void 0===e?void 0:e.left),!0),m(null===e||void 0===e?void 0:e.right),!0).filter(p):[]}function g(e){var t;return e?(0,r.fX)((0,r.fX)([null===(t=null===e||void 0===e?void 0:e.getMemoryInternals)||void 0===t?void 0:t.call(e)],g(null===e||void 0===e?void 0:e.left),!0),g(null===e||void 0===e?void 0:e.right),!0).filter(p):[]}},4273:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var r=n(6326),o=n(7484),i=Symbol.for("apollo.cacheSize"),s=(0,r.Cl)({},o.Sf[i])},8829:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,c:()=>r});var r=Array.isArray;function o(e){return Array.isArray(e)&&e.length>0}},2622:(e,t,n)=>{"use strict";n.d(t,{En:()=>i,JR:()=>u,et:()=>o,ol:()=>s,uJ:()=>a});var r=n(7484),o="function"===typeof WeakMap&&!(0,r.no)((function(){return"ReactNative"==navigator.product&&!global.HermesInternal})),i="function"===typeof WeakSet,s="function"===typeof Symbol&&"function"===typeof Symbol.for,a=s&&Symbol.asyncIterator,l="function"===typeof(0,r.no)((function(){return window.document.createElement})),c=(0,r.no)((function(){return navigator.userAgent.indexOf("jsdom")>=0}))||!1,u=l&&!c},9776:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var r,o=n(4376),i=n(4273),s=n(2172),a=Object.assign((function(e){return JSON.stringify(e,l)}),{reset:function(){r=new o.V(i.v.canonicalStringify||1e3)}});function l(e,t){if(t&&"object"===typeof t){var n=Object.getPrototypeOf(t);if(n===Object.prototype||null===n){var o=Object.keys(t);if(o.every(c))return t;var i=JSON.stringify(o),s=r.get(i);if(!s){o.sort();var a=JSON.stringify(o);s=r.get(a)||o,r.set(i,s),r.set(a,s)}var l=Object.create(n);return s.forEach((function(e){l[e]=t[e]})),l}}return t}function c(e,t,n){return 0===t||n[t-1]<=e}!1!==globalThis.__DEV__&&(0,s.D_)("canonicalStringify",(function(){return r.size})),a.reset()},2596:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var r=Object.prototype.toString;function o(e){return i(e)}function i(e,t){switch(r.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=i(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var o=Object.create(Object.getPrototypeOf(e));return t.set(e,o),Object.keys(e).forEach((function(n){o[n]=i(e[n],t)})),o;default:return e}}},8694:(e,t,n)=>{"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}n.d(t,{o:()=>r})},2490:(e,t,n)=>{"use strict";n.d(t,{Nw:()=>l,ST:()=>s,YX:()=>a,bd:()=>c});var r=n(659),o=n(8829),i=n(421);function s(e){return"incremental"in e}function a(e){return s(e)||function(e){return"hasNext"in e&&"data"in e}(e)}function l(e){return(0,r.U)(e)&&"payload"in e}function c(e,t){var n=e,r=new i.ZI;return s(t)&&(0,o.E)(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,o=e.path,i=o.length-1;i>=0;--i){var s=o[i],a=!isNaN(+s)?[]:{};a[s]=t,t=a}n=r.merge(n,t)})),n}},3559:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=new Map;function o(e){var t=r.get(e)||1;return r.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}},6250:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});var r=n(659);function o(e){var t=new Set([e]);return t.forEach((function(e){(0,r.U)(e)&&function(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){(0,r.U)(e[n])&&t.add(e[n])}))})),e}function i(e){return!1!==globalThis.__DEV__&&o(e),e}},421:(e,t,n)=>{"use strict";n.d(t,{D9:()=>s,IM:()=>a,ZI:()=>c});var r=n(6326),o=n(659),i=Object.prototype.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(e)}function a(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new c,o=1;o<n;++o)t=r.merge(t,e[o]);return t}var l=function(e,t,n){return this.merge(e[n],t[n])},c=function(){function e(e){void 0===e&&(e=l),this.reconciler=e,this.isObject=o.U,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];return(0,o.U)(t)&&(0,o.U)(e)?(Object.keys(t).forEach((function(o){if(i.call(e,o)){var a=e[o];if(t[o]!==a){var l=n.reconciler.apply(n,(0,r.fX)([e,t,o],s,!1));l!==a&&((e=n.shallowCopyForMerge(e))[o]=l)}}else(e=n.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,o.U)(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,r.Cl)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}()},2277:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});var r=n(6326),o=n(8694);function i(e,t){return(0,o.o)(e,t,t.variables&&{variables:(0,o.o)((0,r.Cl)((0,r.Cl)({},e&&e.variables),t.variables))})}},659:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"===typeof e}n.d(t,{U:()=>r})},1589:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(3559);function o(e,t){void 0===t&&(t=0);var n=(0,r.v)("stringifyForDisplay");return JSON.stringify(e,(function(e,t){return void 0===t?n:t}),t).split(JSON.stringify(n)).join("<undefined>")}},7484:(e,t,n)=>{"use strict";n.d(t,{Sf:()=>s,V1:()=>c,no:()=>i,vA:()=>u});var r=n(7657),o=n(9358);function i(e){try{return e()}catch(t){}}const s=i((function(){return globalThis}))||i((function(){return window}))||i((function(){return self}))||i((function(){return global}))||i((function(){return i.constructor("return this")()}));var a=n(1589);function l(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if("number"===typeof t){var o=t;(t=p(o))||(t=f(o,n),n=[])}e.apply(void 0,[t].concat(n))}}var c=Object.assign((function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];e||(0,r.V1)(e,p(t,n)||f(t,n))}),{debug:l(r.V1.debug),log:l(r.V1.log),warn:l(r.V1.warn),error:l(r.V1.error)});function u(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new r.zU(p(e,t)||f(e,t))}var d=Symbol.for("ApolloErrorMessageHandler_"+o.r);function h(e){return"string"==typeof e?e:(0,a.p)(e,2).slice(0,1e3)}function p(e,t){if(void 0===t&&(t=[]),e)return s[d]&&s[d](e,t.map(h))}function f(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:o.r,message:e,args:t.map(h)})))}globalThis.__DEV__},4704:(e,t,n)=>{"use strict";n.d(t,{c:()=>d});var r=n(5730),o=n(2622),i=n(1955),s=n(7484),a=n(8973),l=n(9238),c=n(4273);function u(e){return e}var d=function(){function e(e,t){void 0===t&&(t=Object.create(null)),this.resultCache=o.En?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}return e.prototype.getCacheKey=function(e){return[e]},e.identity=function(){return new e(u,{cache:!1})},e.split=function(t,n,r){return void 0===r&&(r=e.identity()),Object.assign(new e((function(e){return(t(e)?n:r).transformDocument(e)}),{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new r.b(o.et);this.performWork=(0,l.LV)(e.prototype.performWork.bind(this),{makeCacheKey:function(e){var r=t.getCacheKey(e);if(r)return(0,s.V1)(Array.isArray(r),66),n.lookupArray(r)},max:c.v["documentTransform.cache"],cache:a.l})}},e.prototype.performWork=function(e){return(0,i.sw)(e),this.transform(e)},e.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},e.prototype.concat=function(t){var n=this;return Object.assign(new e((function(e){return t.transformDocument(n.transformDocument(e))}),{cache:!1}),{left:this,right:t})},e}()},3985:(e,t,n)=>{"use strict";n.d(t,{MS:()=>i,d8:()=>s,f2:()=>a});var r=n(7484),o=n(9182);function i(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,o=e.name.value;(0,r.V1)(n&&1===n.length,68,o);var i=n[0];(0,r.V1)(i.name&&"if"===i.name.value,69,o);var s=i.value;(0,r.V1)(s&&("Variable"===s.kind||"BooleanValue"===s.kind),70,o),t.push({directive:e,ifArgument:i})}}));return t}(n).every((function(e){var n=e.directive,o=e.ifArgument,i=!1;return"Variable"===o.value.kind?(i=t&&t[o.value.name.value],(0,r.V1)(void 0!==i,67,n.name.value)):i=o.value.value,"skip"===n.name.value?!i:i}))}function s(e,t,n){var r=new Set(e),i=r.size;return(0,o.YR)(t,{Directive:function(e){if(r.delete(e.name.value)&&(!n||!r.size))return o.sP}}),n?!r.size:r.size<i}function a(e){return e&&s(["client","export"],e,!0)}},3094:(e,t,n)=>{"use strict";n.d(t,{HQ:()=>a,JG:()=>s,ct:()=>i});var r=n(6326),o=n(7484);function i(e,t){var n=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw(0,o.vA)(71,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&i.push(e)})),"undefined"===typeof n&&((0,o.V1)(1===i.length,72,i.length),n=i[0].name.value),(0,r.Cl)((0,r.Cl)({},e),{definitions:(0,r.fX)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function s(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function a(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=e.name.value;if("function"===typeof t)return t(n);var r=t&&t[n];return(0,o.V1)(r,73,n),r||null;default:return null}}},1955:(e,t,n)=>{"use strict";n.d(t,{AT:()=>c,E4:()=>u,Vn:()=>d,Vu:()=>s,n4:()=>a,sw:()=>i,wY:()=>h,zK:()=>l});var r=n(7484),o=n(9761);function i(e){(0,r.V1)(e&&"Document"===e.kind,74);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw(0,r.vA)(75,e.kind);return e}));return(0,r.V1)(t.length<=1,76,t.length),e}function s(e){return i(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function a(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&!!e.name})).map((function(e){return e.name.value}))[0]||null}function l(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function c(e){var t=s(e);return(0,r.V1)(t&&"query"===t.operation,77),t}function u(e){(0,r.V1)("Document"===e.kind,78),(0,r.V1)(e.definitions.length<=1,79);var t=e.definitions[0];return(0,r.V1)("FragmentDefinition"===t.kind,80),t}function d(e){var t;i(e);for(var n=0,o=e.definitions;n<o.length;n++){var s=o[n];if("OperationDefinition"===s.kind){var a=s.operation;if("query"===a||"mutation"===a||"subscription"===a)return s}"FragmentDefinition"!==s.kind||t||(t=s)}if(t)return t;throw(0,r.vA)(81)}function h(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&(0,o.J)(t,e.variable.name,e.defaultValue)})),t}},2920:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r,o=n(1644),i=n(4376),s=n(4273),a=n(2172),l=Object.assign((function(e){var t=r.get(e);return t||(t=(0,o.print)(e),r.set(e,t)),t}),{reset:function(){r=new i.A(s.v.print||2e3)}});l.reset(),!1!==globalThis.__DEV__&&(0,a.D_)("print",(function(){return r?r.size:0}))},9761:(e,t,n)=>{"use strict";n.d(t,{A_:()=>l,D$:()=>v,Ii:()=>d,J:()=>u,Kc:()=>c,MB:()=>m,WU:()=>a,dt:()=>y,kd:()=>b,o5:()=>f,ue:()=>g});var r=n(7484),o=n(659),i=n(3094),s=n(9776);function a(e){return{__ref:String(e)}}function l(e){return Boolean(e&&"object"===typeof e&&"string"===typeof e.__ref)}function c(e){return(0,o.U)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function u(e,t,n,o){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return u(i,e.name,e.value,o)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var s=(o||{})[n.name.value];e[t.value]=s}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return u(n,t,e,o),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw(0,r.vA)(82,t.value,n.kind);e[t.value]=null}}function d(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var o=r.name,i=r.value;return u(n[e.name.value],o,i,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,o=e.value;return u(r,n,o,t)}))),f(e.name.value,r,n)}var h=["connection","include","skip","client","rest","export","nonreactive"],p=s.M,f=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o={};return r.forEach((function(e){o[e]=t[e]})),"".concat(n.connection.key,"(").concat(p(o),")")}return n.connection.key}var i=e;if(t){var s=p(t);i+="(".concat(s,")")}return n&&Object.keys(n).forEach((function(e){-1===h.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?i+="@".concat(e,"(").concat(p(n[e]),")"):i+="@".concat(e))})),i}),{setStringify:function(e){var t=p;return p=e,t}});function m(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,o=e.value;return u(n,r,o,t)})),n}return null}function g(e){return e.alias?e.alias.value:e.name.value}function v(e,t,n){for(var r,o=0,s=t.selections;o<s.length;o++){if(y(c=s[o])){if("__typename"===c.name.value)return e[g(c)]}else r?r.push(c):r=[c]}if("string"===typeof e.__typename)return e.__typename;if(r)for(var a=0,l=r;a<l.length;a++){var c=l[a],u=v(e,(0,i.HQ)(c,n).selectionSet,n);if("string"===typeof u)return u}}function y(e){return"Field"===e.kind}function b(e){return"InlineFragment"===e.kind}},2935:(e,t,n)=>{"use strict";n.d(t,{XY:()=>v,er:()=>b,iz:()=>g,zc:()=>y});var r=n(6326),o=n(7484),i=n(4705),s=n(9182),a=n(1955),l=n(9761),c=n(3094),u=n(8829),d={kind:i.b.FIELD,name:{kind:i.b.NAME,value:"__typename"}};function h(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===i.b.FRAGMENT_SPREAD&&h(t[e.name.value],t)}))}function p(e){return h((0,a.Vu)(e)||(0,a.E4)(e),(0,c.JG)((0,a.zK)(e)))?null:e}function f(e){var t=new Map,n=new Map;return e.forEach((function(e){e&&(e.name?t.set(e.name,e):e.test&&n.set(e.test,e))})),function(e){var r=t.get(e.name.value);return!r&&n.size&&n.forEach((function(t,n){n(e)&&(r=t)})),r}}function m(e){var t=new Map;return function(n){void 0===n&&(n=e);var r=t.get(n);return r||t.set(n,r={variables:new Set,fragmentSpreads:new Set}),r}}function g(e,t){(0,a.sw)(t);for(var n=m(""),l=m(""),c=function(e){for(var t=0,r=void 0;t<e.length&&(r=e[t]);++t)if(!(0,u.c)(r)){if(r.kind===i.b.OPERATION_DEFINITION)return n(r.name&&r.name.value);if(r.kind===i.b.FRAGMENT_DEFINITION)return l(r.name.value)}return!1!==globalThis.__DEV__&&o.V1.error(83),null},d=0,h=t.definitions.length-1;h>=0;--h)t.definitions[h].kind===i.b.OPERATION_DEFINITION&&++d;var g=f(e),v=function(e){return(0,u.E)(e)&&e.map(g).some((function(e){return e&&e.remove}))},y=new Map,b=!1,x={enter:function(e){if(v(e.directives))return b=!0,null}},w=(0,s.YR)(t,{Field:x,InlineFragment:x,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,o){var i=c(o);i&&i.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,o){if(v(e.directives))return b=!0,null;var i=c(o);i&&i.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){y.set(JSON.stringify(r),e)},leave:function(e,t,n,r){return e===y.get(JSON.stringify(r))?e:d>0&&e.selectionSet.selections.every((function(e){return e.kind===i.b.FIELD&&"__typename"===e.name.value}))?(l(e.name.value).removed=!0,b=!0,null):void 0}},Directive:{leave:function(e){if(g(e))return b=!0,null}}});if(!b)return t;var S=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){S(l(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},C=new Set;w.definitions.forEach((function(e){e.kind===i.b.OPERATION_DEFINITION?S(n(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){C.add(e)})):e.kind!==i.b.FRAGMENT_DEFINITION||0!==d||l(e.name.value).removed||C.add(e.name.value)})),C.forEach((function(e){S(l(e)).fragmentSpreads.forEach((function(e){C.add(e)}))}));var j={enter:function(e){if(t=e.name.value,!C.has(t)||l(t).removed)return null;var t}};return p((0,s.YR)(w,{FragmentSpread:j,FragmentDefinition:j,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=S(n(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,r.Cl)((0,r.Cl)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var v=Object.assign((function(e){return(0,s.YR)(e,{SelectionSet:{enter:function(e,t,n){if(!n||n.kind!==i.b.OPERATION_DEFINITION){var o=e.selections;if(o)if(!o.some((function(e){return(0,l.dt)(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var s=n;if(!((0,l.dt)(s)&&s.directives&&s.directives.some((function(e){return"export"===e.name.value}))))return(0,r.Cl)((0,r.Cl)({},e),{selections:(0,r.fX)((0,r.fX)([],o,!0),[d],!1)})}}}}})}),{added:function(e){return e===d}});function y(e){return"query"===(0,a.Vn)(e).operation?e:(0,s.YR)(e,{OperationDefinition:{enter:function(e){return(0,r.Cl)((0,r.Cl)({},e),{operation:"query"})}}})}function b(e){return(0,a.sw)(e),g([{test:function(e){return"client"===e.name.value},remove:!0}],e)}},8719:(e,t,n)=>{"use strict";function r(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}n.d(t,{w:()=>r})},8238:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});var r=n(6800),o=n(2622);function i(e){function t(t){Object.defineProperty(e,t,{value:r.c})}return o.ol&&Symbol.species&&t(Symbol.species),t("@@species"),e}},9358:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="3.9.6"},1742:(e,t,n)=>{"use strict";function r(){}n.d(t,{C:()=>o});class o{constructor(e=1/0,t=r){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}},8973:(e,t,n)=>{"use strict";function r(){}n.d(t,{l:()=>l});const o=r,i="undefined"!==typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},s="undefined"!==typeof WeakMap?WeakMap:Map,a="undefined"!==typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:r,unregister:r}};class l{constructor(e=1/0,t=o){this.max=e,this.dispose=t,this.map=new s,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new i(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new a(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}},4902:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,L:()=>a});const{toString:r,hasOwnProperty:o}=Object.prototype,i=Function.prototype.toString,s=new Map;function a(e,t){try{return c(e,t)}finally{s.clear()}}const l=a;function c(e,t){if(e===t)return!0;const n=r.call(e);if(n!==r.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(p(e,t))return!0;const n=u(e),r=u(t),i=n.length;if(i!==r.length)return!1;for(let e=0;e<i;++e)if(!o.call(t,n[e]))return!1;for(let o=0;o<i;++o){const r=n[o];if(!c(e[r],t[r]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(p(e,t))return!0;const r=e.entries(),o="[object Map]"===n;for(;;){const e=r.next();if(e.done)break;const[n,i]=e.value;if(!t.has(n))return!1;if(o&&!c(i,t.get(n)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=i.call(e);return n===i.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,h)}}return!1}function u(e){return Object.keys(e).filter(d,e)}function d(e){return void 0!==this[e]}const h="{ [native code] }";function p(e,t){let n=s.get(e);if(n){if(n.has(t))return!0}else s.set(e,n=new Set);return n.add(t),!1}},5730:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});const r=()=>Object.create(null),{forEach:o,slice:i}=Array.prototype,{hasOwnProperty:s}=Object.prototype;class a{constructor(e=!0,t=r){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return o.call(e,(e=>t=t.getChildTrie(e))),s.call(t,"data")?t.data:t.data=this.makeData(i.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){const r=t.mapFor(e[n],!1);t=r&&r.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],r=this.mapFor(n,!1),o=r&&r.get(n);o&&(t=o.removeArray(i.call(e,1)),o.data||o.weak||o.strong&&o.strong.size||r.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new a(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}},9788:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1320);function o(e){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var i=10,s=2;function a(e){return l(e,[])}function l(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),o=function(e){var t=e[String(r.A)];if("function"===typeof t)return t;if("function"===typeof e.inspect)return e.inspect}(e);if(void 0!==o){var a=o.call(e);if(a!==e)return"string"===typeof a?a:l(a,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var n=Math.min(i,e.length),r=e.length-n,o=[],a=0;a<n;++a)o.push(l(e[a],t));1===r?o.push("... 1 more item"):r>1&&o.push("... ".concat(r," more items"));return"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>s)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";var r=n.map((function(n){return n+": "+l(e[n],t)}));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},1320:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},2402:(e,t,n)=>{"use strict";n.d(t,{aZ:()=>i,ou:()=>s,Ll:()=>a});var r=n(1320);function o(e){var t=e.prototype.toJSON;"function"===typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,r.A&&(e.prototype[r.A]=t)}var i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();o(i);var s=function(){function e(e,t,n,r,o,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=s,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function a(e){return null!=e&&"string"===typeof e.kind}o(s)},7312:(e,t,n)=>{"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,o=0,i=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:n=!1,r=!0,o=0;break;case 9:case 32:++o;break;default:r&&!n&&(null===i||o<i)&&(i=o),r=!1}return null!==(t=i)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&o(t[i]);)++i;for(var s=t.length;s>i&&o(t[s-1]);)--s;return t.slice(i,s).join("\n")}function o(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],i='"'===e[e.length-1],s="\\"===e[e.length-1],a=!r||i||s||n,l="";return!a||r&&o||(l+="\n"+t),l+=t?e.replace(/\n/g,"\n"+t):e,a&&(l+="\n"),'"""'+l.replace(/"""/g,'\\"""')+'"""'}n.d(t,{i$:()=>r,yo:()=>i})},4705:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},1644:(e,t,n)=>{"use strict";n.r(t),n.d(t,{print:()=>i});var r=n(9182),o=n(7312);function i(e){return(0,r.YR)(e,{leave:s})}var s={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=u("(",l(e.variableDefinitions,", "),")"),o=l(e.directives," "),i=e.selectionSet;return n||o||r||"query"!==t?l([t,l([n,r]),o,i]," "):i},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+u(" = ",r)+u(" ",l(o," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,i=e.selectionSet,s=u("",t,": ")+n,a=s+u("(",l(r,", "),")");return a.length>80&&(a=s+u("(\n",d(l(r,"\n")),"\n)")),l([a,l(o," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",u("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,i=e.selectionSet;return"fragment ".concat(t).concat(u("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(u("",l(o," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,o.yo)(n,"description"===t?"":"  "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),c(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return l(["scalar",e.name,l(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["type",t,u("implements ",l(n," & ")),l(r," "),c(o)]," ")})),FieldDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(p(n)?u("(\n",d(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+": "+r+u(" ",l(o," "))})),InputValueDefinition:a((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return l([t+": "+n,u("= ",r),l(o," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["interface",t,u("implements ",l(n," & ")),l(r," "),c(o)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),c(r)]," ")})),EnumValueDefinition:a((function(e){return l([e.name,l(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),c(r)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(p(n)?u("(\n",d(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+(r?" repeatable":"")+" on "+l(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),c(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend type",t,u("implements ",l(n," & ")),l(r," "),c(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend interface",t,u("implements ",l(n," & ")),l(r," "),c(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),c(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),c(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null===e||void 0===e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function c(e){return u("{\n",d(l(e,"\n")),"\n}")}function u(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function d(e){return u("  ",e.replace(/\n/g,"\n  "))}function h(e){return-1!==e.indexOf("\n")}function p(e){return null!=e&&e.some(h)}},9182:(e,t,n)=>{"use strict";n.d(t,{YR:()=>a,sP:()=>s});var r=n(9788),o=n(2402),i={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},s=Object.freeze({});function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,a=void 0,c=Array.isArray(e),u=[e],d=-1,h=[],p=void 0,f=void 0,m=void 0,g=[],v=[],y=e;do{var b=++d===u.length,x=b&&0!==h.length;if(b){if(f=0===v.length?void 0:g[g.length-1],p=m,m=v.pop(),x){if(c)p=p.slice();else{for(var w={},S=0,C=Object.keys(p);S<C.length;S++){var j=C[S];w[j]=p[j]}p=w}for(var _=0,k=0;k<h.length;k++){var N=h[k][0],E=h[k][1];c&&(N-=_),c&&null===E?(p.splice(N,1),_++):p[N]=E}}d=a.index,u=a.keys,h=a.edits,c=a.inArray,a=a.prev}else{if(f=m?c?d:u[d]:void 0,null===(p=m?m[f]:y)||void 0===p)continue;m&&g.push(f)}var T,O=void 0;if(!Array.isArray(p)){if(!(0,o.Ll)(p))throw new Error("Invalid AST Node: ".concat((0,r.A)(p),"."));var I=l(t,p.kind,b);if(I){if((O=I.call(t,p,f,m,g,v))===s)break;if(!1===O){if(!b){g.pop();continue}}else if(void 0!==O&&(h.push([f,O]),!b)){if(!(0,o.Ll)(O)){g.pop();continue}p=O}}}if(void 0===O&&x&&h.push([f,p]),b)g.pop();else a={inArray:c,index:d,keys:u,edits:h,prev:a},u=(c=Array.isArray(p))?p:null!==(T=n[p.kind])&&void 0!==T?T:[],d=-1,h=[],m&&v.push(m),m=p}while(void 0!==a);return 0!==h.length&&(y=h[h.length-1][1]),y}function l(e,t,n){var r=e[t];if(r){if(!n&&"function"===typeof r)return r;var o=n?r.leave:r.enter;if("function"===typeof o)return o}else{var i=n?e.leave:e.enter;if(i){if("function"===typeof i)return i;var s=i[t];if("function"===typeof s)return s}}}},9238:(e,t,n)=>{"use strict";n.d(t,{DX:()=>g,yN:()=>$,LV:()=>H});const r=()=>Object.create(null),{forEach:o,slice:i}=Array.prototype,{hasOwnProperty:s}=Object.prototype;class a{constructor(e=!0,t=r){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return o.call(e,(e=>t=t.getChildTrie(e))),s.call(t,"data")?t.data:t.data=this.makeData(i.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){const r=this.weakness&&l(e[n])?t.weak:t.strong;t=r&&r.get(e[n])}return t&&t.data}getChildTrie(e){const t=this.weakness&&l(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let n=t.get(e);return n||t.set(e,n=new a(this.weakness,this.makeData)),n}}function l(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}var c=n(1742);let u=null;const d={};let h=1;function p(e){try{return e()}catch(t){}}const f="@wry/context:Slot",m=p((()=>globalThis))||p((()=>global))||Object.create(null),g=m[f]||Array[f]||function(e){try{Object.defineProperty(m,f,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",h++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=u;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===d)break;return e!==u&&(u.slots[this.id]=t),!0}return u&&(u.slots[this.id]=d),!1}getValue(){if(this.hasValue())return u.slots[this.id]}withValue(e,t,n,r){const o={__proto__:null,[this.id]:e},i=u;u={parent:i,slots:o};try{return t.apply(r,n)}finally{u=i}}static bind(e){const t=u;return function(){const n=u;try{return u=t,e.apply(this,arguments)}finally{u=n}}}static noContext(e,t,n){if(!u)return e.apply(n,t);{const r=u;try{return u=null,e.apply(n,t)}finally{u=r}}}}),{bind:v,noContext:y}=g;const b=new g;const{hasOwnProperty:x}=Object.prototype,w=Array.from||function(e){const t=[];return e.forEach((e=>t.push(e))),t};function S(e){const{unsubscribe:t}=e;"function"===typeof t&&(e.unsubscribe=void 0,t())}const C=[],j=100;function _(e,t){if(!e)throw new Error(t||"assertion failure")}function k(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function N(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function E(e){return e.slice(0)}class T{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++T.count}peek(){if(1===this.value.length&&!R(this))return O(this),this.value[0]}recompute(e){return _(!this.recomputing,"already recomputing"),O(this),R(this)?function(e,t){B(e),b.withValue(e,I,[e,t]),function(e,t){if("function"===typeof e.subscribe)try{S(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,R(e))return;M(e)}(e);return N(e.value)}(this,e):N(this.value)}setDirty(){this.dirty||(this.dirty=!0,A(this),S(this))}dispose(){this.setDirty(),B(this),P(this,((e,t)=>{e.setDirty(),U(e,this)}))}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=C.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(w(this.deps).forEach((e=>e.delete(this))),this.deps.clear(),C.push(this.deps),this.deps=null)}}function O(e){const t=b.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),R(e)?D(t,e):F(t,e),t}function I(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&1===e.value.length&&(r=E(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!k(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(o){}}catch(i){e.value[1]=i}e.recomputing=!1}function R(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function A(e){P(e,D)}function M(e){P(e,F)}function P(e,t){const n=e.parents.size;if(n){const r=w(e.parents);for(let o=0;o<n;++o)t(r[o],e)}}function D(e,t){_(e.childValues.has(t)),_(R(t));const n=!R(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=C.pop()||new Set;e.dirtyChildren.add(t),n&&A(e)}function F(e,t){_(e.childValues.has(t)),_(!R(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,E(t.value)):k(n,t.value)||e.setDirty(),L(e,t),R(e)||M(e)}function L(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(C.length<j&&C.push(n),e.dirtyChildren=null))}function B(e){e.childValues.size>0&&e.childValues.forEach(((t,n)=>{U(e,n)})),e.forgetDeps(),_(null===e.dirtyChildren)}function U(e,t){t.parents.delete(e),e.childValues.delete(t),L(e,t)}T.count=0;const G={setDirty:!0,dispose:!0,forget:!0};function $(e){const t=new Map,n=e&&e.subscribe;function r(e){const r=b.getValue();if(r){let o=t.get(e);o||t.set(e,o=new Set),r.dependOn(o),"function"===typeof n&&(S(o),o.unsubscribe=n(e))}}return r.dirty=function(e,n){const r=t.get(e);if(r){const o=n&&x.call(G,n)?n:"setDirty";w(r).forEach((e=>e[o]())),t.delete(e),S(r)}},r}let q;function z(...e){return(q||(q=new a("function"===typeof WeakMap))).lookupArray(e)}const V=new Set;function H(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=z,normalizeResult:o,subscribe:i,cache:s=c.C}=Object.create(null)){const a="function"===typeof s?new s(t,(e=>e.dispose())):s,l=function(){const t=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let s=a.get(t);s||(a.set(t,s=new T(e)),s.normalizeResult=o,s.subscribe=i,s.forget=()=>a.delete(t));const l=s.recompute(Array.prototype.slice.call(arguments));return a.set(t,s),V.add(a),b.hasValue()||(V.forEach((e=>e.clean())),V.clear()),l};function u(e){const t=e&&a.get(e);t&&t.setDirty()}function d(e){const t=e&&a.get(e);if(t)return t.peek()}function h(e){return!!e&&a.delete(e)}return Object.defineProperty(l,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:o,subscribe:i,cache:a}),l.dirtyKey=u,l.dirty=function(){u(r.apply(null,arguments))},l.peekKey=d,l.peek=function(){return d(r.apply(null,arguments))},l.forgetKey=h,l.forget=function(){return h(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}},7657:(e,t,n)=>{"use strict";n.d(t,{Q9:()=>h,V1:()=>l,zU:()=>a});var r=n(6326),o="Invariant Violation",i=Object.setPrototypeOf,s=void 0===i?function(e,t){return e.__proto__=t,e}:i,a=function(e){function t(n){void 0===n&&(n=o);var r=e.call(this,"number"===typeof n?o+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=o,s(r,t.prototype),r}return(0,r.C6)(t,e),t}(Error);function l(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],u=c.indexOf("log");function d(e){return function(){if(c.indexOf(e)>=u)return(console[e]||console.log).apply(console,arguments)}}function h(e){var t=c[u];return u=Math.max(0,c.indexOf(e)),t}!function(e){e.debug=d("debug"),e.log=d("log"),e.warn=d("warn"),e.error=d("error")}(l||(l={}))},6326:(e,t,n)=>{"use strict";n.d(t,{C6:()=>o,Cl:()=>i,Tt:()=>s,YH:()=>l,fX:()=>c,sH:()=>a});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(l){a=[6,l],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function c(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError},6800:(e,t,n)=>{"use strict";function r(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{c:()=>j});var a=function(){return"function"===typeof Symbol},l=function(e){return a()&&Boolean(Symbol[e])},c=function(e){return l(e)?Symbol[e]:"@@"+e};a()&&!l("observable")&&(Symbol.observable=Symbol("observable"));var u=c("iterator"),d=c("observable"),h=c("species");function p(e,t){var n=e[t];if(null!=n){if("function"!==typeof n)throw new TypeError(n+" is not a function");return n}}function f(e){var t=e.constructor;return void 0!==t&&null===(t=t[h])&&(t=void 0),void 0!==t?t:j}function m(e){return e instanceof j}function g(e){g.log?g.log(e):setTimeout((function(){throw e}))}function v(e){Promise.resolve().then((function(){try{e()}catch(t){g(t)}}))}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"===typeof t)t();else{var n=p(t,"unsubscribe");n&&n.call(t)}}catch(r){g(r)}}function b(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function x(e,t,n){e._state="running";var r=e._observer;try{var o=p(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(b(e),!o)throw n;o.call(r,n);break;case"complete":b(e),o&&o.call(r)}}catch(i){g(i)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function w(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void v((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(x(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void x(e,t,n);e._queue.push({type:t,value:n})}}var S=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new C(this);try{this._cleanup=t.call(void 0,n)}catch(r){n.error(r)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(b(this),y(this))},s(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),C=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){w(this._subscription,"next",e)},t.error=function(e){w(this._subscription,"error",e)},t.complete=function(){w(this._subscription,"complete")},s(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),j=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!==typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"===typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new S(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"===typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(n){r(n),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function i(){o.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");var n=f(this),r=arguments.length>1,o=!1,i=arguments[1];return new n((function(n){return t.subscribe({next:function(t){var s=!o;if(o=!0,!s||r)try{i=e(i,t)}catch(a){return n.error(a)}else i=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(i),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=f(this);return new o((function(t){var r,i=0;return function e(s){r=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){i===n.length?(r=void 0,t.complete()):e(o.from(n[i++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");var n=f(this);return new n((function(r){var o=[],i=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(a){return r.error(a)}var i=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(i);e>=0&&o.splice(e,1),s()}});o.push(i)},error:function(e){r.error(e)},complete:function(){s()}});function s(){i.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(e){return e.unsubscribe()})),i.unsubscribe()}}))},t[d]=function(){return this},e.from=function(t){var n="function"===typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var o=p(t,d);if(o){var i=o.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return m(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(l("iterator")&&(o=p(t,u)))return new n((function(e){v((function(){if(!e.closed){for(var n,i=r(o.call(t));!(n=i()).done;){var s=n.value;if(e.next(s),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){v((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"===typeof this?this:e)((function(e){v((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},s(e,null,[{key:h,get:function(){return this}}]),e}();a()&&Object.defineProperty(j,Symbol("extensions"),{value:{symbol:d,hostReportError:g},configurable:!0})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,n.d(i,s),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",n.nc=void 0,(()=>{"use strict";var e={};n.r(e),n.d(e,{boolean:()=>cn,booleanish:()=>un,commaOrSpaceSeparated:()=>mn,commaSeparated:()=>fn,number:()=>hn,overloadedBoolean:()=>dn,spaceSeparated:()=>pn});var t={};n.r(t),n.d(t,{attentionMarkers:()=>Yo,contentInitial:()=>$o,disable:()=>Qo,document:()=>Go,flow:()=>zo,flowInitial:()=>qo,insideSpan:()=>Wo,string:()=>Vo,text:()=>Ho});var r={};n.r(r),n.d(r,{exclude:()=>jJ,extract:()=>yJ,parse:()=>bJ,parseUrl:()=>wJ,pick:()=>CJ,stringify:()=>xJ,stringifyUrl:()=>SJ});n(4027),n(7412);var o=n(5043),i=n.t(o,2),s=n(4391),a=n(6326),l=n(7484),c=n(48),u=n.t(c,2),d=n(2622),h=d.ol?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function p(){(0,l.V1)(!0,45);var e=c.createContext[h];return e||(Object.defineProperty(c.createContext,h,{value:e=c.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var f=function(e){var t=e.client,n=e.children,r=p(),o=c.useContext(r),i=c.useMemo((function(){return(0,a.Cl)((0,a.Cl)({},o),{client:t||o.client})}),[o,t]);return(0,l.V1)(i.client,46),c.createElement(r.Provider,{value:i},n)},m=n(933),g=n(7320),v=n(2526),y=n(6800);function b(e){return new g.C((function(t,n){var r=(0,a.Tt)(t,[]);return new y.c((function(o){var i,s=!1;return Promise.resolve(r).then((function(n){return e(n,t.getContext())})).then(t.setContext).then((function(){s||(i=n(t).subscribe({next:o.next.bind(o),error:o.error.bind(o),complete:o.complete.bind(o)}))})).catch(o.error.bind(o)),function(){s=!0,i&&i.unsubscribe()}}))}))}var x=n(7165),w=n(5859);const S=w.J1`
  query {
    email @client {
      __typename
      email
    }
    solver @client {
      __typename
      activeGrade
      undoMoves
      redoMoves
      lastAssignmentCached
      selectedTeacherId
      selectedStudent {
        __typename
        studentId
        firstName
        lastName
        friends
        teacherConstraints
        studentConstraints
      }
    }
    studentFlags @client {
      __typename
      studentNewGradeChange
      studentUpdated
      deletedStudent
    }
    settings @client {
      __typename
      adminOnlyRequests
    }
    studentsImport @client {
      __typename
      jobId
      grades
      columns
    }
  }
`,C={email:{__typename:"email",email:""},solver:{__typename:"solver",activeGrade:"",undoMoves:[],redoMoves:[],lastAssignmentCached:"",selectedTeacherId:"",selectedStudent:{__typename:"selectedStudent",studentId:"",firstName:"",lastName:"",friends:[],teacherConstraints:[],studentConstraints:[]}},studentFlags:{__typename:"studentFlags",studentNewGradeChange:!1,studentUpdated:!1,deletedStudent:""},settings:{__typename:"settings",adminOnlyRequests:!1},studentsImport:{__typename:"studentsImport",jobId:null,grades:[],columns:[]}};var j=n(3536);const _=w.J1`
  query country {
    countries {
      code
      name
      states {
        code
        name
      }
    }
  }
`,k=w.J1`
  mutation signup(
    $addressLine1: String!
    $contactEmail: String!
    $contactFirstName: String!
    $contactLastName: String!
    $contactNumber: String!
    $countryCode: String!
    $numberOfStudents: Int
    $postcode: String!
    $schoolName: String!
    $stateCode: String!
    $suburb: String!
    $administrationSystem: String
    $contactPositionTitle: String
    $referrer: String
  ) {
    signup(
      addressLine1: $addressLine1
      contactEmail: $contactEmail
      contactFirstName: $contactFirstName
      contactLastName: $contactLastName
      contactNumber: $contactNumber
      countryCode: $countryCode
      numberOfStudents: $numberOfStudents
      postcode: $postcode
      schoolName: $schoolName
      stateCode: $stateCode
      suburb: $suburb
      administrationSystem: $administrationSystem
      contactPositionTitle: $contactPositionTitle
      referrer: $referrer
    ) {
      message
    }
  }
`,N=w.J1`
  query {
    email @client {
      email
    }
  }
`,E=w.J1`
  mutation updateEmail($email: String!) {
    updateEmail(email: $email) @client {
      email
    }
  }
`,T=w.J1`
  mutation ($id: ID!, $role: RoleTypes!, $schoolId: ID) {
    deleteUser(id: $id, role: $role, schoolId: $schoolId) {
      id
    }
  }
`,O=w.J1`
  query {
    myprofile {
      id
      firstName
      lastName
      email
      role
      schools {
        id
        name
        requireMfa
      }
      schoolInvitations {
        id
        school {
          name
        }
        inviterFullName
      }
      acceptedCustomerTermsAt
      acceptedUpdatesAndMarketing
      acceptedPrivacyPolicyAt
      positionTitle
      mfa
    }
  }
`,I=w.J1`
  mutation (
    $currentToken: String!
    $tokenType: LoginTokenTypes!
    $ccList: [String!]
  ) {
    requestNewToken(
      currentToken: $currentToken
      tokenType: $tokenType
      ccList: $ccList
    )
  }
`,R=w.J1`
  mutation ($teacherId: ID!, $tokenType: LoginTokenTypes!, $ccList: [String!]) {
    requestNewTokenForTeacher(
      teacherId: $teacherId
      tokenType: $tokenType
      ccList: $ccList
    )
  }
`,A=w.J1`
  mutation request_otp($currentToken: String!, $tokenType: LoginTokenTypes!) {
    requestOtp(currentToken: $currentToken, tokenType: $tokenType)
  }
`,M=w.J1`
  mutation ($token: String!, $password: String) {
    loginWithSolutionToken(solutionToken: $token, password: $password) {
      token
      user {
        id
        role
        schoolId
        firstName
      }
      permissions {
        showStudentRequests
        showTeacherRequests
        showMetrics
        showCharacteristics
        showTeachers
        showFriendships
        writable
      }
    }
  }
`,P=w.J1`
  mutation ($token: String!, $password: String) {
    loginWithSurveyToken(surveyToken: $token, password: $password) {
      token
      user {
        id
        role
        schoolId
        firstName
      }
    }
  }
`,D=w.J1`
  mutation verifyBearerToken($bearerToken: String!, $temporaryToken: String!) {
    verifyBearerToken(
      bearerToken: $bearerToken
      temporaryToken: $temporaryToken
    )
  }
`,F=w.J1`
  fragment RestrictedSolverReturn on Solution {
    id
    lockedStudentIds
    activeGrade {
      id
      label
      order
    }
    classes {
      classDetails {
        label
        id
        maxClassSize
        maxSizePerGrade {
          grade {
            id
            label
            code
          }
          max
        }
        schoolGrades {
          id
          code
          order
          label
        }
        entryCriteriaStudentAttribute {
          attribute
          value
        }
        entryCriteriaCharacteristicResponse {
          characteristicResponse {
            id
            characteristic {
              id
            }
          }
        }
        entryCriteriaNullResponse {
          characteristic {
            id
          }
        }
      }
      teachers {
        id
        firstName
        lastName
      }
      students {
        id
        firstName
        lastName
        gender
        studentCode
        newGrade {
          id
        }
        currentClass {
          id
          label
        }
        characteristicResponses {
          id
          label
          description
          value
          colour
          characteristic {
            id
            name
          }
        }
      }
      counts {
        total
        genders {
          activeMaleCount
          totalMaleCount
          activeFemaleCount
          totalFemaleCount
          activeNonBinaryCount
          totalNonBinaryCount
        }
      }
    }
    metrics {
      characteristicScores {
        aggregate {
          count
          total
        }
        characteristicMetrics {
          characteristic {
            id
            name
            characteristicResponses {
              id
              colour
              label
            }
          }
          metric {
            count
            total
          }
        }
      }
      atLeastOneFriend {
        count
        total
      }
      differentTeacher {
        count
        total
      }
      genderBalance {
        count
        total
      }
      importantRequests {
        count
        total
      }
      mandatoryRequests {
        count
        total
      }
      classEntryCriteria {
        count
        total
      }
    }
    studentMetrics {
      metrics {
        mandatoryRequests {
          count
          total
        }
        importantRequests {
          count
          total
        }
        differentTeacher
        classEntryCriteria
        friendshipPreferences {
          count
          total
        }
      }
      requestsMet {
        mandatoryRequests
        importantRequests
        differentTeacher
        classEntryCriteria
        friendshipPreferences
      }
      student {
        id
      }
    }
    assignment {
      id
      movedStudents {
        student {
          id
        }
      }
      changedClasses {
        id
        label
      }
    }
  }
`,L=w.J1`
  fragment SolverReturn on Solution {
    id
    lockedStudentIds
    metrics(adminOnly: $adminOnly) {
      characteristicScores {
        aggregate {
          count
          total
        }
        characteristicMetrics {
          characteristic {
            id
            name
            characteristicResponses {
              id
              colour
              label
            }
          }
          metric {
            count
            total
          }
        }
      }
      atLeastOneFriend {
        count
        total
      }
      differentTeacher {
        count
        total
      }
      genderBalance {
        count
        total
      }
      importantRequests {
        count
        total
      }
      mandatoryRequests {
        count
        total
      }
      classEntryCriteria {
        count
        total
      }
    }
    studentMetrics(adminOnly: $adminOnly) {
      metrics {
        mandatoryRequests {
          count
          total
        }
        importantRequests {
          count
          total
        }
        differentTeacher
        classEntryCriteria
        friendshipPreferences {
          count
          total
        }
      }
      requestsMet {
        mandatoryRequests
        importantRequests
        differentTeacher
        classEntryCriteria
        friendshipPreferences
      }
      student {
        id
      }
    }
    activeGrade {
      id
      label
      order
    }
    classes {
      classDetails {
        label
        id
        maxClassSize
        maxSizePerGrade {
          grade {
            id
            label
            code
          }
          max
        }
        entryCriteriaStudentAttribute {
          attribute
          value
        }
        entryCriteriaCharacteristicResponse {
          characteristicResponse {
            id
            characteristic {
              id
            }
          }
        }
        entryCriteriaNullResponse {
          characteristic {
            id
          }
        }
        schoolGrades {
          id
          code
          order
          label
        }
      }
      teachers {
        id
        firstName
        lastName
      }
      students {
        id
        firstName
        lastName
        gender
        comments
        studentCode
        newGrade {
          id
          code
          order
        }
        currentClass {
          id
          label
        }
        studentConstraints(adminOnly: $adminOnly) {
          id
          constraintId
          description
          mandatory
          pair
          met
          studentTo {
            id
            firstName
            lastName
          }
          studentFrom {
            id
            firstName
            lastName
          }
        }
        teacherConstraints(adminOnly: $adminOnly) {
          id
          constraintId
          teacherToId
          teacherTo {
            id
            firstName
            lastName
          }
          mandatory
          pair
          met
        }
        characteristicResponses {
          id
          label
          description
          value
          colour
          characteristic {
            id
            name
          }
        }
        friends {
          id
          constraintId
          studentFrom {
            id
            firstName
            lastName
          }
          studentTo {
            id
            firstName
            lastName
          }
          met
        }
      }
      counts {
        total
        genders {
          activeMaleCount
          totalMaleCount
          activeFemaleCount
          totalFemaleCount
          activeNonBinaryCount
          totalNonBinaryCount
        }
      }
    }
    suggestions {
      text
      type
    }
    warnings(adminOnly: $adminOnly) {
      classesWithoutTeachers
    }
    assignment {
      id
      movedStudents {
        student {
          id
        }
      }
      changedClasses {
        id
        label
      }
    }
  }
`,B=w.J1`
  query ($gradeId: ID!) {
    assignmentsForGradeId(gradeId: $gradeId) {
      id
      assignmentType
      user {
        firstName
        lastName
        role
      }
      movedStudents {
        student {
          id
          firstName
          lastName
        }
        to {
          id
          label
        }
        from {
          id
          label
        }
      }
      changedClasses {
        id
        label
      }
      parent {
        id
        insertedAt
      }
      insertedAt
    }
  }
`,U=w.J1`
  query ($gradeId: ID!) {
    favouritedAssignmentsForGradeId(gradeId: $gradeId) {
      id
      assignmentId
      notes

      user {
        firstName
        lastName
        role
      }
      insertedAt
    }
  }
`,G=w.J1`
  mutation ($assignmentId: ID!, $activeGradeId: ID!, $adminOnly: Boolean) {
    assignmentWithClasses(
      assignmentId: $assignmentId
      activeGradeId: $activeGradeId
    ) {
      classes {
        classDetails {
          label
          id
          maxClassSize
          maxSizePerGrade {
            grade {
              id
              label
              code
            }
            max
          }
          entryCriteriaStudentAttribute {
            attribute
            value
          }
          entryCriteriaCharacteristicResponse {
            characteristicResponse {
              id
              characteristic {
                id
              }
            }
          }
          entryCriteriaNullResponse {
            characteristic {
              id
            }
          }
          schoolGrades {
            id
            code
            order
            label
          }
        }
        teachers {
          id
          firstName
          lastName
        }
        students {
          id
          firstName
          lastName
          gender
          comments
          studentCode
          newGrade {
            id
            code
            order
          }
          currentClass {
            id
            label
          }
          studentConstraints(adminOnly: $adminOnly) {
            id
            constraintId
            description
            mandatory
            pair
            met
            studentTo {
              id
              firstName
              lastName
            }
            studentFrom {
              id
              firstName
              lastName
            }
          }
          teacherConstraints(adminOnly: $adminOnly) {
            id
            constraintId
            teacherToId
            teacherTo {
              id
              firstName
              lastName
            }
            mandatory
            pair
            met
          }
          characteristicResponses {
            id
            label
            description
            value
            colour
            characteristic {
              id
              name
            }
          }
          friends {
            id
            constraintId
            studentFrom {
              id
              firstName
              lastName
            }
            studentTo {
              id
              firstName
              lastName
            }
            met
          }
        }
        counts {
          total
          genders {
            activeMaleCount
            totalMaleCount
            activeFemaleCount
            totalFemaleCount
            activeNonBinaryCount
            totalNonBinaryCount
          }
        }
      }
    }
  }
`,$=w.J1`
  fragment BoostReturn on BoostSummary {
    solution {
      ...SolverReturn
    }
    new {
      solutionMetrics {
        atLeastOneFriend {
          count
          total
        }
        characteristicScores {
          aggregate {
            count
            total
          }
          characteristicMetrics {
            characteristic {
              id
              characteristicResponses {
                id
                colour
                label
              }
            }
            metric {
              count
              total
            }
          }
        }
        differentTeacher {
          count
          total
        }
        genderBalance {
          count
          total
        }
        importantRequests {
          count
          total
        }
        mandatoryRequests {
          count
          total
        }
        classEntryCriteria {
          count
          total
        }
      }
      student1 {
        class {
          id
          label
        }
        studentMetric {
          student {
            id
          }
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            classEntryCriteria
            friendshipPreferences {
              count
              total
            }
          }
        }
      }
      student2 {
        class {
          id
          label
        }
        studentMetric {
          student {
            id
          }
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            classEntryCriteria
            friendshipPreferences {
              count
              total
            }
          }
        }
      }
    }
    old {
      solutionMetrics {
        atLeastOneFriend {
          count
          total
        }
        characteristicScores {
          aggregate {
            count
            total
          }
          characteristicMetrics {
            characteristic {
              id
              characteristicResponses {
                id
                colour
                label
              }
            }
            metric {
              count
              total
            }
          }
        }
        differentTeacher {
          count
          total
        }
        genderBalance {
          count
          total
        }
        importantRequests {
          count
          total
        }
        mandatoryRequests {
          count
          total
        }
      }
      student1 {
        class {
          id
          label
        }
        studentMetric {
          student {
            id
          }
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            classEntryCriteria
            friendshipPreferences {
              count
              total
            }
          }
        }
      }
      student2 {
        class {
          id
          label
        }
        studentMetric {
          student {
            id
          }
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            classEntryCriteria
            friendshipPreferences {
              count
              total
            }
          }
        }
      }
    }
  }
  ${L}
`,q=w.J1`
  query ($solution: SolutionParams!, $adminOnly: Boolean) {
    solution(solution: $solution) {
      ... on Solution {
        ...SolverReturn
      }

      ... on SolutionStatus {
        id
        state
      }
    }
  }
  ${L}
`,z=w.J1`
  query getSharedSolution($solution: SolutionParams!) {
    sharedSolution(solution: $solution) {
      ...RestrictedSolverReturn
    }
  }
  ${F}
`,V=(w.J1`
  query ($solution: SolutionParams!, $adminOnly: Boolean) {
    solution(solution: $solution) {
      ... on Solution {
        studentMetrics(adminOnly: $adminOnly) {
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            classEntryCriteria
            friendshipPreferences {
              count
              total
            }
          }
          requestsMet {
            mandatoryRequests
            importantRequests
            differentTeacher
            classEntryCriteria
            friendshipPreferences
          }
          student {
            id
          }
        }
      }

      ... on SolutionStatus {
        id
        state
      }
    }
  }
`,w.J1`
  mutation ($solution: SolveParams!, $adminOnly: Boolean) {
    runSolveActiveGrade(solveActiveGradeParams: $solution) {
      ... on Solution {
        ...SolverReturn
      }
      ... on SolutionStatus {
        id
        state
      }
    }
  }
  ${L}
`),H=w.J1`
  mutation favouriteAnAssignment($favouriteParams: FavouriteParams!) {
    favouriteAnAssignment(favouriteParams: $favouriteParams) {
      schoolId
    }
  }
`,W=w.J1`
  mutation ($assignmentId: ID!) {
    unfavouriteAnAssignment(assignmentId: $assignmentId) {
      schoolId
    }
  }
`,Y=w.J1`
  mutation updateFavouritedAssignment(
    $updateFavouritedAssignmentParams: UpdateFavouritedAssignmentParams!
  ) {
    updateFavouritedAssignment(
      updateFavouritedAssignmentParams: $updateFavouritedAssignmentParams
    ) {
      id
    }
  }
`,Q=w.J1`
  mutation pickAnAssignment($pickAssignmentParams: PickAssignmentParams!) {
    pickAnAssignment(pickAssignmentParams: $pickAssignmentParams) {
      schoolId
      assignment {
        id
      }
    }
  }
`,J=w.J1`
  query ($id: ID!, $adminOnly: Boolean) {
    student(id: $id) {
      id
      firstName
      lastName
      gender
      studentCode
      comments
      currentClass {
        grades {
          id
          code
        }
        id
        label
      }
      currentGrade {
        id
        label
      }
      characteristicResponses {
        id
        characteristicId
        value
        colour
        label
        characteristic {
          id
          name
          priority
        }
      }
      constraintsCount(adminOnly: $adminOnly)
      friends {
        id
        studentTo {
          id
          firstName
          lastName
        }
      }
      studentConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        studentTo {
          id
          firstName
          lastName
        }
        studentFrom {
          id
          firstName
          lastName
        }
      }
      teacherConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        teacherTo {
          id
          firstName
          lastName
        }
      }
    }
  }
`,K=w.J1`
  mutation boostCharacteristic(
    $boostCharacteristicParams: BoostCharacteristicParams!
    $adminOnly: Boolean!
  ) {
    boostCharacteristicMetric(
      boostCharacteristicParams: $boostCharacteristicParams
      adminOnly: $adminOnly
    ) {
      ...BoostReturn
    }
  }
  ${$}
`,X=w.J1`
  mutation ($boostStudentParams: BoostStudentParams!, $adminOnly: Boolean!) {
    boostStudentMetric(
      boostStudentParams: $boostStudentParams
      adminOnly: $adminOnly
    ) {
      ...BoostReturn
    }
  }
  ${$}
`,Z=w.J1`
  mutation ($boostSolutionParams: BoostSolutionParams!, $adminOnly: Boolean!) {
    boostSolutionMetric(
      boostSolutionParams: $boostSolutionParams
      adminOnly: $adminOnly
    ) {
      ...BoostReturn
    }
  }
  ${$}
`,ee=w.J1`
  query ($schoolId: ID!) {
    allGradesWithNewClasses(schoolId: $schoolId) {
      id
      label
      newClasses {
        id
        label
        teachers {
          id
          firstName
          lastName
          email
        }
      }
    }
  }
`,te=w.J1`
  mutation updateSelectedStudent(
    $id: String!
    $firstName: String!
    $lastName: String!
    $friends: [friend]
    $teacherConstraints: [teacherConstraint]
    $studentConstraints: [studentConstraints]
  ) {
    updateSelectedStudent(
      studentId: $id
      firstName: $firstName
      lastName: $lastName
      friends: $friends
      teacherConstraints: $teacherConstraints
      studentConstraints: $studentConstraints
    ) @client {
      studentId
      firstName
      lastName
      friends
      teacherConstraints
      studentConstraints
    }
  }
`,ne=w.J1`
  mutation lockStudent($lockParams: LockParams!) {
    lockStudent(lockParams: $lockParams) {
      studentId
    }
  }
`,re=w.J1`
  mutation lockStudents(
    $studentIds: [ID!]!
    $lockedState: Boolean!
    $solutionId: ID!
  ) {
    lockStudents(
      studentIds: $studentIds
      lockedState: $lockedState
      solutionId: $solutionId
    ) {
      studentIds
      solutionId
    }
  }
`,oe=w.J1`
  mutation moveStudent(
    $moveStudentParamsList: MoveStudentParamsList!
    $adminOnly: Boolean
  ) {
    moveStudent(moveStudentParamsList: $moveStudentParamsList) {
      solution {
        ...SolverReturn
      }
    }
  }
  ${L}
`,ie=w.J1`
  mutation moveStudent($moveStudentParamsList: MoveStudentParamsList!) {
    moveStudent(moveStudentParamsList: $moveStudentParamsList) {
      solution {
        ...RestrictedSolverReturn
      }
    }
  }
  ${F}
`,se=w.J1`
  query {
    solver @client {
      activeGrade
      undoMoves
      redoMoves
      lastAssignmentCached
      selectedTeacherId
      selectedStudent {
        studentId
        firstName
        lastName
        friends
        teacherConstraints
        studentConstraints
      }
    }
  }
`,ae=w.J1`
  mutation updateSolverUndoRedo(
    $type: String!
    $assignmentObject: AssignmentObject
  ) {
    updateSolverUndoRedo(type: $type, assignmentObject: $assignmentObject)
      @client {
      assignmentObject
    }
  }
`,le=w.J1`
  mutation updateLastAssignment($lastAssignmentCached: Int!) {
    updateLastAssignment(lastAssignmentCached: $lastAssignmentCached) @client {
      lastAssignmentCached
    }
  }
`,ce=w.J1`
  mutation updateSolverActiveGrade($activeGrade: Int!) {
    updateSolverActiveGrade(activeGrade: $activeGrade) @client {
      activeGrade
    }
  }
`,ue=w.J1`
  mutation updateSelectedTeacherId($selectedTeacherId: Int!) {
    updateSelectedTeacherId(selectedTeacherId: $selectedTeacherId) @client {
      selectedTeacherId
    }
  }
`,de=w.J1`
  query ($schoolId: ID!) {
    teachersWithSharedSolutions(schoolId: $schoolId) {
      id
      firstName
      lastName
      email
      sharedSolutionToken {
        token
        showTeachers
        showTeacherRequests
        showStudentRequests
        showCharacteristics
        showMetrics
        showFriendships
        writable
        newClasses {
          id
          label
        }
        grades {
          id
          label
        }
        expired
        updatedAt
      }
    }
  }
`,he=(w.J1`
  mutation (
    $schoolId: ID!
    $teachers: [ID!]!
    $schoolGrades: [ID!]!
    $showTeachers: Boolean
    $showStudentRequests: Boolean
    $showTeacherRequests: Boolean
    $showMetrics: Boolean
    $showFriendships: Boolean
    $showCharacteristics: Boolean
    $writable: Boolean
    $message: String!
    $ccList: [String!]
  ) {
    shareSolutionWithTeachers(
      schoolId: $schoolId
      teachers: $teachers
      schoolGrades: $schoolGrades
      showTeachers: $showTeachers
      showFriendships: $showFriendships
      showStudentRequests: $showStudentRequests
      showTeacherRequests: $showTeacherRequests
      showCharacteristics: $showCharacteristics
      showMetrics: $showMetrics
      writable: $writable
      message: $message
      ccList: $ccList
    ) {
      id
    }
  }
`,w.J1`
  mutation (
    $classTeachersAssignments: [ClassTeachersAssignment!]!
    $message: String!
    $ccList: [String!]
  ) {
    shareSolutionClassesWithTeachers(
      classTeachersAssignments: $classTeachersAssignments
      message: $message
      ccList: $ccList
    ) {
      id
    }
  }
`),pe=w.J1`
  mutation ($schoolId: ID!, $teachers: [ID!]!) {
    unshareSolutionWithTeachers(schoolId: $schoolId, teachers: $teachers) {
      id
    }
  }
`,fe=w.J1`
  query ($teacherId: ID!, $adminOnly: Boolean!) {
    surveyStudents(teacherId: $teacherId) {
      id
      firstName
      lastName
      gender
      studentCode
      comments
      currentClass {
        id
        label
      }
      currentGrade {
        id
        code
        order
        label
      }
      newGrade {
        id
        code
        label
      }
      constraintsCount(adminOnly: $adminOnly)
      characteristicResponses {
        id
        description
        value
        characteristicId
        label
      }
      friends {
        id
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
    }
  }
`,me=w.J1`
  query ($adminOnly: Boolean, $schoolId: ID!) {
    students(schoolId: $schoolId) {
      id
      firstName
      lastName
      gender
      studentCode
      comments
      currentClass {
        id
        label
      }
      currentGrade {
        id
        code
        order
        label
      }
      newGrade {
        id
        code
        label
      }
      newClass {
        id
        label
      }
      constraintsCount(adminOnly: $adminOnly)
      characteristicResponses {
        id
        description
        value
        characteristicId
        label
      }
      friends {
        id
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      studentConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
        studentFrom {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      teacherConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        teacherTo {
          id
          firstName
          lastName
        }
        studentFrom {
          id
          firstName
          lastName
        }
      }
    }
  }
`,ge=w.J1`
  query ($schoolId: ID!, $ids: [ID!]!, $adminOnly: Boolean) {
    selectedStudents(schoolId: $schoolId, ids: $ids) {
      id
      firstName
      lastName
      gender
      studentCode
      comments
      currentClass {
        id
        label
      }
      currentGrade {
        id
        code
        order
        label
      }
      newGrade {
        id
        code
        label
      }
      newClass {
        id
        label
      }
      constraintsCount(adminOnly: $adminOnly)
      characteristicResponses {
        id
        description
        value
        characteristicId
        label
      }
      friends {
        id
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      studentConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
        studentFrom {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      teacherConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        teacherTo {
          id
          firstName
          lastName
        }
        studentFrom {
          id
          firstName
          lastName
        }
      }
    }
  }
`,ve=w.J1`
  query ($id: ID!, $adminOnly: Boolean) {
    student(id: $id) {
      id
      firstName
      lastName
      gender
      studentCode
      comments
      constraintsCount(adminOnly: $adminOnly)
      currentGrade {
        id
        code
        label
      }
      currentClass {
        id
        label
      }
      newGrade {
        id
        code
        label
      }
      newClass {
        id
        label
      }
      characteristicResponses {
        id
        characteristicId
        value
      }
      friends {
        id
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      studentConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
        studentFrom {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
        }
      }
      teacherConstraints(adminOnly: $adminOnly) {
        id
        constraintId
        description
        mandatory
        pair
        adminOnly
        teacherTo {
          id
          firstName
          lastName
        }
        studentFrom {
          id
          firstName
          lastName
        }
      }
    }
  }
`,ye=(w.J1`
  query ($schoolId: ID!) {
    schoolSettings(schoolId: $schoolId) {
      id
      maxFriends
    }
  }
`,w.J1`
  mutation ($id: ID!) {
    deleteStudent(id: $id) {
      id
    }
  }
`),be=w.J1`
  mutation createOrUpdateStudent($student: StudentParams!) {
    createOrUpdateStudent(student: $student) {
      id
    }
  }
`,xe=(w.J1`
  mutation createStudent($student: CreateStudentParams!) {
    createStudent(student: $student) {
      id
    }
  }
`,w.J1`
  mutation createOrUpdateInactiveStudent($student: CreateStudentParams!) {
    createOrUpdateInactiveStudent(student: $student) {
      id
    }
  }
`),we=w.J1`
  mutation updateNewGradeForStudents(
    $updateNewGradeParams: UpdateNewGradeParams!
  ) {
    updateNewGradeForStudents(updateNewGradeParams: $updateNewGradeParams)
  }
`,Se=w.J1`
  query ($schoolId: ID!) {
    students(schoolId: $schoolId) {
      id
      firstName
      lastName
      currentClass {
        id
        label
      }
    }
  }
`,Ce=w.J1`
  mutation updateStudentCharacteristicResponses(
    $characteristicResponseIds: [ID!]!
    $studentId: ID!
  ) {
    updateStudentCharacteristicResponses(
      characteristicResponseIds: $characteristicResponseIds
      studentId: $studentId
    ) {
      id
    }
  }
`,je=w.J1`
  mutation updateInsensitiveStudentCharacteristicResponses(
    $characteristicResponseIds: [ID!]!
    $studentId: ID!
  ) {
    updateInsensitiveStudentCharacteristicResponses(
      characteristicResponseIds: $characteristicResponseIds
      studentId: $studentId
    ) {
      id
    }
  }
`,_e=w.J1`
  mutation ($schoolId: ID!, $file: Upload!) {
    bulkUploadStudents(schoolId: $schoolId, file: $file) {
      id
      status
    }
  }
`,ke=w.J1`
  query {
    studentFlags @client {
      studentNewGradeChange
      studentUpdated
      deletedStudent
    }
  }
`,Ne=w.J1`
  mutation updateStudentEditFlag($type: String!, $value: Boolean!) {
    updateStudentEditFlag(type: $type, value: $value) @client {
      studentNewGradeChange
    }
  }
`,Ee=(w.J1`
  mutation ($schoolId: ID!) {
    deleteAllStudentNotes(schoolId: $schoolId)
  }
`,w.J1`
  mutation ($schoolId: ID!, $currentGradeIds: [ID!]!) {
    deleteStudentNotesByCurrentGrades(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
    )
  }
`),Te=w.J1`
  mutation ($schoolId: ID!, $currentGradeIds: [ID!]!) {
    deleteStudentsByCurrentGrades(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
    )
  }
`,Oe=w.J1`
  mutation ($schoolId: ID!, $currentClassIds: [ID!]!) {
    deleteStudentsByCurrentClasses(
      schoolId: $schoolId
      currentClassIds: $currentClassIds
    )
  }
`,Ie=w.J1`
  mutation ($schoolId: ID!, $currentGradeIds: [ID!]!) {
    deactivateStudentsByCurrentGrades(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
    )
  }
`,Re=w.J1`
  mutation ($schoolId: ID!, $currentClassIds: [ID!]!) {
    deactivateStudentsByCurrentClasses(
      schoolId: $schoolId
      currentClassIds: $currentClassIds
    )
  }
`,Ae=w.J1`
  {
    studentPage @client {
      filterId
    }
  }
`,Me=w.J1`
  query studentHistories($schoolId: ID!) {
    studentHistories(schoolId: $schoolId) {
      file {
        id
        fileName
        link
        timestamp
      }
      id
    }
  }
`,Pe=w.J1`
  mutation ($schoolId: ID!, $currentGradeIds: [ID!]!) {
    switchStudentNamesByCurrentGrades(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
    )
  }
`,De=(w.J1`
  mutation ($schoolId: ID!) {
    switchStudentNames(schoolId: $schoolId)
  }
`,w.J1`
  mutation ($schoolId: ID!) {
    deactivateAllStudents(schoolId: $schoolId)
  }
`),Fe=w.J1`
  query ($schoolId: ID!) {
    school(schoolId: $schoolId) {
      id
      address
      name
      contactNumber
      countryCode
      numberOfStudents
      suburb
      countryCode
      stateCode
      postcode
      contactNumber
      administrationSystem
      paymentStatus {
        status
      }
      accountType
      accountName
      crmStatus
    }
  }
`,Le=w.J1`
  query ($schoolId: ID!) {
    school(schoolId: $schoolId) {
      id
      address
      name
      contactNumber
      countryCode
      numberOfStudents
      suburb
      countryCode
      stateCode
      postcode
      contactNumber
      administrationSystem
      billingEmailAddresses
      adminCanInviteUser
      paymentStatus {
        status
      }
      powerschoolSisConfig {
        id
        clientSecret
        clientId
        powerschoolSchoolId
        apiEndpoint
        currentClassOption
      }
      sftpSisConfig {
        id
        endpoint
        external
        user
        password
        publicKey
        autoSync
      }
      accountType
      accountName
      crmStatus
    }
  }
`,Be=w.J1`
  query ($schoolId: ID!) {
    school(schoolId: $schoolId) {
      id
      address
      name
      contactNumber
      countryCode
      numberOfStudents
      suburb
      countryCode
      stateCode
      postcode
      contactNumber
      crmAccountName
      crmLink
      administrationSystem
      billingEmailAddresses
      paymentStatus {
        status
      }
      powerschoolSisConfig {
        id
        clientSecret
        clientId
        powerschoolSchoolId
        apiEndpoint
      }
      sftpSisConfig {
        id
        endpoint
        external
        user
        password
        publicKey
        autoSync
      }
      schoolStatus
      managers {
        id
        firstName
        lastName
      }
      accountType
      accountName
      crmStatus
    }
  }
`,Ue=w.J1`
  query {
    schools {
      id
      name
      stateCode
      suburb
      crm_account_name
    }
  }
`,Ge=w.J1`
  query ($schoolId: ID!) {
    schoolSettings(schoolId: $schoolId) {
      id
      maxFriends
      adminOnlyRequests
      avoidSameTeacher
      teachersToAddTeacherRequests
      teachersToAddStudentRequests
      includeStudentsWithNoValidFriends
      overrideSolverLock
      minFriendPrefs
      currentClassCharacteristicMinRc
      currentClassCharacteristicPriority
      currentClassAsCharacteristic
      autoRollover
      showTeachersInSolver
      allowWritableSharedSolutions
      newAccountLock
      minStudentCodeLength
      feederSchool
      requireOtp
      requireMfa
      autoServicing
      depersonaliseStudents
    }
  }
`,$e=w.J1`
  query ($schoolId: ID, $filterRole: RoleTypes) {
    users(schoolId: $schoolId, filterRole: $filterRole) {
      id
      firstName
      lastName
      positionTitle
      email
      role
      schools {
        id
      }
      mfa
      lastLogin
      insertedAt
      updatedAt
      emailVerified
    }
  }
`,qe=w.J1`
  mutation ($schoolSettingParams: SchoolSettingParams) {
    updateSchoolSetting(schoolSetting: $schoolSettingParams) {
      id
      adminOnlyRequests
      avoidSameTeacher
      teachersToAddTeacherRequests
      teachersToAddStudentRequests
      maxFriends
      overrideSolverLock
      minFriendPrefs
      currentClassCharacteristicMinRc
      currentClassCharacteristicPriority
      currentClassAsCharacteristic
      autoRollover
      showTeachersInSolver
      allowWritableSharedSolutions
      newAccountLock
      minStudentCodeLength
      feederSchool
      requireOtp
      requireMfa
      autoServicing
      depersonaliseStudents
    }
  }
`,ze=w.J1`
  query ($email: String!) {
    userByEmail(email: $email) {
      id
      firstName
      lastName
      email
      role
      positionTitle
      schools {
        id
        name
        stateCode
        suburb
        crm_account_name
      }
    }
  }
`,Ve=w.J1`
  mutation ($user: UpdateUserParams!) {
    createOrUpdateUser(user: $user) {
      id
    }
  }
`,He=w.J1`
  mutation ($self: UpdateSelfParams!) {
    updateSelf(self: $self) {
      id
    }
  }
`,We=w.J1`
  mutation ($id: ID!) {
    deleteSelf(id: $id) {
      id
    }
  }
`,Ye=w.J1`
  mutation ($userId: ID!, $schoolIds: [ID!]!) {
    removeUserFromSchools(userId: $userId, schoolIds: $schoolIds) {
      id
    }
  }
`,Qe=w.J1`
  mutation ($school: SchoolParams) {
    createOrUpdateSchool(school: $school) {
      id
      billingEmailAddresses
    }
  }
`,Je=w.J1`
  mutation ($schoolId: ID!) {
    deleteSchool(schoolId: $schoolId) {
      id
    }
  }
`,Ke=(w.J1`
  mutation ($schoolIds: [ID!]) {
    cleanUploadedFiles(schoolIds: $schoolIds)
  }
`,w.J1`
  mutation cloneSchool(
    $schoolId: ID!
    $cloneSchoolParams: CloneSchoolParams!
    $dataToClone: [ClonedData!]
    $accountType: AccountType!
    $currentGradeIds: [ID!]!
  ) {
    cloneSchool(
      schoolId: $schoolId
      cloneSchoolParams: $cloneSchoolParams
      dataToClone: $dataToClone
      accountType: $accountType
      currentGradeIds: $currentGradeIds
    ) {
      id
      name
      address
    }
  }
`),Xe=w.J1`
  mutation ($schoolId: ID!) {
    deleteSchoolData(schoolId: $schoolId) {
      id
    }
  }
`,Ze=w.J1`
  query {
    settings @client {
      adminOnlyRequests
    }
  }
`,et=w.J1`
  mutation updateSettings($type: String!, $value: Value!) {
    updateSettings(type: $type, value: $value) @client
  }
`,tt=w.J1`
  mutation rollOverData($schoolId: ID!) {
    rollOverData(schoolId: $schoolId)
  }
`,nt=w.J1`
  mutation convertToCabins($schoolId: ID!) {
    convertToCabins(schoolId: $schoolId)
  }
`,rt=w.J1`
  mutation convertToActivityGroups($schoolId: ID!) {
    convertToActivityGroups(schoolId: $schoolId)
  }
`,ot=w.J1`
  mutation moveStudentsToTheirNewGrade($schoolId: ID!) {
    moveStudentsToTheirNewGrade(schoolId: $schoolId)
  }
`,it=w.J1`
  mutation removeSolutionsForGrades($schoolId: ID!, $gradeIds: [ID!]!) {
    removeSolutionsForGrades(schoolId: $schoolId, gradeIds: $gradeIds)
  }
`,st=w.J1`
  mutation backupSchool($schoolId: ID!) {
    backupSchool(schoolId: $schoolId)
  }
`,at=w.J1`
  mutation restoreSchoolBackup($schoolId: ID!, $fileName: String!) {
    restoreSchoolBackup(schoolId: $schoolId, fileName: $fileName)
  }
`,lt=w.J1`
  mutation sendMissingIdsEmails {
    sendMissingIdsEmails
  }
`,ct=w.J1`
  query availableSchoolBackups($schoolId: ID!) {
    availableSchoolBackups(schoolId: $schoolId) {
      id
      file {
        id
        fileName
        timestamp
      }
    }
  }
`,ut=w.J1`
  mutation ($schoolId: ID!, $file: Upload!) {
    bulkUploadMisc(schoolId: $schoolId, file: $file)
  }
`,dt=w.J1`
  mutation ($schoolId: ID!, $config: PowerschoolSisConfigInput!) {
    createOrUpdateSisConfigPowerschool(schoolId: $schoolId, config: $config) {
      id
      clientId
      clientSecret
      powerschoolSchoolId
      apiEndpoint
      currentClassOption
    }
  }
`,ht=(w.J1`
  mutation ($schoolId: ID!, $config: SftpSisConfigInput!) {
    createOrUpdateSisConfigSftp(schoolId: $schoolId, config: $config) {
      id
      endpoint
      external
      user
      password
      publicKey
      autoSync
    }
  }
`,w.J1`
  query invitationsForSchool($schoolId: ID!) {
    invitationsForSchool(schoolId: $schoolId) {
      id
      email
      updatedAt
    }
  }
`),pt=w.J1`
  mutation inviteUsersToSchool($emails: [String!]!, $schoolId: ID!) {
    inviteUsersToSchool(emails: $emails, schoolId: $schoolId) {
      id
      email
      updatedAt
    }
  }
`,ft=w.J1`
  mutation revokeSchoolInvitation($inviteId: ID!) {
    revokeSchoolInvitation(inviteId: $inviteId)
  }
`,mt=w.J1`
  mutation acceptSchoolInvitation($inviteId: ID!) {
    acceptSchoolInvitation(inviteId: $inviteId)
  }
`,gt=w.J1`
  mutation declineSchoolInvitation($inviteId: ID!) {
    declineSchoolInvitation(inviteId: $inviteId)
  }
`,vt=w.J1`
  mutation updateStudentImportMatchers($newMatchers: Matchers) {
    updateStudentImportMatchers(newMatchers: $newMatchers) @client {
      studentsImport {
        jobId
        grades
        columns
      }
    }
  }
`,yt=w.J1`
  query GetStudentImportMacthers {
    studentsImport @client {
      jobId
      grades
      columns
    }
  }
`,bt=w.J1`
  query ($schoolId: ID!, $columnMap: [ColumnMap]) {
    school(schoolId: $schoolId) {
      id
      uploadJobs {
        id
        status
        type
        fileSummary(columnMap: $columnMap) {
          ... on StudentUploadSummary {
            headers
            classes {
              name
              studentCount
            }
            grades {
              name
              studentCount
            }
            existingStudents {
              studentCode
            }
          }
          ... on TeacherUploadSummary {
            headers
            sourceClassLabels {
              label
            }
            currentClassesInSchool {
              label
            }
          }
        }
        failureCount
      }
    }
  }
`,xt=w.J1`
  mutation importUploadedFileFromJob(
    $jobId: ID!
    $classNameMappings: [ClassNameMap]!
    $gradeNameMappings: [GradeNameMap]!
    $columnMappings: [ColumnMap]!
  ) {
    importUploadedFileFromJob(
      jobId: $jobId
      classNameMappings: $classNameMappings
      gradeNameMappings: $gradeNameMappings
      columnMappings: $columnMappings
    ) {
      id
      status
      type
    }
  }
`,wt=w.J1`
  mutation updateBulkUploadJob($jobParams: JobParams!) {
    updateBulkUploadJob(jobParams: $jobParams) {
      id
      status
      failureCount
    }
  }
`,St=w.J1`
  mutation directlyImportStudentFile($schoolId: ID!, $file: Upload!) {
    directlyImportStudentFile(schoolId: $schoolId, file: $file)
  }
`,Ct=w.J1`
  mutation directlyImportTeacherFile($schoolId: ID!, $file: Upload!) {
    directlyImportTeacherFile(schoolId: $schoolId, file: $file)
  }
`,jt=w.J1`
  mutation directlyImportTeacherRequestsFile(
    $schoolId: ID!
    $file: Upload!
    $ignoreMissingIndividualsErrors: Boolean
  ) {
    directlyImportTeacherRequestsFile(
      schoolId: $schoolId
      file: $file
      ignoreMissingIndividualsErrors: $ignoreMissingIndividualsErrors
    )
  }
`,_t=w.J1`
  mutation directlyImportStudentRequestsFile(
    $schoolId: ID!
    $file: Upload!
    $ignoreMissingIndividualsErrors: Boolean
  ) {
    directlyImportStudentRequestsFile(
      schoolId: $schoolId
      file: $file
      ignoreMissingIndividualsErrors: $ignoreMissingIndividualsErrors
    )
  }
`,kt=w.J1`
  mutation directlyImportCharacteristicResponsesFile(
    $schoolId: ID!
    $file: Upload!
  ) {
    directlyImportCharacteristicResponsesFile(schoolId: $schoolId, file: $file)
  }
`,Nt=w.J1`
  mutation directlyImportFriendshipFile($schoolId: ID!, $file: Upload!) {
    directlyImportFriendshipFile(schoolId: $schoolId, file: $file)
  }
`,Et=w.J1`
  mutation directlyImportSolutionFile($schoolId: ID!, $file: Upload!) {
    directlyImportSolutionFile(schoolId: $schoolId, file: $file)
  }
`,Tt=w.J1`
  mutation directlyImportSchoolCharacteristicsFile(
    $schoolId: ID!
    $file: Upload!
  ) {
    directlyImportSchoolCharacteristicsFile(schoolId: $schoolId, file: $file)
  }
`,Ot=w.J1`
  mutation directlyImportNewClassesFile($schoolId: ID!, $file: Upload!) {
    directlyImportNewClassesFile(schoolId: $schoolId, file: $file)
  }
`,It=w.J1`
  mutation importChangeStudentCodesFile(
    $schoolId: ID!
    $file: Upload!
    $validateStudentCodes: Boolean
  ) {
    importChangeStudentCodesFile(
      schoolId: $schoolId
      file: $file
      validateStudentCodes: $validateStudentCodes
    )
  }
`,Rt=w.J1`
  mutation importChangeTeacherEmailsFile($schoolId: ID!, $file: Upload!) {
    importChangeTeacherEmailsFile(schoolId: $schoolId, file: $file)
  }
`,At=w.J1`
  mutation importDeleteStudentsFile($schoolId: ID!, $file: Upload!) {
    importDeleteStudentsFile(schoolId: $schoolId, file: $file)
  }
`,Mt=w.J1`
  mutation syncStudentsFromFile(
    $schoolId: ID!
    $file: Upload!
    $syncActions: [SyncAction!]
    $currentGradeIds: [ID!]
  ) {
    syncStudentsFromFile(
      schoolId: $schoolId
      file: $file
      syncActions: $syncActions
      currentGradeIds: $currentGradeIds
    )
  }
`,Pt=w.J1`
  query {
    __schema {
      mutationType {
        name
        fields {
          name
          description
        }
      }
    }
  }
`,Dt="PUSH",Ft="UNDO",Lt="REDO",Bt="CLEAR",Ut="STUDENT_NEW_GRADE_CHANGE",Gt="STUDENT_UPDATED",$t="DELETED_STUDENT",qt="ADMIN_ONLY",zt={Mutation:{updateEmail:(e,{email:t},{cache:n})=>{const r=N,o={email:{...n.readQuery({query:r}).email,email:t}};return n.writeQuery({query:r,data:o}),null},updateSolverActiveGrade:(e,{activeGrade:t},{cache:n})=>{const r=se,o={solver:{...n.readQuery({query:r}).solver,activeGrade:t}};return n.writeQuery({query:r,data:o}),null},updateSelectedTeacherId:(e,{selectedTeacherId:t},{cache:n})=>{const r=se,o=n.readQuery({query:r}),i={solver:{...o.solver,selectedTeacherId:o.solver.selectedTeacherId===t?"":t,selectedStudent:C.solver.selectedStudent}};return n.writeQuery({query:r,data:i}),null},updateSelectedStudent:(e,{studentId:t,firstName:n,lastName:r,friends:o,studentConstraints:i,teacherConstraints:s},{cache:a})=>{const l=se,c={solver:{...a.readQuery({query:l}).solver,selectedStudent:{__typename:"selectedStudent",studentId:t,firstName:n,lastName:r,friends:o,studentConstraints:i,teacherConstraints:s},selectedTeacherId:""}};return a.writeQuery({query:l,data:c}),null},updateLastAssignment:(e,{lastAssignmentCached:t},{cache:n})=>{const r=se,o={solver:{...n.readQuery({query:r}).solver,lastAssignmentCached:t}};return n.writeQuery({query:r,data:o}),null},updateSolverUndoRedo:(e,{type:t,assignmentObject:n},{cache:r})=>{const o=se,i=(0,j.cloneDeep)(r.readQuery({query:o}));let s={};switch(t){case Dt:return s={solver:{...i.solver,undoMoves:[...i.solver.undoMoves,n],redoMoves:[]}},r.writeQuery({query:o,data:s}),null;case Bt:return s={solver:{...i.solver,undoMoves:[],redoMoves:[]}},r.writeQuery({query:o,data:s}),null;case Ft:{const e=i.solver.undoMoves.pop();s={solver:{...i.solver,undoMoves:i.solver.undoMoves,redoMoves:[...i.solver.redoMoves,e]}},r.writeQuery({query:o,data:s});return{assignmentObject:{toAssignment:e.fromAssignment,fromAssignment:e.toAssignment},type:Ft}}case Lt:{const e=i.solver.redoMoves.pop();return s={solver:{...i.solver,redoMoves:i.solver.redoMoves,undoMoves:[...i.solver.undoMoves,e]}},r.writeQuery({query:o,data:s}),{assignmentObject:e,type:Lt}}default:return null}},updateStudentEditFlag:(e,{type:t,value:n},{cache:r})=>{const o=ke,i=r.readQuery({query:o});let s={};switch(t){case Ut:s={studentFlags:{...i.studentFlags,studentNewGradeChange:n,studentUpdated:n}};break;case $t:s={studentFlags:{...i.studentFlags,deletedStudent:n,studentUpdated:!0}};break;case Gt:s={studentFlags:{...i.studentFlags,studentUpdated:n}}}return r.writeQuery({query:o,data:s}),null},updateSettings:(e,{type:t,value:n},{cache:r})=>{const o=Ze,i=r.readQuery({query:o});let s={};if(t===qt)s={settings:{...i.settings,adminOnlyRequests:n}};return r.writeQuery({query:o,data:s}),null},updateStudentImportMatchers:(e,{newMatchers:t},{cache:n})=>{const r=yt,o=n.readQuery({query:r}),i={...o,studentsImport:{...o.studentsImport,...t},__typename:"studentsImport"};return n.writeQuery({query:r,data:i}),i}}},Vt="AUTH_TOKEN",Ht="SCHOOL_ID",Wt="PERMISSIONS",Yt="SHOW_SOLVER_MODAL",Qt="REGION",Jt="TEACHER_ID";const Kt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zt={};function en(e,t){return((t||Zt).jsx?Xt:Kt).test(e)}const tn=/[ \t\n\f\r]/g;function nn(e){return""===e.replace(tn,"")}class rn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function on(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new rn(n,r,t)}function sn(e){return e.toLowerCase()}rn.prototype.property={},rn.prototype.normal={},rn.prototype.space=null;class an{constructor(e,t){this.property=e,this.attribute=t}}an.prototype.space=null,an.prototype.boolean=!1,an.prototype.booleanish=!1,an.prototype.overloadedBoolean=!1,an.prototype.number=!1,an.prototype.commaSeparated=!1,an.prototype.spaceSeparated=!1,an.prototype.commaOrSpaceSeparated=!1,an.prototype.mustUseProperty=!1,an.prototype.defined=!1;let ln=0;const cn=gn(),un=gn(),dn=gn(),hn=gn(),pn=gn(),fn=gn(),mn=gn();function gn(){return 2**++ln}const vn=Object.keys(e);class yn extends an{constructor(t,n,r,o){let i=-1;if(super(t,n),bn(this,"space",o),"number"===typeof r)for(;++i<vn.length;){const t=vn[i];bn(this,vn[i],(r&e[t])===e[t])}}}function bn(e,t,n){n&&(e[t]=n)}yn.prototype.defined=!0;const xn={}.hasOwnProperty;function wn(e){const t={},n={};let r;for(r in e.properties)if(xn.call(e.properties,r)){const o=e.properties[r],i=new yn(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[sn(r)]=r,n[sn(i.attribute)]=r}return new rn(t,n,e.space)}const Sn=wn({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Cn=wn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function jn(e,t){return t in e?e[t]:t}function _n(e,t){return jn(e,t.toLowerCase())}const kn=wn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:_n,properties:{xmlns:null,xmlnsXLink:null}}),Nn=wn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:un,ariaAutoComplete:null,ariaBusy:un,ariaChecked:un,ariaColCount:hn,ariaColIndex:hn,ariaColSpan:hn,ariaControls:pn,ariaCurrent:null,ariaDescribedBy:pn,ariaDetails:null,ariaDisabled:un,ariaDropEffect:pn,ariaErrorMessage:null,ariaExpanded:un,ariaFlowTo:pn,ariaGrabbed:un,ariaHasPopup:null,ariaHidden:un,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pn,ariaLevel:hn,ariaLive:null,ariaModal:un,ariaMultiLine:un,ariaMultiSelectable:un,ariaOrientation:null,ariaOwns:pn,ariaPlaceholder:null,ariaPosInSet:hn,ariaPressed:un,ariaReadOnly:un,ariaRelevant:null,ariaRequired:un,ariaRoleDescription:pn,ariaRowCount:hn,ariaRowIndex:hn,ariaRowSpan:hn,ariaSelected:un,ariaSetSize:hn,ariaSort:null,ariaValueMax:hn,ariaValueMin:hn,ariaValueNow:hn,ariaValueText:null,role:null}}),En=wn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:_n,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fn,acceptCharset:pn,accessKey:pn,action:null,allow:null,allowFullScreen:cn,allowPaymentRequest:cn,allowUserMedia:cn,alt:null,as:null,async:cn,autoCapitalize:null,autoComplete:pn,autoFocus:cn,autoPlay:cn,blocking:pn,capture:null,charSet:null,checked:cn,cite:null,className:pn,cols:hn,colSpan:null,content:null,contentEditable:un,controls:cn,controlsList:pn,coords:hn|fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cn,defer:cn,dir:null,dirName:null,disabled:cn,download:dn,draggable:un,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cn,formTarget:null,headers:pn,height:hn,hidden:cn,high:hn,href:null,hrefLang:null,htmlFor:pn,httpEquiv:pn,id:null,imageSizes:null,imageSrcSet:null,inert:cn,inputMode:null,integrity:null,is:null,isMap:cn,itemId:null,itemProp:pn,itemRef:pn,itemScope:cn,itemType:pn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cn,low:hn,manifest:null,max:null,maxLength:hn,media:null,method:null,min:null,minLength:hn,multiple:cn,muted:cn,name:null,nonce:null,noModule:cn,noValidate:cn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:cn,optimum:hn,pattern:null,ping:pn,placeholder:null,playsInline:cn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cn,referrerPolicy:null,rel:pn,required:cn,reversed:cn,rows:hn,rowSpan:hn,sandbox:pn,scope:null,scoped:cn,seamless:cn,selected:cn,shadowRootDelegatesFocus:cn,shadowRootMode:null,shape:null,size:hn,sizes:null,slot:null,span:hn,spellCheck:un,src:null,srcDoc:null,srcLang:null,srcSet:null,start:hn,step:null,style:null,tabIndex:hn,target:null,title:null,translate:null,type:null,typeMustMatch:cn,useMap:null,value:un,width:hn,wrap:null,align:null,aLink:null,archive:pn,axis:null,background:null,bgColor:null,border:hn,borderColor:null,bottomMargin:hn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cn,declare:cn,event:null,face:null,frame:null,frameBorder:null,hSpace:hn,leftMargin:hn,link:null,longDesc:null,lowSrc:null,marginHeight:hn,marginWidth:hn,noResize:cn,noHref:cn,noShade:cn,noWrap:cn,object:null,profile:null,prompt:null,rev:null,rightMargin:hn,rules:null,scheme:null,scrolling:un,standby:null,summary:null,text:null,topMargin:hn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:hn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cn,disableRemotePlayback:cn,prefix:null,property:null,results:hn,security:null,unselectable:null}}),Tn=wn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:jn,properties:{about:mn,accentHeight:hn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:hn,amplitude:hn,arabicForm:null,ascent:hn,attributeName:null,attributeType:null,azimuth:hn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:hn,by:null,calcMode:null,capHeight:hn,className:pn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:hn,diffuseConstant:hn,direction:null,display:null,dur:null,divisor:hn,dominantBaseline:null,download:cn,dx:null,dy:null,edgeMode:null,editable:null,elevation:hn,enableBackground:null,end:null,event:null,exponent:hn,externalResourcesRequired:null,fill:null,fillOpacity:hn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fn,g2:fn,glyphName:fn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:hn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:hn,horizOriginX:hn,horizOriginY:hn,id:null,ideographic:hn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:hn,k:hn,k1:hn,k2:hn,k3:hn,k4:hn,kernelMatrix:mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:hn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:hn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:hn,overlineThickness:hn,paintOrder:null,panose1:null,path:null,pathLength:hn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:hn,pointsAtY:hn,pointsAtZ:hn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mn,rev:mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mn,requiredFeatures:mn,requiredFonts:mn,requiredFormats:mn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:hn,specularExponent:hn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:hn,strikethroughThickness:hn,string:null,stroke:null,strokeDashArray:mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:hn,strokeOpacity:hn,strokeWidth:null,style:null,surfaceScale:hn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mn,tabIndex:hn,tableValues:null,target:null,targetX:hn,targetY:hn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:hn,underlineThickness:hn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:hn,values:null,vAlphabetic:hn,vMathematical:hn,vectorEffect:null,vHanging:hn,vIdeographic:hn,version:null,vertAdvY:hn,vertOriginX:hn,vertOriginY:hn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:hn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),On=on([Cn,Sn,kn,Nn,En],"html"),In=on([Cn,Sn,kn,Nn,Tn],"svg"),Rn=/^data[-\w.:]+$/i,An=/-[a-z]/g,Mn=/[A-Z]/g;function Pn(e){return"-"+e.toLowerCase()}function Dn(e){return e.charAt(1).toUpperCase()}const Fn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Ln=n(4222);const Bn=Ln.default||Ln,Un=$n("end"),Gn=$n("start");function $n(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"===typeof n.line&&n.line>0&&"number"===typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"===typeof n.offset&&n.offset>-1?n.offset:void 0}}}function qn(e){return e&&"object"===typeof e?"position"in e||"type"in e?Vn(e.position):"start"in e||"end"in e?Vn(e):"line"in e||"column"in e?zn(e):"":""}function zn(e){return Hn(e&&e.line)+":"+Hn(e&&e.column)}function Vn(e){return zn(e&&e.start)+"-"+zn(e&&e.end)}function Hn(e){return e&&"number"===typeof e?e:1}class Wn extends Error{constructor(e,t,n){super(),"string"===typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"===typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"===typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=qn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"===typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wn.prototype.file="",Wn.prototype.name="",Wn.prototype.reason="",Wn.prototype.message="",Wn.prototype.stack="",Wn.prototype.column=void 0,Wn.prototype.line=void 0,Wn.prototype.ancestors=void 0,Wn.prototype.cause=void 0,Wn.prototype.fatal=void 0,Wn.prototype.place=void 0,Wn.prototype.ruleId=void 0,Wn.prototype.source=void 0;const Yn={}.hasOwnProperty,Qn=new Map,Jn=/[A-Z]/g,Kn=/-([a-z])/g,Xn=new Set(["table","tbody","thead","tfoot","tr"]),Zn=new Set(["td","th"]),er="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!==typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const s=Array.isArray(o.children),a=Gn(n);return t(r,o,i,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!==typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!==typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const s=Array.isArray(o.children)?n:t;return i?s(r,o,i):s(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?In:On,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=nr(o,e,void 0);return i&&"string"!==typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function nr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=In,e.schema=o);e.ancestors.push(t);const i=ar(e,t.tagName,!1),s=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Yn.call(t.properties,o)){const i=sr(e,o,t.properties[o]);if(i){const[o,s]=i;e.tableCellAlignToStyle&&"align"===o&&"string"===typeof s&&Zn.has(t.tagName)?r=s:n[o]=s}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=ir(e,t);Xn.has(t.tagName)&&(a=a.filter((function(e){return"string"!==typeof e||!("object"===typeof(t=e)?"text"===t.type&&nn(t.value):nn(t));var t})));return rr(e,s,i,t),or(s,a),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}lr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=In,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:ar(e,t.name,!0),s=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else lr(e,t.position);else{const o=r.name;let i;if(r.value&&"object"===typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else lr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=ir(e,t);return rr(e,s,i,t),or(s,a),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);lr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return or(r,ir(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function rr(e,t,n,r){"string"!==typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function or(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ir(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Qn;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;s=e+"-"+t,o.set(e,t+1)}}const a=nr(e,i,s);void 0!==a&&n.push(a)}return n}function sr(e,t,n){const r=function(e,t){const n=sn(t);let r=t,o=an;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Rn.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(An,Dn);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!An.test(e)){let n=e.replace(Mn,Pn);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=yn}return new o(r,t)}(e.schema,t);if(!(null===n||void 0===n||"number"===typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"===typeof n?n:function(e,t){const n={};try{Bn(t,r)}catch(o){if(!e.ignoreInvalidStyle){const t=o,n=new Wn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=er+"#cannot-parse-style-attribute",n}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(Kn,ur)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Yn.call(e,n)&&(t[cr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Fn[r.property]||r.property:r.attribute,n]}}function ar(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=en(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=en(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Yn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);lr(e)}function lr(e,t){const n=new Wn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=er+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cr(e){let t=e.replace(Jn,dr);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function ur(e,t){return t.toUpperCase()}function dr(e){return"-"+e.toLowerCase()}const hr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var pr=n(579);const fr={};function mr(e,t,n){if(function(e){return Boolean(e&&"object"===typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gr(e.children,t,n)}return Array.isArray(e)?gr(e,t,n):""}function gr(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=mr(e[o],t,n);return r.join("")}function vr(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function yr(e,t){return e.length>0?(vr(e,e.length,0,t),e):t}function br(e){const t={};let n,r,o,i,s,a,l,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(n=e[c],c&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[c-1][1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,xr(e,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--&&(i=e[o],"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(r&&(e[r][1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);r&&(n[1].end=Object.assign({},e[r][1].start),s=e.slice(r,c),s.unshift(n),vr(e,r,c-r+1,s))}}return!l}function xr(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,l=[],c={};let u,d,h=-1,p=n,f=0,m=0;const g=[m];for(;p;){for(;e[++o][1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)"exit"===a[h][0]&&"enter"===a[h-1][0]&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=a.slice(g[h],g[h+1]),n=i.pop();l.unshift([n,n+t.length-1]),vr(e,n,2,t)}for(h=-1;++h<l.length;)c[f+l[h][0]]=f+l[h][1],f+=l[h][1]-l[h][0]-1;return c}const wr={}.hasOwnProperty;function Sr(e,t){let n;for(n in t){const r=(wr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){wr.call(r,i)||(r[i]=[]);const e=o[i];Cr(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Cr(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);vr(e,0,0,r)}const jr=Dr(/[A-Za-z]/),_r=Dr(/[\dA-Za-z]/),kr=Dr(/[#-'*+\--9=?A-Z^-~]/);function Nr(e){return null!==e&&(e<32||127===e)}const Er=Dr(/\d/),Tr=Dr(/[\dA-Fa-f]/),Or=Dr(/[!-/:-@[-`{-~]/);function Ir(e){return null!==e&&e<-2}function Rr(e){return null!==e&&(e<0||32===e)}function Ar(e){return-2===e||-1===e||32===e}const Mr=Dr(/\p{P}|\p{S}/u),Pr=Dr(/\s/);function Dr(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Fr(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(Ar(r))return e.enter(n),s(r);return t(r)};function s(r){return Ar(r)&&i++<o?(e.consume(r),s):(e.exit(n),t(r))}}const Lr={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Fr(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ir(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Br={tokenize:function(e){const t=this,n=[];let r,o,i,s=0;return a;function a(r){if(s<n.length){const o=n[s];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}v(s);let a=n;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},o),a++;return vr(t.events,i+1,0,t.events.slice(n)),t.events.length=a,c(e)}return a(e)}function c(o){if(s===n.length){if(!r)return h(o);if(r.currentConstruct&&r.currentConstruct.concrete)return f(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ur,u,d)(o)}function u(e){return r&&y(),v(s),h(e)}function d(e){return t.parser.lazy[t.now().line]=s!==n.length,i=t.now().offset,f(e)}function h(n){return t.containerState={},e.attempt(Ur,p,f)(n)}function p(e){return s++,n.push([t.currentConstruct,t.containerState]),h(e)}function f(n){return null===n?(r&&y(),v(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:r}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):Ir(n)?(e.consume(n),g(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),m)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){a=t.events[l][1].end;break}o=!0}for(v(s),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;vr(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Ur={tokenize:function(e,t,n){return Fr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const Gr={tokenize:function(e,t,n){return function(t){return Ar(t)?Fr(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Ir(e)?t(e):n(e)}},partial:!0};const $r={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Ir(t)?e.check(qr,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return br(e),e}},qr={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Fr(e,o,"linePrefix")};function o(o){if(null===o||Ir(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0};const zr={tokenize:function(e){const t=this,n=e.attempt(Gr,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Fr(e,e.attempt(this.parser.constructs.flow,r,e.attempt($r,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Vr={resolveAll:Qr()},Hr=Yr("string"),Wr=Yr("text");function Yr(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(e){return l(e)?o(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:Qr("text"===e?Jr:void 0)}}function Qr(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Jr(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,s=o.length,a=-1,l=0;for(;s--;){const e=o[s];if("string"===typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)i=!0,l++;else if(-1!==e){s++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+s,_bufferIndex:s?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},o.start),r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function Kr(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}function Xr(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let s=[],a=[],l=!0;const c={consume:function(e){Ir(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,x()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++));u.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},attempt:y((function(e,t){b(e,t.from)})),check:y(v),interrupt:y(v,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if("string"===typeof i)s=i;else switch(i){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&o)continue;s=" ";break;default:s=String.fromCharCode(i)}o=-2===i,r.push(s)}return r.join("")}(p(e),t)},now:f,defineSkip:function(e){o[e.line]=e.column,x()},write:function(e){if(s=yr(s,e),m(),null!==s[s.length-1])return[];return b(t,0),u.events=Kr(i,u.events,u),u.events}};let d,h=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function p(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const e=s[0];"string"===typeof e?s[0]=e.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}(s,e)}function f(){const{line:e,column:t,offset:n,_index:o,_bufferIndex:i}=r;return{line:e,column:t,offset:n,_index:o,_bufferIndex:i}}function m(){let e;for(;r._index<s.length;){const t=s[r._index];if("string"===typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){l=void 0,d=e,h=h(e)}function v(e,t){t.restore()}function y(e,t){return function(n,o,i){let s,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function m(e){return s=e,d=0,0===e.length?i:g(e[d])}function g(e){return function(n){p=function(){const e=f(),t=u.previous,n=u.currentConstruct,o=u.events.length,i=Array.from(a);return{restore:s,from:o};function s(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=o,a=i,x()}}(),h=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return y(n);return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,v,y)(n)}}function v(t){return l=!0,e(h,p),o}function y(e){return l=!0,p.restore(),++d<s.length?g(s[d]):i}}}function b(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&vr(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function x(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Zr={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),s(i)):o>=3&&(null===i||Ir(i))?(e.exit("thematicBreak"),t(i)):n(i)}function s(t){return t===r?(e.consume(t),o++,s):(e.exit("thematicBreakSequence"),Ar(t)?Fr(e,i,"whitespace")(t):i(t))}}};const eo={name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Er(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Zr,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return Er(t)&&++s<10?(e.consume(t),a):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Gr,r.interrupt?n:c,e.attempt(to,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return Ar(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Gr,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Fr(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!Ar(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(no,t,s)(n))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Fr(e,e.attempt(eo,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},to={tokenize:function(e,t,n){const r=this;return Fr(e,(function(e){const o=r.events[r.events.length-1];return!Ar(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},no={tokenize:function(e,t,n){const r=this;return Fr(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const ro={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Ar(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Ar(t))return Fr(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(ro,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function oo(e,t,n,r,o,i,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||Nr(t))return n(t);return e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||Ir(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(o){return u||null!==o&&41!==o&&!Rr(o)?u<c&&40===o?(e.consume(o),u++,f):41===o?(e.consume(o),u--,f):null===o||32===o||40===o||Nr(o)?n(o):(e.consume(o),92===o?m:f):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function io(e,t,n,r,o,i){const s=this;let a,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):Ir(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Ir(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!Ar(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function so(e,t,n,r,o,i){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),s=40===t?41:t,a;return n(t)};function a(n){return n===s?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===s?(e.exit(i),a(s)):null===t?n(t):Ir(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Fr(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||Ir(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function ao(e,t){let n;return function r(o){if(Ir(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(Ar(o))return Fr(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}function lo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const co={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return io.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=lo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return Rr(t)?ao(e,a)(t):a(t)}function a(t){return oo(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(uo,c,c)(t)}function c(t){return Ar(t)?Fr(e,u,"whitespace")(t):u(t)}function u(i){return null===i||Ir(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},uo={tokenize:function(e,t,n){return function(t){return Rr(t)?ao(e,r)(t):n(t)};function r(t){return so(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Ar(t)?Fr(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Ir(e)?t(e):n(e)}},partial:!0};const ho={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Fr(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):Ir(t)?e.attempt(po,i,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||Ir(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},po={tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Ir(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Fr(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Ir(e)?o(e):n(e)}},partial:!0};const fo={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Rr(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||Ir(n)?(e.exit("atxHeading"),t(n)):Ar(n)?Fr(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||Rr(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}},resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},vr(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const mo={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let o;return function(t){let s,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){s="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Ar(t)?Fr(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||Ir(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e}};const go=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vo=["pre","script","style","textarea"],yo={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let o,i,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,p):63===a?(e.consume(a),o=3,r.interrupt?t:M):jr(a)?(e.consume(a),s=String.fromCharCode(a),f):n(a)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,a=0,h):jr(i)?(e.consume(i),o=4,r.interrupt?t:M):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:M):n(o)}function h(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:k:h):n(o)}function p(t){return jr(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Rr(a)){const l=47===a,c=s.toLowerCase();return l||i||!vo.includes(c)?go.includes(s.toLowerCase())?(o=6,l?(e.consume(a),m):r.interrupt?t(a):k(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):v(a)):(o=1,r.interrupt?t(a):k(a))}return 45===a||_r(a)?(e.consume(a),s+=String.fromCharCode(a),f):n(a)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:k):n(o)}function g(t){return Ar(t)?(e.consume(t),g):j(t)}function v(t){return 47===t?(e.consume(t),j):58===t||95===t||jr(t)?(e.consume(t),y):Ar(t)?(e.consume(t),v):j(t)}function y(t){return 45===t||46===t||58===t||95===t||_r(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),x):Ar(t)?(e.consume(t),b):v(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Ar(t)?(e.consume(t),x):S(t)}function w(t){return t===l?(e.consume(t),l=null,C):null===t||Ir(t)?n(t):(e.consume(t),w)}function S(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Rr(t)?b(t):(e.consume(t),S)}function C(e){return 47===e||62===e||Ar(e)?v(e):n(e)}function j(t){return 62===t?(e.consume(t),_):n(t)}function _(t){return null===t||Ir(t)?k(t):Ar(t)?(e.consume(t),_):n(t)}function k(t){return 45===t&&2===o?(e.consume(t),O):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),P):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),A):!Ir(t)||6!==o&&7!==o?null===t||Ir(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),k):(e.exit("htmlFlowData"),e.check(bo,D,N)(t))}function N(t){return e.check(xo,E,D)(t)}function E(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return null===t||Ir(t)?N(t):(e.enter("htmlFlowData"),k(t))}function O(t){return 45===t?(e.consume(t),M):k(t)}function I(t){return 47===t?(e.consume(t),s="",R):k(t)}function R(t){if(62===t){const n=s.toLowerCase();return vo.includes(n)?(e.consume(t),P):k(t)}return jr(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),R):k(t)}function A(t){return 93===t?(e.consume(t),M):k(t)}function M(t){return 62===t?(e.consume(t),P):45===t&&2===o?(e.consume(t),M):k(t)}function P(t){return null===t||Ir(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),P)}function D(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},bo={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Gr,t,n)}},partial:!0},xo={tokenize:function(e,t,n){const r=this;return function(t){if(Ir(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const wo={tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},So={name:"codeFenced",tokenize:function(e,t,n){const r=this,o={tokenize:function(e,t,n){let o=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Ar(t)?Fr(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=a?(e.exit("codeFencedFenceSequence"),Ar(t)?Fr(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Ir(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let i,s=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),Ar(t)?Fr(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Ir(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(wo,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Ir(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Ar(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Fr(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||Ir(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Ir(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),h)}function p(t){return e.attempt(o,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&Ar(t)?Fr(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||Ir(t)?e.check(wo,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Ir(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};const Co=document.createElement("i");function jo(e){const t="&"+e+";";Co.innerHTML=t;const n=Co.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const _o={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=_r,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Tr,c):(e.enter("characterReferenceValue"),o=7,i=Er,c(t))}function c(a){if(59===a&&s){const o=e.exit("characterReferenceValue");return i!==_r||jo(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&s++<o?(e.consume(a),c):n(a)}}};const ko={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Or(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const No={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Fr(e,t,"linePrefix")}}};const Eo={name:"labelEnd",tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(lo(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(To,c,i?c:u)(t):91===t?e.attempt(Oo,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(Io,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=s);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[r+a+2][1].end),end:Object.assign({},e[o-2][1].start)};return i=[["enter",l,t],["enter",c,t]],i=yr(i,e.slice(r+1,r+a+3)),i=yr(i,[["enter",u,t]]),i=yr(i,Kr(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=yr(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=yr(i,e.slice(o+1)),i=yr(i,[["exit",l,t]]),vr(e,r,e.length,i),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},To={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Rr(t)?ao(e,o)(t):o(t)}function o(t){return 41===t?c(t):oo(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Rr(t)?ao(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?so(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Rr(t)?ao(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Oo={tokenize:function(e,t,n){const r=this;return function(t){return io.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(lo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Io={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Ro={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Eo.resolveAll};function Ao(e){return null===e||Rr(e)||Pr(e)?1:Mr(e)?2:void 0}const Mo={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ao(r);let i;return function(t){return i=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===i)return e.consume(a),s;const l=e.exit("attentionSequence"),c=Ao(a),u=!c||2===c&&o||n.includes(a),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(a)}},resolveAll:function(e,t){let n,r,o,i,s,a,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),h=Object.assign({},e[u][1].start);Po(d,-a),Po(h,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},i.start),e[u][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=yr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=yr(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=yr(l,Kr(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=yr(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=yr(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,vr(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function Po(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Do={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return jr(t)?(e.consume(t),i):l(t)}function i(e){return 43===e||45===e||46===e||_r(e)?(r=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||_r(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Nr(r)?n(r):(e.consume(r),a)}function l(t){return 64===t?(e.consume(t),c):kr(t)?(e.consume(t),l):n(t)}function c(e){return _r(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||_r(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Fo={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):jr(t)?(e.consume(t),C):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):jr(t)?(e.consume(t),v):n(t)}function c(t){return 45===t?(e.consume(t),h):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Ir(t)?(s=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),h):u(t)}function h(e){return 62===e?I(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):Ir(t)?(s=f,R(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):f(t)}function v(t){return null===t||62===t?I(t):Ir(t)?(s=v,R(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):Ir(t)?(s=y,R(t)):(e.consume(t),y)}function b(e){return 62===e?I(e):y(e)}function x(t){return jr(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||_r(t)?(e.consume(t),w):S(t)}function S(t){return Ir(t)?(s=S,R(t)):Ar(t)?(e.consume(t),S):I(t)}function C(t){return 45===t||_r(t)?(e.consume(t),C):47===t||62===t||Rr(t)?j(t):n(t)}function j(t){return 47===t?(e.consume(t),I):58===t||95===t||jr(t)?(e.consume(t),_):Ir(t)?(s=j,R(t)):Ar(t)?(e.consume(t),j):I(t)}function _(t){return 45===t||46===t||58===t||95===t||_r(t)?(e.consume(t),_):k(t)}function k(t){return 61===t?(e.consume(t),N):Ir(t)?(s=k,R(t)):Ar(t)?(e.consume(t),k):j(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,E):Ir(t)?(s=N,R(t)):Ar(t)?(e.consume(t),N):(e.consume(t),T)}function E(t){return t===o?(e.consume(t),o=void 0,O):null===t?n(t):Ir(t)?(s=E,R(t)):(e.consume(t),E)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Rr(t)?j(t):(e.consume(t),T)}function O(e){return 47===e||62===e||Rr(e)?j(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return Ar(t)?Fr(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),s(t)}}};const Lo={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Eo.resolveAll};const Bo={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Ir(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Uo={name:"codeText",tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),i++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):Ir(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Ir(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,o=3;if(("lineEnding"===e[o][1].type||"space"===e[o][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};const Go={42:eo,43:eo,45:eo,48:eo,49:eo,50:eo,51:eo,52:eo,53:eo,54:eo,55:eo,56:eo,57:eo,62:ro},$o={91:co},qo={[-2]:ho,[-1]:ho,32:ho},zo={35:fo,42:Zr,45:[mo,Zr],60:yo,61:mo,95:Zr,96:So,126:So},Vo={38:_o,92:ko},Ho={[-5]:No,[-4]:No,[-3]:No,33:Ro,38:_o,42:Mo,60:[Do,Fo],91:Lo,92:[Bo,ko],93:Eo,95:Mo,96:Uo},Wo={null:[Mo,Vr]},Yo={null:[42,95]},Qo={null:[]};function Jo(e){const n=function(e){const t={};let n=-1;for(;++n<e.length;)Sr(t,e[n]);return t}([t,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(Lr),document:o(Br),flow:o(zr),string:o(Hr),text:o(Wr)};return r;function o(e){return function(t){return Xr(r,e,t)}}}const Ko=/[\0\t\n\r]/g;function Xo(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCodePoint(n)}const Zo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ei(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Xo(n.slice(t?2:1),t?16:10)}return jo(n)||e}const ti={}.hasOwnProperty;function ni(e,t,n){return"string"!==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ee),autolinkProtocol:_,autolinkEmail:_,atxHeading:i(J),blockQuote:i(V),characterEscape:_,characterReference:_,codeFenced:i(H),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(H,s),codeText:i(W,s),codeTextData:_,data:_,codeFlowValue:_,definition:i(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Q),hardBreakEscape:i(K),hardBreakTrailing:i(K),htmlFlow:i(X,s),htmlFlowData:_,htmlText:i(X,s),htmlTextData:_,image:i(Z),label:s,link:i(ee),listItem:i(ne),listItemValue:h,listOrdered:i(te,d),listUnordered:i(te),paragraph:i(re),reference:B,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(J),strong:i(oe),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:z,autolinkProtocol:q,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:k,codeIndented:l(v),codeText:l(I),codeTextData:k,data:k,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(T),htmlFlowData:k,htmlText:l(O),htmlTextData:k,image:l(A),label:P,labelText:M,lineEnding:N,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:D,resourceTitleString:F,resource:L,setextHeading:l(j),setextHeadingLineSequence:C,setextHeadingText:S,strong:l(),thematicBreak:l()}};oi(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:c,buffer:s,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];ti.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||si).call(i,void 0,e[0])}for(r.position={start:ri(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ri(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||i||(i=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(o=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,s=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:ri(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+qn({start:e.start,end:e.end})+"): it\u2019s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||si).call(this,e,r[0])}n.position.end=ri(e.end)}function u(){return function(e,t){const n=t||fr;return mr(e,"boolean"!==typeof n.includeImageAlt||n.includeImageAlt,"boolean"!==typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lo(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function _(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:ri(e.start),end:void 0},t.push(n)),this.stack.push(n)}function k(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ri(e.end)}function N(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=ri(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(_.call(this,e),k.call(this,e))}function E(){this.data.atHardBreak=!0}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function A(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Zo,ei)}(t),n.identifier=lo(t).toLowerCase()}function P(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function D(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lo(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function G(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Xo(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=jo(t)}const o=this.stack.pop();o.value+=r,o.position.end=ri(e.end)}function q(e){k.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function z(e){k.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function H(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function K(){return{type:"break"}}function X(){return{type:"html",value:""}}function Z(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function te(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ne(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function re(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!br(e););return e}(Jo(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,s){const a=[];let l,c,u,d,h;for(o=n+("string"===typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(Ko.lastIndex=u,l=Ko.exec(o),d=l&&void 0!==l.index?l.index:o.length,h=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===h&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(o.slice(u,d)),t+=d-u),h){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function ri(e){return{line:e.line,column:e.column,offset:e.offset}}function oi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?oi(e,r):ii(e,r)}}function ii(e,t){let n;for(n in t)if(ti.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function si(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is still open")}function ai(e){const t=this;t.parser=function(n){return ni(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const li="object"===typeof self?self:globalThis,ci=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,s]=t[o];switch(i){case 0:case-1:return n(s,o);case 1:{const e=n([],o);for(const t of s)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),o);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of s)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of s)e.add(r(t));return e}case 7:{const{name:e,message:t}=s;return n(new li[e](t),o)}case 8:return n(BigInt(s),o);case"BigInt":return n(Object(BigInt(s)),o)}return n(new li[i](s),o)};return r})(new Map,e)(0),ui="",{toString:di}={},{keys:hi}=Object,pi=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=di.call(e).slice(8,-1);switch(n){case"Array":return[1,ui];case"Object":return[2,ui];case"Date":return[3,ui];case"RegExp":return[4,ui];case"Map":return[5,ui];case"Set":return[6,ui]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fi=([e,t])=>0===e&&("function"===t||"symbol"===t),mi=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[s,a]=pi(r);switch(s){case 0:{let t=r;switch(a){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([s,t],r)}case 1:{if(a)return o([a,[...r]],r);const e=[],t=o([s,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([s,n],r);for(const t of hi(r))!e&&fi(pi(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([s,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([s,{source:e,flags:t}],r)}case 5:{const t=[],n=o([s,t],r);for(const[o,s]of r)(e||!fi(pi(o))&&!fi(pi(s)))&&t.push([i(o),i(s)]);return n}case 6:{const t=[],n=o([s,t],r);for(const o of r)!e&&fi(pi(o))||t.push(i(o));return n}}const{message:l}=r;return o([s,{name:a,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},gi="function"===typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ci(mi(e,t)):structuredClone(e):(e,t)=>ci(mi(e,t));function vi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(37===i&&_r(e.charCodeAt(n+1))&&_r(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(s=String.fromCharCode(i,t),o=1):s="\ufffd"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function yi(e,t){const n=[{type:"text",value:"\u21a9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function bi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const xi=function(e){if(null===e||void 0===e)return Si;if("function"===typeof e)return wi(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xi(e[n]);return wi(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return wi(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"===typeof e)return function(e){return wi(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function wi(e){return function(t,n,r){return Boolean(Ci(t)&&e.call(this,t,"number"===typeof n?n:void 0,r||void 0))}}function Si(){return!0}function Ci(e){return null!==e&&"object"===typeof e&&"type"in e}const ji=[],_i=!0,ki=!1,Ni="skip";function Ei(e,t,n,r){let o;"function"===typeof t&&"function"!==typeof n?(r=n,n=t):o=t;const i=xi(o),s=r?-1:1;!function e(o,a,l){const c=o&&"object"===typeof o?o:{};if("string"===typeof c.type){const e="string"===typeof c.tagName?c.tagName:"string"===typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,h=ji;if((!t||i(o,a,l[l.length-1]||void 0))&&(h=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[_i,e];return null===e||void 0===e?ji:[e]}(n(o,l)),h[0]===ki))return h;if("children"in o&&o.children){const t=o;if(t.children&&h[0]!==Ni)for(u=(r?t.children.length:-1)+s,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===ki)return c;u="number"===typeof c[1]?c[1]:u+s}}return h}}(e,void 0,[])()}function Ti(e,t,n,r){let o,i,s;"function"===typeof t&&"function"!==typeof n?(i=void 0,s=t,o=n):(i=t,s=n,o=r),Ei(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)}),o)}function Oi(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&"text"===s.type?s.value+=r:o.push({type:"text",value:r}),o}function Ii(e){const t=e.spread;return null===t||void 0===t?e.children.length>1:t}const Ri=9,Ai=32;function Mi(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Pi(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Pi(t.slice(o),o>0,!1)),i.join("")}function Pi(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===Ri||t===Ai;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===Ri||t===Ai;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Di={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=vi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Oi(e,t);const o={src:vi(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:vi(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Oi(e,t);const o={href:vi(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:vi(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ii(n[r])}return t}(n):Ii(t),i={},s=[];if("boolean"===typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?s.push(e):s.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"===typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Gn(t.children[1]),s=Un(t.children[t.children.length-1]);i&&s&&(r.position={start:i,end:s}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,s=i?i.length:t.children.length;let a=-1;const l=[];for(;++a<s;){const n=t.children[a],r={},s=i?i[a]:void 0;s&&(r.align=s);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Mi(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Fi,yaml:Fi,definition:Fi,footnoteDefinition:Fi};function Fi(){}const Li={}.hasOwnProperty,Bi={};function Ui(e,t){e.position&&(t.position=function(e){const t=Gn(e),n=Un(e);if(t&&n)return{start:t,end:n}}(e))}function Gi(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"===typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,gi(o)),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function $i(e,t){const n=t.data||{},r=!("value"in t)||Li.call(n,"hProperties")||Li.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function qi(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function zi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vi(e,t){const n=function(e,t){const n=t||Bi,r=new Map,o=new Map,i=new Map,s={...Di,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=zi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=zi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Gi,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:s,one:function(e,t){const n=e.type,r=a.handlers[n];if(Li.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=gi(n);return r.children=a.all(e),r}return gi(e)}return(a.options.unknownHandler||$i)(a,e,t)},options:n,patch:Ui,wrap:qi};return Ti(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),a}(e,t),r=n.one(e,void 0),o=function(e){const t="string"===typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yi,r=e.options.footnoteBackLabel||bi,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),s=String(o.identifier).toUpperCase(),c=vi(s.toLowerCase());let u=0;const d=[],h=e.footnoteCounts.get(s);for(;void 0!==h&&++u<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"===typeof n?n:n(l,u);"string"===typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"===typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...gi(s),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Hi(e,t){return e&&"run"in e?async function(n,r){const o=Vi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Vi(n,{file:r,...t||e})}}function Wi(e){if(e)throw e}var Yi=n(3240);function Qi(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ji(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!==typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...s){const a=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(a&&a.then&&"function"===typeof a.then?a.then(s,o):a instanceof Error?o(a):s(a))}function o(e,...r){n||(n=!0,t(e,...r))}function s(e){o(null,e)}}(a,o)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!==typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Ki={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');Xi(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=s));r===o?o=s:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Xi(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Xi(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===s||1===s&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Xi(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Xi(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=l,a=0;continue}}else if(o.length>0){o="",i=0,s=l,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,l):o=e.slice(s+1,l),i=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Xi(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Zi={cwd:function(){return"/"}};function es(e){return Boolean(null!==e&&"object"===typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function ts(e){if("string"===typeof e)e=new URL(e);else if(!es(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const ns=["history","path","basename","stem","extname","dirname"];class rs{constructor(e){let t;t=e?es(e)?{path:e}:"string"===typeof e||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd=Zi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<ns.length;){const e=ns[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)ns.includes(n)||(this[n]=t[n])}get basename(){return"string"===typeof this.path?Ki.basename(this.path):void 0}set basename(e){is(e,"basename"),os(e,"basename"),this.path=Ki.join(this.dirname||"",e)}get dirname(){return"string"===typeof this.path?Ki.dirname(this.path):void 0}set dirname(e){ss(this.basename,"dirname"),this.path=Ki.join(e||"",this.basename)}get extname(){return"string"===typeof this.path?Ki.extname(this.path):void 0}set extname(e){if(os(e,"extname"),ss(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){es(e)&&(e=ts(e)),is(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"===typeof this.path?Ki.basename(this.path,this.extname):void 0}set stem(e){is(e,"stem"),os(e,"stem"),this.path=Ki.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Wn(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"===typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function os(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function is(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ss(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const as=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};Object.setPrototypeOf(r,t);const o=Object.getOwnPropertyNames(n);for(const i of o){const e=Object.getOwnPropertyDescriptor(n,i);e&&Object.defineProperty(r,i,e)}return r},ls={}.hasOwnProperty;class cs extends as{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ji()}copy(){const e=new cs;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Yi(!0,{},this.namespace)),e}data(e,t){return"string"===typeof e?2===arguments.length?(ps("data",this.frozen),this.namespace[e]=t,this):ls.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ps("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"===typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=gs(e),n=this.parser||this.Parser;return ds("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ds("process",this.parser||this.Parser),hs("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=gs(e),s=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(s,i,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var s;"string"===typeof(s=i)||function(e){return Boolean(e&&"object"===typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?r.value=i:r.result=i,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),ds("processSync",this.parser||this.Parser),hs("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Wi(e),t=r})),ms("processSync","process",n),t}run(e,t,n){fs(e),this.freeze();const r=this.transformers;return n||"function"!==typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const s=gs(t);r.run(e,s,(function(t,r,s){const a=r||e;t?i(t):o?o(a):n(void 0,a,s)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Wi(e),n=t,r=!0})),ms("runSync","run",r),n}stringify(e,t){this.freeze();const n=gs(t),r=this.compiler||this.Compiler;return hs("stringify",r),fs(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ps("use",this.frozen),null===e||void 0===e);else if("function"===typeof e)a(e,t);else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):i(e)}return this;function o(e){if("function"===typeof e)a(e,[]);else{if("object"!==typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=Yi(!0,r.settings,e.settings))}function s(e){let t=-1;if(null===e||void 0===e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const s=n[o][1];Qi(s)&&Qi(r)&&(r=Yi(!0,s,r)),n[o]=[e,r,...i]}}}}const us=(new cs).freeze();function ds(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function hs(e,t){if("function"!==typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ps(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fs(e){if(!Qi(e)||"string"!==typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ms(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gs(e){return function(e){return Boolean(e&&"object"===typeof e&&"message"in e&&"messages"in e)}(e)?e:new rs(e)}const vs=[],ys={allowDangerousHtml:!0},bs=/^(https?|ircs?|mailto|xmpp)$/i,xs=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ws(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,s=e.disallowedElements,a=e.rehypePlugins||vs,l=e.remarkPlugins||vs,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ys}:ys,u=e.skipHtml,d=e.unwrapDisallowed,h=e.urlTransform||Ss,p=us().use(ai).use(l).use(Hi,c).use(a),f=new rs;"string"===typeof r&&(f.value=r);for(const v of xs)Object.hasOwn(e,v.from)&&(v.from,v.to&&v.to,v.id);const m=p.parse(f);let g=p.runSync(m,f);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),Ti(g,(function(e,r,o){if("raw"===e.type&&o&&"number"===typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in hr)if(Object.hasOwn(hr,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=hr[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=h(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!s&&s.includes(e.tagName);if(!i&&n&&"number"===typeof r&&(i=!n(e,r,o)),i&&o&&"number"===typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),tr(g,{Fragment:pr.Fragment,components:i,ignoreInvalidStyle:!0,jsx:pr.jsx,jsxs:pr.jsxs,passKeys:!0,passNode:!0})}function Ss(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||bs.test(e.slice(0,t))?e:""}const Cs=()=>localStorage.getItem(Qt),js=e=>{null===e||"null"===e||"undefined"===e||void 0===e?localStorage.removeItem(Qt):localStorage.setItem(Qt,e)},_s=()=>{const e=ks.production[Cs()];return e.substring(0,e.lastIndexOf("/"))},ks={production:{us:"https://us.api.classsolver.com/api",au:"https://au.api.classsolver.com/api",ca:"https://ca.api.classsolver.com/api"},staging:{us:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net/api",au:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net/api",ca:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net/api"},auth0:{us:"https://classsolverapi-auth0-australiasoutheast-as.azurewebsites.net/api",au:"https://classsolverapi-auth0-australiasoutheast-as.azurewebsites.net/api",ca:"https://classsolverapi-auth0-australiasoutheast-as.azurewebsites.net/api"},development:{us:"http://localhost:4000/api",au:"http://localhost:4000/api",ca:"http://localhost:5000/api"}},Ns={production:{us:{domain:"us.login.classsolver.com",clientId:"2jg8lLm0RuMrtxc9oCU1kbY16qPoqmXD",audience:"https://us.api.classsolver.com"},au:{domain:"au.login.classsolver.com",clientId:"MAEoLqwXFq2kueZsmUiOYEKhdJ7y5M4m",audience:"https://au.api.classsolver.com"},ca:{domain:"ca.login.classsolver.com",clientId:"QJ3kECCDtoP8GJ9RlB6z2wGX0Z4PD0u5",audience:"https://ca.api.classsolver.com"}},staging:{us:{domain:"staging-au.login.classsolver.com",clientId:"Lu8540jeKpb8y3LYvGU7PEn7G3zX4a0X",audience:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net"},au:{domain:"staging-au.login.classsolver.com",clientId:"Lu8540jeKpb8y3LYvGU7PEn7G3zX4a0X",audience:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net"},ca:{domain:"staging-au.login.classsolver.com",clientId:"Lu8540jeKpb8y3LYvGU7PEn7G3zX4a0X",audience:"https://classsolverapi-staging-australiasoutheast-as.azurewebsites.net"}},development:{us:{domain:"dev-au.login.classsolver.com",clientId:"CcWmVvUL3XH7XEXvXWdhzyvy0UZmi4Rz",audience:"http://localhost:4000"},au:{domain:"dev-au.login.classsolver.com",clientId:"CcWmVvUL3XH7XEXvXWdhzyvy0UZmi4Rz",audience:"http://localhost:4000"},ca:{domain:"dev-au.login.classsolver.com",clientId:"CcWmVvUL3XH7XEXvXWdhzyvy0UZmi4Rz",audience:"http://localhost:4000"}}},Es=(e,t)=>{const n=((e,t)=>e.__schema.mutationType.fields.find((e=>e.name===t)))(e,t).description;return(0,pr.jsx)(ws,{children:n})},Ts=(e,t)=>{const n=ks.production;if(!n)return fetch(e,t);const r=Cs();return fetch(n[r]||e,t)};function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Os.apply(this,arguments)}var Is;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Is||(Is={}));const Rs="popstate";function As(e){return void 0===e&&(e={}),Us((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return Fs("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:Ls(t)}),null,e)}function Ms(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function Ps(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Ds(e,t){return{usr:e.state,key:e.key,idx:t}}function Fs(e,t,n,r){return void 0===n&&(n=null),Os({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?Bs(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Ls(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Bs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Us(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Is.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=Is.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:p.location,delta:t})}function h(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:Ls(e);return n=n.replace(/ $/,"%20"),Ms(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(Os({},s.state,{idx:c}),""));let p={get action(){return a},get location(){return e(o,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Rs,d),l=e,()=>{o.removeEventListener(Rs,d),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=Is.Push;let r=Fs(p.location,e,t);n&&n(r,e),c=u()+1;let d=Ds(r,c),h=p.createHref(r);try{s.pushState(d,"",h)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;o.location.assign(h)}i&&l&&l({action:a,location:p.location,delta:1})},replace:function(e,t){a=Is.Replace;let r=Fs(p.location,e,t);n&&n(r,e),c=u();let o=Ds(r,c),d=p.createHref(r);s.replaceState(o,"",d),i&&l&&l({action:a,location:p.location,delta:0})},go:e=>s.go(e)};return p}var Gs;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Gs||(Gs={}));const $s=new Set(["lazy","caseSensitive","path","id","index","children"]);function qs(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map(((e,o)=>{let i=[...n,o],s="string"===typeof e.id?e.id:i.join("-");if(Ms(!0!==e.index||!e.children,"Cannot specify children on an index route"),Ms(!r[s],'Found a route id collision on id "'+s+"\".  Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=Os({},e,t(e),{id:s});return r[s]=n,n}{let n=Os({},e,t(e),{id:s,children:void 0});return r[s]=n,e.children&&(n.children=qs(e.children,t,i,r)),n}}))}function zs(e,t,n){void 0===n&&(n="/");let r=oa(("string"===typeof t?Bs(t):t).pathname||"/",n);if(null==r)return null;let o=Vs(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let s=0;null==i&&s<o.length;++s){let e=ra(r);i=ta(o[s],e)}return i}function Vs(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(Ms(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=ca([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(Ms(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Vs(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:ea(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Hs(e.path))o(e,t,r);else o(e,t)})),t}function Hs(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let s=Hs(r.join("/")),a=[];return a.push(...s.map((e=>""===e?i:[i,e].join("/")))),o&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const Ws=/^:[\w-]+$/,Ys=3,Qs=2,Js=1,Ks=10,Xs=-2,Zs=e=>"*"===e;function ea(e,t){let n=e.split("/"),r=n.length;return n.some(Zs)&&(r+=Xs),t&&(r+=Qs),n.filter((e=>!Zs(e))).reduce(((e,t)=>e+(Ws.test(t)?Ys:""===t?Js:Ks)),r)}function ta(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s<n.length;++s){let e=n[s],a=s===n.length-1,l="/"===o?t:t.slice(o.length)||"/",c=na({path:e.relativePath,caseSensitive:e.caseSensitive,end:a},l);if(!c)return null;Object.assign(r,c.params);let u=e.route;i.push({params:r,pathname:ca([o,c.pathname]),pathnameBase:ua(ca([o,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(o=ca([o,c.pathnameBase]))}return i}function na(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);Ps("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=a[n]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:i,pathnameBase:s,pattern:e}}function ra(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return Ps(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function oa(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function ia(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function sa(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function aa(e,t){let n=sa(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function la(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=Bs(e):(o=Os({},e),Ms(!o.pathname||!o.pathname.includes("?"),ia("?","pathname","search",o)),Ms(!o.pathname||!o.pathname.includes("#"),ia("#","pathname","hash",o)),Ms(!o.search||!o.search.includes("#"),ia("#","search","hash",o)));let i,s=""===e||""===o.pathname,a=s?"/":o.pathname;if(null==a)i=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?Bs(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:da(r),hash:ha(o)}}(o,i),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const ca=e=>e.join("/").replace(/\/\/+/g,"/"),ua=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),da=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ha=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class pa{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function fa(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const ma=["post","put","patch","delete"],ga=new Set(ma),va=["get",...ma],ya=new Set(va),ba=new Set([301,302,303,307,308]),xa=new Set([307,308]),wa={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sa={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ca={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ja=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_a=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ka="remix-router-transitions";function Na(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,n="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,r=!n;let o;if(Ms(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=_a;let i,s,a={},l=qs(e.routes,o,void 0,a),c=e.basename||"/",u=Os({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),d=null,h=new Set,p=null,f=null,m=null,g=null!=e.hydrationData,v=zs(l,e.history.location,c),y=null;if(null==v){let t=za(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=qa(l);v=n,y={[r.id]:t}}let b,x=v.some((e=>e.route.lazy)),w=v.some((e=>e.route.loader));if(x)s=!1;else if(w)if(u.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=e=>!e.route.loader||!0!==e.route.loader.hydrate&&(t&&void 0!==t[e.route.id]||n&&void 0!==n[e.route.id]);if(n){let e=v.findIndex((e=>void 0!==n[e.route.id]));s=v.slice(0,e+1).every(r)}else s=v.every(r)}else s=null!=e.hydrationData;else s=!0;let S,C={historyAction:e.history.action,location:e.history.location,matches:v,initialized:s,navigation:wa,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},j=Is.Pop,_=!1,k=!1,N=new Map,E=null,T=!1,O=!1,I=[],R=[],A=new Map,M=0,P=-1,D=new Map,F=new Set,L=new Map,B=new Map,U=new Set,G=new Map,$=new Map,q=!1;function z(e,t){void 0===t&&(t={}),C=Os({},C,e);let n=[],r=[];u.v7_fetcherPersist&&C.fetchers.forEach(((e,t)=>{"idle"===e.state&&(U.has(t)?r.push(t):n.push(t))})),[...h].forEach((e=>e(C,{deletedFetchers:r,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),u.v7_fetcherPersist&&(n.forEach((e=>C.fetchers.delete(e))),r.forEach((e=>Z(e))))}function V(t,n,r){var o,s;let a,{flushSync:c}=void 0===r?{}:r,u=null!=C.actionData&&null!=C.navigation.formMethod&&Xa(C.navigation.formMethod)&&"loading"===C.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:u?C.actionData:null;let d=n.loaderData?Ga(C.loaderData,n.loaderData,n.matches||[],n.errors):C.loaderData,h=C.blockers;h.size>0&&(h=new Map(h),h.forEach(((e,t)=>h.set(t,Ca))));let p,f=!0===_||null!=C.navigation.formMethod&&Xa(C.navigation.formMethod)&&!0!==(null==(s=t.state)?void 0:s._isRedirect);if(i&&(l=i,i=void 0),T||j===Is.Pop||(j===Is.Push?e.history.push(t,t.state):j===Is.Replace&&e.history.replace(t,t.state)),j===Is.Pop){let e=N.get(C.location.pathname);e&&e.has(t.pathname)?p={currentLocation:C.location,nextLocation:t}:N.has(t.pathname)&&(p={currentLocation:t,nextLocation:C.location})}else if(k){let e=N.get(C.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),N.set(C.location.pathname,e)),p={currentLocation:C.location,nextLocation:t}}z(Os({},n,{actionData:a,loaderData:d,historyAction:j,location:t,initialized:!0,navigation:wa,revalidation:"idle",restoreScrollPosition:ce(t,n.matches||C.matches),preventScrollReset:f,blockers:h}),{viewTransitionOpts:p,flushSync:!0===c}),j=Is.Pop,_=!1,k=!1,T=!1,O=!1,I=[],R=[]}async function H(t,n,r){S&&S.abort(),S=null,j=t,T=!0===(r&&r.startUninterruptedRevalidation),function(e,t){if(p&&m){let n=le(e,t);p[n]=m()}}(C.location,C.matches),_=!0===(r&&r.preventScrollReset),k=!0===(r&&r.enableViewTransition);let s=i||l,d=r&&r.overrideNavigation,h=zs(s,n,c),f=!0===(r&&r.flushSync);if(!h){let e=za(404,{pathname:n.pathname}),{matches:t,route:r}=qa(s);return ae(),void V(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}if(C.initialized&&!O&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(C.location,n)&&!(r&&r.submission&&Xa(r.submission.formMethod)))return void V(n,{matches:h},{flushSync:f});S=new AbortController;let g,v,y=Da(e.history,n,S.signal,r&&r.submission);if(r&&r.pendingError)v={[$a(h).route.id]:r.pendingError};else if(r&&r.submission&&Xa(r.submission.formMethod)){let e=await async function(e,t,n,r,i){void 0===i&&(i={});Q();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(t,n);z({navigation:l},{flushSync:!0===i.flushSync});let d=nl(r,t);if(d.route.action||d.route.lazy){if(s=await Pa("action",e,d,r,a,o,c,u.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else s={type:Gs.error,error:za(405,{method:e.method,pathname:t.pathname,routeId:d.route.id})};if(Qa(s)){let e;return e=i&&null!=i.replace?i.replace:s.location===C.location.pathname+C.location.search,await W(C,s,{submission:n,replace:e}),{shortCircuited:!0}}if(Ya(s)){let e=$a(r,d.route.id);return!0!==(i&&i.replace)&&(j=Is.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:s.error}}}if(Wa(s))throw za(400,{type:"defer-action"});return{pendingActionData:{[d.route.id]:s.data}}}(y,n,r.submission,h,{replace:r.replace,flushSync:f});if(e.shortCircuited)return;g=e.pendingActionData,v=e.pendingActionError,d=ol(n,r.submission),f=!1,y=new Request(y.url,{signal:y.signal})}let{shortCircuited:b,loaderData:x,errors:w}=await async function(t,n,r,o,s,a,d,h,p,f,m){let g=o||ol(n,s),v=s||a||rl(g),y=i||l,[b,x]=Ia(e.history,C,r,v,n,u.v7_partialHydration&&!0===h,O,I,R,U,L,F,y,c,f,m);if(ae((e=>!(r&&r.some((t=>t.route.id===e)))||b&&b.some((t=>t.route.id===e)))),P=++M,0===b.length&&0===x.length){let e=ne();return V(n,Os({matches:r,loaderData:{},errors:m||null},f?{actionData:f}:{},e?{fetchers:new Map(C.fetchers)}:{}),{flushSync:p}),{shortCircuited:!0}}if(!T&&(!u.v7_partialHydration||!h)){x.forEach((e=>{let t=C.fetchers.get(e.key),n=il(void 0,t?t.data:void 0);C.fetchers.set(e.key,n)}));let e=f||C.actionData;z(Os({navigation:g},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},x.length>0?{fetchers:new Map(C.fetchers)}:{}),{flushSync:p})}x.forEach((e=>{A.has(e.key)&&ee(e.key),e.controller&&A.set(e.key,e.controller)}));let w=()=>x.forEach((e=>ee(e.key)));S&&S.signal.addEventListener("abort",w);let{results:j,loaderResults:_,fetcherResults:k}=await Y(C.matches,r,b,x,t);if(t.signal.aborted)return{shortCircuited:!0};S&&S.signal.removeEventListener("abort",w);x.forEach((e=>A.delete(e.key)));let N=Va(j);if(N){if(N.idx>=b.length){let e=x[N.idx-b.length].key;F.add(e)}return await W(C,N.result,{replace:d}),{shortCircuited:!0}}let{loaderData:E,errors:D}=Ua(C,r,b,_,m,x,k,G);G.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&G.delete(t)}))})),u.v7_partialHydration&&h&&C.errors&&Object.entries(C.errors).filter((e=>{let[t]=e;return!b.some((e=>e.route.id===t))})).forEach((e=>{let[t,n]=e;D=Object.assign(D||{},{[t]:n})}));let B=ne(),$=re(P),q=B||$||x.length>0;return Os({loaderData:E,errors:D},q?{fetchers:new Map(C.fetchers)}:{})}(y,n,h,d,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&!0===r.initialHydration,f,g,v);b||(S=null,V(n,Os({matches:h},g?{actionData:g}:{},{loaderData:x,errors:w})))}async function W(r,o,i){let{submission:s,fetcherSubmission:a,replace:l}=void 0===i?{}:i;o.revalidate&&(O=!0);let u=Fs(r.location,o.location,{_isRedirect:!0});if(Ms(u,"Expected a location on the redirect navigation"),n){let n=!1;if(o.reloadDocument)n=!0;else if(ja.test(o.location)){const r=e.history.createURL(o.location);n=r.origin!==t.location.origin||null==oa(r.pathname,c)}if(n)return void(l?t.location.replace(o.location):t.location.assign(o.location))}S=null;let d=!0===l?Is.Replace:Is.Push,{formMethod:h,formAction:p,formEncType:f}=r.navigation;!s&&!a&&h&&p&&f&&(s=rl(r.navigation));let m=s||a;if(xa.has(o.status)&&m&&Xa(m.formMethod))await H(d,u,{submission:Os({},m,{formAction:o.location}),preventScrollReset:_});else{let e=ol(u,s);await H(d,u,{overrideNavigation:e,fetcherSubmission:a,preventScrollReset:_})}}async function Y(t,n,r,i,s){let l=await Promise.all([...r.map((e=>Pa("loader",s,e,n,a,o,c,u.v7_relativeSplatPath))),...i.map((t=>{if(t.matches&&t.match&&t.controller)return Pa("loader",Da(e.history,t.path,t.controller.signal),t.match,t.matches,a,o,c,u.v7_relativeSplatPath);return{type:Gs.error,error:za(404,{pathname:t.path})}}))]),d=l.slice(0,r.length),h=l.slice(r.length);return await Promise.all([Za(t,r,d,d.map((()=>s.signal)),!1,C.loaderData),Za(t,i.map((e=>e.match)),h,i.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:l,loaderResults:d,fetcherResults:h}}function Q(){O=!0,I.push(...ae()),L.forEach(((e,t)=>{A.has(t)&&(R.push(t),ee(t))}))}function J(e,t,n){void 0===n&&(n={}),C.fetchers.set(e,t),z({fetchers:new Map(C.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function K(e,t,n,r){void 0===r&&(r={});let o=$a(C.matches,t);Z(e),z({errors:{[o.route.id]:n},fetchers:new Map(C.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function X(e){return u.v7_fetcherPersist&&(B.set(e,(B.get(e)||0)+1),U.has(e)&&U.delete(e)),C.fetchers.get(e)||Sa}function Z(e){let t=C.fetchers.get(e);!A.has(e)||t&&"loading"===t.state&&D.has(e)||ee(e),L.delete(e),D.delete(e),F.delete(e),U.delete(e),C.fetchers.delete(e)}function ee(e){let t=A.get(e);Ms(t,"Expected fetch controller: "+e),t.abort(),A.delete(e)}function te(e){for(let t of e){let e=sl(X(t).data);C.fetchers.set(t,e)}}function ne(){let e=[],t=!1;for(let n of F){let r=C.fetchers.get(n);Ms(r,"Expected fetcher: "+n),"loading"===r.state&&(F.delete(n),e.push(n),t=!0)}return te(e),t}function re(e){let t=[];for(let[n,r]of D)if(r<e){let e=C.fetchers.get(n);Ms(e,"Expected fetcher: "+n),"loading"===e.state&&(ee(n),D.delete(n),t.push(n))}return te(t),t.length>0}function oe(e){C.blockers.delete(e),$.delete(e)}function ie(e,t){let n=C.blockers.get(e)||Ca;Ms("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(C.blockers);r.set(e,t),z({blockers:r})}function se(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===$.size)return;$.size>1&&Ps(!1,"A router only supports one blocker at a time");let o=Array.from($.entries()),[i,s]=o[o.length-1],a=C.blockers.get(i);return a&&"proceeding"===a.state?void 0:s({currentLocation:t,nextLocation:n,historyAction:r})?i:void 0}function ae(e){let t=[];return G.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),G.delete(r))})),t}function le(e,t){if(f){let n=f(e,t.map((e=>function(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}(e,C.loaderData))));return n||e.key}return e.key}function ce(e,t){if(p){let n=le(e,t),r=p[n];if("number"===typeof r)return r}return null}return b={get basename(){return c},get future(){return u},get state(){return C},get routes(){return l},get window(){return t},initialize:function(){if(d=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(q)return void(q=!1);Ps(0===$.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=se({currentLocation:C.location,nextLocation:r,historyAction:n});return i&&null!=o?(q=!0,e.history.go(-1*o),void ie(i,{state:"blocked",location:r,proceed(){ie(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(o)},reset(){let e=new Map(C.blockers);e.set(i,Ca),z({blockers:e})}})):H(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ka);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(n){}}(t,N);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ka,JSON.stringify(r))}catch(n){Ps(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}(t,N);t.addEventListener("pagehide",e),E=()=>t.removeEventListener("pagehide",e)}return C.initialized||H(Is.Pop,C.location,{initialHydration:!0}),b},subscribe:function(e){return h.add(e),()=>h.delete(e)},enableScrollRestoration:function(e,t,n){if(p=e,m=t,f=n||null,!g&&C.navigation===wa){g=!0;let e=ce(C.location,C.matches);null!=e&&z({restoreScrollPosition:e})}return()=>{p=null,m=null,f=null}},navigate:async function t(n,r){if("number"===typeof n)return void e.history.go(n);let o=Ea(C.location,C.matches,c,u.v7_prependBasename,n,u.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:i,submission:s,error:a}=Ta(u.v7_normalizeFormMethod,!1,o,r),l=C.location,d=Fs(C.location,i,r&&r.state);d=Os({},d,e.history.encodeLocation(d));let h=r&&null!=r.replace?r.replace:void 0,p=Is.Push;!0===h?p=Is.Replace:!1===h||null!=s&&Xa(s.formMethod)&&s.formAction===C.location.pathname+C.location.search&&(p=Is.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.unstable_flushSync),g=se({currentLocation:l,nextLocation:d,historyAction:p});if(!g)return await H(p,d,{submission:s,pendingError:a,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.unstable_viewTransition,flushSync:m});ie(g,{state:"blocked",location:d,proceed(){ie(g,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,r)},reset(){let e=new Map(C.blockers);e.set(g,Ca),z({blockers:e})}})},fetch:function(t,n,s,d){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");A.has(t)&&ee(t);let h=!0===(d&&d.unstable_flushSync),p=i||l,f=Ea(C.location,C.matches,c,u.v7_prependBasename,s,u.v7_relativeSplatPath,n,null==d?void 0:d.relative),m=zs(p,f,c);if(!m)return void K(t,n,za(404,{pathname:f}),{flushSync:h});let{path:g,submission:v,error:y}=Ta(u.v7_normalizeFormMethod,!0,f,d);if(y)return void K(t,n,y,{flushSync:h});let b=nl(m,g);_=!0===(d&&d.preventScrollReset),v&&Xa(v.formMethod)?async function(t,n,r,s,d,h,p){if(Q(),L.delete(t),!s.route.action&&!s.route.lazy){let e=za(405,{method:p.formMethod,pathname:r,routeId:n});return void K(t,n,e,{flushSync:h})}let f=C.fetchers.get(t);J(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(p,f),{flushSync:h});let m=new AbortController,g=Da(e.history,r,m.signal,p);A.set(t,m);let v=M,y=await Pa("action",g,s,d,a,o,c,u.v7_relativeSplatPath);if(g.signal.aborted)return void(A.get(t)===m&&A.delete(t));if(u.v7_fetcherPersist&&U.has(t)){if(Qa(y)||Ya(y))return void J(t,sl(void 0))}else{if(Qa(y))return A.delete(t),P>v?void J(t,sl(void 0)):(F.add(t),J(t,il(p)),W(C,y,{fetcherSubmission:p}));if(Ya(y))return void K(t,n,y.error)}if(Wa(y))throw za(400,{type:"defer-action"});let b=C.navigation.location||C.location,x=Da(e.history,b,m.signal),w=i||l,_="idle"!==C.navigation.state?zs(w,C.navigation.location,c):C.matches;Ms(_,"Didn't find any matches after fetcher action");let k=++M;D.set(t,k);let N=il(p,y.data);C.fetchers.set(t,N);let[E,T]=Ia(e.history,C,_,p,b,!1,O,I,R,U,L,F,w,c,{[s.route.id]:y.data},void 0);T.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=C.fetchers.get(t),r=il(void 0,n?n.data:void 0);C.fetchers.set(t,r),A.has(t)&&ee(t),e.controller&&A.set(t,e.controller)})),z({fetchers:new Map(C.fetchers)});let B=()=>T.forEach((e=>ee(e.key)));m.signal.addEventListener("abort",B);let{results:$,loaderResults:q,fetcherResults:H}=await Y(C.matches,_,E,T,x);if(m.signal.aborted)return;m.signal.removeEventListener("abort",B),D.delete(t),A.delete(t),T.forEach((e=>A.delete(e.key)));let X=Va($);if(X){if(X.idx>=E.length){let e=T[X.idx-E.length].key;F.add(e)}return W(C,X.result)}let{loaderData:Z,errors:te}=Ua(C,C.matches,E,q,void 0,T,H,G);if(C.fetchers.has(t)){let e=sl(y.data);C.fetchers.set(t,e)}re(k),"loading"===C.navigation.state&&k>P?(Ms(j,"Expected pending action"),S&&S.abort(),V(C.navigation.location,{matches:_,loaderData:Z,errors:te,fetchers:new Map(C.fetchers)})):(z({errors:te,loaderData:Ga(C.loaderData,Z,_,te),fetchers:new Map(C.fetchers)}),O=!1)}(t,n,g,b,m,h,v):(L.set(t,{routeId:n,path:g}),async function(t,n,r,i,s,l,d){let h=C.fetchers.get(t);J(t,il(d,h?h.data:void 0),{flushSync:l});let p=new AbortController,f=Da(e.history,r,p.signal);A.set(t,p);let m=M,g=await Pa("loader",f,i,s,a,o,c,u.v7_relativeSplatPath);Wa(g)&&(g=await el(g,f.signal,!0)||g);A.get(t)===p&&A.delete(t);if(f.signal.aborted)return;if(U.has(t))return void J(t,sl(void 0));if(Qa(g))return P>m?void J(t,sl(void 0)):(F.add(t),void await W(C,g));if(Ya(g))return void K(t,n,g.error);Ms(!Wa(g),"Unhandled fetcher deferred data"),J(t,sl(g.data))}(t,n,g,b,m,h,v))},revalidate:function(){Q(),z({revalidation:"loading"}),"submitting"!==C.navigation.state&&("idle"!==C.navigation.state?H(j||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation}):H(C.historyAction,C.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:X,deleteFetcher:function(e){if(u.v7_fetcherPersist){let t=(B.get(e)||0)-1;t<=0?(B.delete(e),U.add(e)):B.set(e,t)}else Z(e);z({fetchers:new Map(C.fetchers)})},dispose:function(){d&&d(),E&&E(),h.clear(),S&&S.abort(),C.fetchers.forEach(((e,t)=>Z(t))),C.blockers.forEach(((e,t)=>oe(t)))},getBlocker:function(e,t){let n=C.blockers.get(e)||Ca;return $.get(e)!==t&&$.set(e,t),n},deleteBlocker:oe,_internalFetchControllers:A,_internalActiveDeferreds:G,_internalSetRoutes:function(e){a={},i=qs(e,o,void 0,a)}},b}Symbol("deferred");function Ea(e,t,n,r,o,i,s,a){let l,c;if(s){l=[];for(let e of t)if(l.push(e),e.route.id===s){c=e;break}}else l=t,c=t[t.length-1];let u=la(o||".",aa(l,i),oa(e.pathname,n)||e.pathname,"path"===a);return null==o&&(u.search=e.search,u.hash=e.hash),null!=o&&""!==o&&"."!==o||!c||!c.route.index||tl(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(u.pathname="/"===u.pathname?n:ca([n,u.pathname])),Ls(u)}function Ta(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ka(r.formMethod))return{path:n,error:za(405,{method:r.formMethod})};let o,i,s=()=>({path:n,error:za(400,{type:"invalid-body"})}),a=r.formMethod||"get",l=e?a.toUpperCase():a.toLowerCase(),c=Ha(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Xa(l))return s();let e="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Xa(l))return s();try{let e="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(h){return s()}}}if(Ms("function"===typeof FormData,"FormData is not available in this environment"),r.formData)o=Fa(r.formData),i=r.formData;else if(r.body instanceof FormData)o=Fa(r.body),i=r.body;else if(r.body instanceof URLSearchParams)o=r.body,i=La(o);else if(null==r.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(r.body),i=La(o)}catch(h){return s()}let u={formMethod:l,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Xa(u.formMethod))return{path:n,submission:u};let d=Bs(n);return t&&d.search&&tl(d.search)&&o.append("index",""),d.search="?"+o,{path:Ls(d),submission:u}}function Oa(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}function Ia(e,t,n,r,o,i,s,a,l,c,u,d,h,p,f,m){let g=m?Object.values(m)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(t.location),y=e.createURL(o),b=m?Object.keys(m)[0]:void 0,x=Oa(n,b).filter(((e,n)=>{let{route:o}=e;if(o.lazy)return!0;if(null==o.loader)return!1;if(i)return!!o.loader.hydrate||void 0===t.loaderData[o.id]&&(!t.errors||void 0===t.errors[o.id]);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||a.some((t=>t===e.route.id)))return!0;let l=t.matches[n],c=e;return Aa(e,Os({currentUrl:v,currentParams:l.params,nextUrl:y,nextParams:c.params},r,{actionResult:g,defaultShouldRevalidate:s||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||Ra(l,c)}))})),w=[];return u.forEach(((e,o)=>{if(i||!n.some((t=>t.route.id===e.routeId))||c.has(o))return;let a=zs(h,e.path,p);if(!a)return void w.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(o),f=nl(a,e.path),m=!1;m=!d.has(o)&&(!!l.includes(o)||(u&&"idle"!==u.state&&void 0===u.data?s:Aa(f,Os({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:s})))),m&&w.push({key:o,routeId:e.routeId,path:e.path,matches:a,match:f,controller:new AbortController})})),[x,w]}function Ra(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Aa(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}async function Ma(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ms(o,"No route found in manifest");let i={};for(let s in r){let e=void 0!==o[s]&&"hasErrorBoundary"!==s;Ps(!e,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+s+'" will be ignored.'),e||$s.has(s)||(i[s]=r[s])}Object.assign(o,i),Object.assign(o,Os({},t(o),{lazy:void 0}))}async function Pa(e,t,n,r,o,i,s,a,l){let c,u,d;void 0===l&&(l={});let h=e=>{let r,o=new Promise(((e,t)=>r=t));return d=()=>r(),t.signal.addEventListener("abort",d),Promise.race([e({request:t,params:n.params,context:l.requestContext}),o])};try{let r=n.route[e];if(n.route.lazy)if(r){let e,t=await Promise.all([h(r).catch((t=>{e=t})),Ma(n.route,i,o)]);if(e)throw e;u=t[0]}else{if(await Ma(n.route,i,o),r=n.route[e],!r){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw za(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:Gs.data,data:void 0}}u=await h(r)}else{if(!r){let e=new URL(t.url);throw za(404,{pathname:e.pathname+e.search})}u=await h(r)}Ms(void 0!==u,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(m){c=Gs.error,u=m}finally{d&&t.signal.removeEventListener("abort",d)}if(Ja(u)){let e,o=u.status;if(ba.has(o)){let e=u.headers.get("Location");if(Ms(e,"Redirects returned/thrown from loaders/actions must have a Location header"),ja.test(e)){if(!l.isStaticRequest){let n=new URL(t.url),r=e.startsWith("//")?new URL(n.protocol+e):new URL(e),o=null!=oa(r.pathname,s);r.origin===n.origin&&o&&(e=r.pathname+r.search+r.hash)}}else e=Ea(new URL(t.url),r.slice(0,r.indexOf(n)+1),s,!0,e,a);if(l.isStaticRequest)throw u.headers.set("Location",e),u;return{type:Gs.redirect,status:o,location:e,revalidate:null!==u.headers.get("X-Remix-Revalidate"),reloadDocument:null!==u.headers.get("X-Remix-Reload-Document")}}if(l.isRouteRequest){throw{type:c===Gs.error?Gs.error:Gs.data,response:u}}try{let t=u.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==u.body?null:await u.json():await u.text()}catch(m){return{type:Gs.error,error:m}}return c===Gs.error?{type:c,error:new pa(o,u.statusText,e),headers:u.headers}:{type:Gs.data,data:e,statusCode:u.status,headers:u.headers}}return c===Gs.error?{type:c,error:u}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(u)?{type:Gs.deferred,deferredData:u,statusCode:null==(p=u.init)?void 0:p.status,headers:(null==(f=u.init)?void 0:f.headers)&&new Headers(u.init.headers)}:{type:Gs.data,data:u};var p,f}function Da(e,t,n,r){let o=e.createURL(Ha(t)).toString(),i={signal:n};if(r&&Xa(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Fa(r.formData):i.body=r.formData}return new Request(o,i)}function Fa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"===typeof r?r:r.name);return t}function La(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ba(e,t,n,r,o){let i,s={},a=null,l=!1,c={};return n.forEach(((n,u)=>{let d=t[u].route.id;if(Ms(!Qa(n),"Cannot handle redirect results in processLoaderData"),Ya(n)){let t=$a(e,d),o=n.error;r&&(o=Object.values(r)[0],r=void 0),a=a||{},null==a[t.route.id]&&(a[t.route.id]=o),s[d]=void 0,l||(l=!0,i=fa(n.error)?n.error.status:500),n.headers&&(c[d]=n.headers)}else Wa(n)?(o.set(d,n.deferredData),s[d]=n.deferredData.data):s[d]=n.data,null==n.statusCode||200===n.statusCode||l||(i=n.statusCode),n.headers&&(c[d]=n.headers)})),r&&(a=r,s[Object.keys(r)[0]]=void 0),{loaderData:s,errors:a,statusCode:i||200,loaderHeaders:c}}function Ua(e,t,n,r,o,i,s,a){let{loaderData:l,errors:c}=Ba(t,n,r,o,a);for(let u=0;u<i.length;u++){let{key:t,match:n,controller:r}=i[u];Ms(void 0!==s&&void 0!==s[u],"Did not find corresponding fetcher result");let o=s[u];if(!r||!r.signal.aborted)if(Ya(o)){let r=$a(e.matches,null==n?void 0:n.route.id);c&&c[r.route.id]||(c=Os({},c,{[r.route.id]:o.error})),e.fetchers.delete(t)}else if(Qa(o))Ms(!1,"Unhandled fetcher revalidation redirect");else if(Wa(o))Ms(!1,"Unhandled fetcher deferred data");else{let n=sl(o.data);e.fetchers.set(t,n)}}return{loaderData:l,errors:c}}function Ga(e,t,n,r){let o=Os({},t);for(let i of n){let n=i.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(o[n]=t[n]):void 0!==e[n]&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function $a(e,t){let n=t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e];return n.reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function qa(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function za(e,t){let{pathname:n,routeId:r,method:o,type:i}=void 0===t?{}:t,s="Unknown Server Error",a="Unknown @remix-run/router error";return 400===e?(s="Bad Request",o&&n&&r?a="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===i?a="defer() is not supported in actions":"invalid-body"===i&&(a="Unable to encode submission body")):403===e?(s="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",a='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?a="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(a='Invalid request method "'+o.toUpperCase()+'"')),new pa(e||500,s,new Error(a),!0)}function Va(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Qa(n))return{result:n,idx:t}}}function Ha(e){return Ls(Os({},"string"===typeof e?Bs(e):e,{hash:""}))}function Wa(e){return e.type===Gs.deferred}function Ya(e){return e.type===Gs.error}function Qa(e){return(e&&e.type)===Gs.redirect}function Ja(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function Ka(e){return ya.has(e.toLowerCase())}function Xa(e){return ga.has(e.toLowerCase())}async function Za(e,t,n,r,o,i){for(let s=0;s<n.length;s++){let a=n[s],l=t[s];if(!l)continue;let c=e.find((e=>e.route.id===l.route.id)),u=null!=c&&!Ra(c,l)&&void 0!==(i&&i[l.route.id]);if(Wa(a)&&(o||u)){let e=r[s];Ms(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await el(a,e,o).then((e=>{e&&(n[s]=e||n[s])}))}}}async function el(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Gs.data,data:e.deferredData.unwrappedData}}catch(r){return{type:Gs.error,error:r}}return{type:Gs.data,data:e.deferredData.data}}}function tl(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function nl(e,t){let n="string"===typeof t?Bs(t).search:t.search;if(e[e.length-1].route.index&&tl(n||""))return e[e.length-1];let r=sa(e);return r[r.length-1]}function rl(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:s}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==s?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}:void 0}function ol(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function il(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function sl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},al.apply(this,arguments)}const ll=o.createContext(null);const cl=o.createContext(null);const ul=o.createContext(null);const dl=o.createContext(null);const hl=o.createContext({outlet:null,matches:[],isDataRoute:!1});const pl=o.createContext(null);function fl(){return null!=o.useContext(dl)}function ml(){return fl()||Ms(!1),o.useContext(dl).location}function gl(e){o.useContext(ul).static||o.useLayoutEffect(e)}function vl(){let{isDataRoute:e}=o.useContext(hl);return e?function(){let{router:e}=El(kl.UseNavigateStable),t=Ol(Nl.UseNavigateStable),n=o.useRef(!1);gl((()=>{n.current=!0}));let r=o.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,al({fromRouteId:t},o)))}),[e,t]);return r}():function(){fl()||Ms(!1);let e=o.useContext(ll),{basename:t,future:n,navigator:r}=o.useContext(ul),{matches:i}=o.useContext(hl),{pathname:s}=ml(),a=JSON.stringify(aa(i,n.v7_relativeSplatPath)),l=o.useRef(!1);gl((()=>{l.current=!0}));let c=o.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"===typeof n)return void r.go(n);let i=la(n,JSON.parse(a),s,"path"===o.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:ca([t,i.pathname])),(o.replace?r.replace:r.push)(i,o.state,o)}),[t,r,a,s,e]);return c}()}function yl(){let{matches:e}=o.useContext(hl),t=e[e.length-1];return t?t.params:{}}function bl(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=o.useContext(ul),{matches:i}=o.useContext(hl),{pathname:s}=ml(),a=JSON.stringify(aa(i,r.v7_relativeSplatPath));return o.useMemo((()=>la(e,JSON.parse(a),s,"path"===n)),[e,a,s,n])}function xl(e,t,n,r){fl()||Ms(!1);let{navigator:i}=o.useContext(ul),{matches:s}=o.useContext(hl),a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,d=ml();if(t){var h;let e="string"===typeof t?Bs(t):t;"/"===c||(null==(h=e.pathname)?void 0:h.startsWith(c))||Ms(!1),u=e}else u=d;let p=u.pathname||"/",f=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=zs(e,{pathname:f});let g=_l(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:ca([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:ca([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,r);return t&&g?o.createElement(dl.Provider,{value:{location:al({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Is.Pop}},g):g}function wl(){let e=Il(),t=fa(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:i},n):null,null)}const Sl=o.createElement(wl,null);class Cl extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?o.createElement(hl.Provider,{value:this.props.routeContext},o.createElement(pl.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jl(e){let{routeContext:t,match:n,children:r}=e,i=o.useContext(ll);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(hl.Provider,{value:t},r)}function _l(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let a=e,l=null==(i=n)?void 0:i.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||Ms(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let o=0;o<a.length;o++){let e=a[o];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=o),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((e,r,i)=>{let s,d=!1,h=null,p=null;var f;n&&(s=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||Sl,c&&(u<0&&0===i?(f="route-fallback",!1||Al[f]||(Al[f]=!0),d=!0,p=null):u===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),g=()=>{let t;return t=s?h:d?p:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(jl,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.createElement(Cl,{location:n.location,revalidation:n.revalidation,component:h,error:s,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var kl=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(kl||{}),Nl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Nl||{});function El(e){let t=o.useContext(ll);return t||Ms(!1),t}function Tl(e){let t=o.useContext(cl);return t||Ms(!1),t}function Ol(e){let t=function(e){let t=o.useContext(hl);return t||Ms(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||Ms(!1),n.route.id}function Il(){var e;let t=o.useContext(pl),n=Tl(Nl.UseRouteError),r=Ol(Nl.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}let Rl=0;const Al={};i.startTransition;function Ml(e){let{to:t,replace:n,state:r,relative:i}=e;fl()||Ms(!1);let{future:s,static:a}=o.useContext(ul),{matches:l}=o.useContext(hl),{pathname:c}=ml(),u=vl(),d=la(t,aa(l,s.v7_relativeSplatPath),c,"path"===i),h=JSON.stringify(d);return o.useEffect((()=>u(JSON.parse(h),{replace:n,state:r,relative:i})),[u,h,i,n,r]),null}function Pl(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Is.Pop,navigator:s,static:a=!1,future:l}=e;fl()&&Ms(!1);let c=t.replace(/^\/*/,"/"),u=o.useMemo((()=>({basename:c,navigator:s,static:a,future:al({v7_relativeSplatPath:!1},l)})),[c,l,s,a]);"string"===typeof r&&(r=Bs(r));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:m="default"}=r,g=o.useMemo((()=>{let e=oa(d,c);return null==e?null:{location:{pathname:e,search:h,hash:p,state:f,key:m},navigationType:i}}),[c,d,h,p,f,m,i]);return null==g?null:o.createElement(ul.Provider,{value:u},o.createElement(dl.Provider,{children:n,value:g}))}new Promise((()=>{}));o.Component;function Dl(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:o.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var Fl=n(7950),Ll=n.t(Fl,2);function Bl(){return Bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bl.apply(this,arguments)}function Ul(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Gl=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$l=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(BK){}function ql(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Bl({},t,{errors:zl(t.errors)})),t}function zl(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[r]=new pa(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){if(o.__subType){let e=window[o.__subType];if("function"===typeof e)try{let t=new e(o.message);t.stack="",n[r]=t}catch(BK){}}if(null==n[r]){let e=new Error(o.message);e.stack="",n[r]=e}}else n[r]=o;return n}const Vl=o.createContext({isTransitioning:!1});const Hl=o.createContext(new Map);const Wl=i.startTransition,Yl=Ll.flushSync;i.useId;function Ql(e){Yl?Yl(e):e()}class Jl{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Kl(e){let{fallbackElement:t,router:n,future:r}=e,[i,s]=o.useState(n.state),[a,l]=o.useState(),[c,u]=o.useState({isTransitioning:!1}),[d,h]=o.useState(),[p,f]=o.useState(),[m,g]=o.useState(),v=o.useRef(new Map),{v7_startTransition:y}=r||{},b=o.useCallback((e=>{y?function(e){Wl?Wl(e):e()}(e):e()}),[y]),x=o.useCallback(((e,t)=>{let{deletedFetchers:r,unstable_flushSync:o,unstable_viewTransitionOpts:i}=t;r.forEach((e=>v.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&v.current.set(t,e.data)}));let a=null==n.window||"function"!==typeof n.window.document.startViewTransition;if(i&&!a){if(o){Ql((()=>{p&&(d&&d.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=n.window.document.startViewTransition((()=>{Ql((()=>s(e)))}));return t.finished.finally((()=>{Ql((()=>{h(void 0),f(void 0),l(void 0),u({isTransitioning:!1})}))})),void Ql((()=>f(t)))}p?(d&&d.resolve(),p.skipTransition(),g({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(l(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else o?Ql((()=>s(e))):b((()=>s(e)))}),[n.window,p,d,v,b]);o.useLayoutEffect((()=>n.subscribe(x)),[n,x]),o.useEffect((()=>{c.isTransitioning&&!c.flushSync&&h(new Jl)}),[c]),o.useEffect((()=>{if(d&&a&&n.window){let e=a,t=d.promise,r=n.window.document.startViewTransition((async()=>{b((()=>s(e))),await t}));r.finished.finally((()=>{h(void 0),f(void 0),l(void 0),u({isTransitioning:!1})})),f(r)}}),[b,a,d,n.window]),o.useEffect((()=>{d&&a&&i.location.key===a.location.key&&d.resolve()}),[d,p,i.location,a]),o.useEffect((()=>{!c.isTransitioning&&m&&(l(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))}),[c.isTransitioning,m]),o.useEffect((()=>{}),[]);let w=o.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),S=n.basename||"/",C=o.useMemo((()=>({router:n,navigator:w,static:!1,basename:S})),[n,w,S]);return o.createElement(o.Fragment,null,o.createElement(ll.Provider,{value:C},o.createElement(cl.Provider,{value:i},o.createElement(Hl.Provider,{value:v.current},o.createElement(Vl.Provider,{value:c},o.createElement(Pl,{basename:S,location:i.location,navigationType:i.historyAction,navigator:w,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?o.createElement(Xl,{routes:n.routes,future:n.future,state:i}):t))))),null)}function Xl(e){let{routes:t,future:n,state:r}=e;return xl(t,void 0,r,n)}const Zl="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,ec=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tc=o.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,p=Ul(e,Gl),{basename:f}=o.useContext(ul),m=!1;if("string"===typeof u&&ec.test(u)&&(n=u,Zl))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=oa(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(BK){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;fl()||Ms(!1);let{basename:r,navigator:i}=o.useContext(ul),{hash:s,pathname:a,search:l}=bl(e,{relative:n}),c=a;return"/"!==r&&(c="/"===a?r:ca([r,a])),i.createHref({pathname:c,search:l,hash:s})}(u,{relative:i}),v=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:l}=void 0===t?{}:t,c=vl(),u=ml(),d=bl(e,{relative:a});return o.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:Ls(u)===Ls(d);c(e,{replace:n,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:l})}}),[u,c,d,r,i,n,e,s,a,l])}(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:i,unstable_viewTransition:h});return o.createElement("a",Bl({},p,{href:n||g,onClick:m||s?r:function(e){r&&r(e),e.defaultPrevented||v(e)},ref:t,target:c}))}));const nc=o.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=e,d=Ul(e,$l),h=bl(l,{relative:d.relative}),p=ml(),f=o.useContext(cl),{navigator:m,basename:g}=o.useContext(ul),v=null!=f&&function(e,t){void 0===t&&(t={});let n=o.useContext(Vl);null==n&&Ms(!1);let{basename:r}=ic(rc.useViewTransitionState),i=bl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=oa(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=oa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=na(i.pathname,a)||null!=na(i.pathname,s)}(h)&&!0===c,y=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,b=p.pathname,x=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(b=b.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=oa(x,g)||x);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let S,C=b===y||!s&&b.startsWith(y)&&"/"===b.charAt(w),j=null!=x&&(x===y||!s&&x.startsWith(y)&&"/"===x.charAt(y.length)),_={isActive:C,isPending:j,isTransitioning:v},k=C?n:void 0;S="function"===typeof i?i(_):[i,C?"active":null,j?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let N="function"===typeof a?a(_):a;return o.createElement(tc,Bl({},d,{"aria-current":k,className:S,ref:t,style:N,to:l,unstable_viewTransition:c}),"function"===typeof u?u(_):u)}));var rc,oc;function ic(e){let t=o.useContext(ll);return t||Ms(!1),t}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(rc||(rc={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(oc||(oc={}));function sc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var ac="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};function lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cc(e,t){return e(t={exports:{}},t.exports),t.exports}var uc=cc((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));lc(uc);var dc=lc(cc((function(e,t){var n=ac&&ac.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=ac&&ac.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},o=ac;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",s={key:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},getItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},clear:function(){return n(o,void 0,void 0,(function(){return r(this,(function(e){return[2,window.localStorage.clear()]}))}))},removeItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},setItem:function(e,t){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function a(e){return new Promise((function(t){return setTimeout(t,e)}))}function l(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++)n+=t[Math.floor(61*Math.random())];return n}var c=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,o){return void 0===o&&(o=5e3),n(this,void 0,void 0,(function(){var n,c,u,d,h,p,f;return r(this,(function(r){switch(r.label){case 0:n=Date.now()+l(4),c=Date.now()+o,u=i+"-"+t,d=void 0===this.storageHandler?s:this.storageHandler,r.label=1;case 1:return Date.now()<c?[4,a(30)]:[3,8];case 2:return r.sent(),null!==d.getItemSync(u)?[3,5]:(h=this.id+"-"+t+"-"+n,[4,a(Math.floor(25*Math.random()))]);case 3:return r.sent(),d.setItemSync(u,JSON.stringify({id:this.id,iat:n,timeoutKey:h,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,a(30)];case 4:return r.sent(),null!==(p=d.getItemSync(u))&&(f=JSON.parse(p)).id===this.id&&f.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?s:this.storageHandler),[4,this.waitForSomethingToChange(c)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+l(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var o=this;return r(this,(function(i){return setTimeout((function(){return n(o,void 0,void 0,(function(){var n,o,i;return r(this,(function(r){switch(r.label){case 0:return[4,uc.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?s:this.storageHandler,null===(o=n.getItemSync(e))?(uc.default().unlock(t),[2]):((i=JSON.parse(o)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(i)),uc.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(uc.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,o=Date.now(),i=!1;function s(){if(i||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(a),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",s),e.addToWaiting(s);var a=setTimeout(s,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,o,a,l;return r(this,(function(r){switch(r.label){case 0:return n=void 0===this.storageHandler?s:this.storageHandler,o=i+"-"+t,null===(a=n.getItemSync(o))?[2]:(l=JSON.parse(a)).id!==this.id?[3,2]:[4,uc.default().lock(l.iat)];case 1:r.sent(),this.acquiredIatSet.delete(l.iat),n.removeItemSync(o),uc.default().unlock(l.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,o=[],s=0;;){var a=r.keySync(s);if(null===a)break;o.push(a),s++}for(var l=!1,c=0;c<o.length;c++){var u=o[c];if(u.includes(i)){var d=r.getItemSync(u);if(null!==d){var h=JSON.parse(d);(void 0===h.timeRefreshed&&h.timeAcquired<n||void 0!==h.timeRefreshed&&h.timeRefreshed<n)&&(r.removeItemSync(u),l=!0)}}}l&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=c})));const hc={timeoutInSeconds:60},pc={name:"auth0-spa-js",version:"2.1.3"},fc=()=>Date.now();class mc extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,mc.prototype)}static fromPayload({error:e,error_description:t}){return new mc(e,t)}}class gc extends mc{constructor(e,t,n,r=null){super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,gc.prototype)}}class vc extends mc{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,vc.prototype)}}class yc extends vc{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,yc.prototype)}}class bc extends mc{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,bc.prototype)}}class xc extends mc{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,xc.prototype)}}class wc extends mc{constructor(e,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${Sc(e,["default"])}', scope: '${Sc(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,wc.prototype)}}function Sc(e,t=[]){return e&&!t.includes(e)?e:""}const Cc=()=>window.crypto,jc=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(Cc().getRandomValues(new Uint8Array(43))).forEach((n=>t+=e[n%66])),t},_c=e=>btoa(e),kc=e=>{var{clientId:t}=e,n=sc(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{}))(Object.assign({client_id:t},n))).toString()},Nc=e=>(e=>decodeURIComponent(atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Ec=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json()}},Tc=async(e,t,n,r,o,i,s=1e4)=>o?(async(e,t,n,r,o,i,s)=>{return a={auth:{audience:t,scope:n},timeout:o,fetchUrl:e,fetchOptions:r,useFormData:s},l=i,new Promise((function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},l.postMessage(a,[n.port2])}));var a,l})(e,t,n,r,s,o,i):(async(e,t,n)=>{const r=new AbortController;let o;return t.signal=r.signal,Promise.race([Ec(e,t),new Promise(((e,t)=>{o=setTimeout((()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((()=>{clearTimeout(o)}))})(e,r,s);const Oc=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};class Ic{constructor(e,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,o]=e.split("::");return new Ic({clientId:n,scope:o,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new Ic({scope:t,audience:n,clientId:r})}}class Rc{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter((e=>e.startsWith("@@auth0spajs@@")))}}class Ac{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class Mc{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||fc}async setIdToken(e,t,n){var r;const o=this.getIdTokenCacheKey(e);await this.cache.set(o,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(o))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0){var n;let r=await this.cache.get(e.toKey());if(!r){const t=await this.getCacheKeys();if(!t)return;const n=this.matchExistingCacheKey(e,t);n&&(r=await this.cache.get(n))}if(!r)return;const o=await this.nowProvider(),i=Math.floor(o/1e3);return r.expiresAt-t<i?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},await this.cache.set(e.toKey(),r),r.body):(await this.cache.remove(e.toKey()),void await(null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey()))):r.body}async set(e){var t;const n=new Ic({clientId:e.client_id,scope:e.scope,audience:e.audience}),r=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),r),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey()))}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter((t=>!e||t.includes(e))).reduce((async(e,t)=>{await e,await this.cache.remove(t)}),Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new Ic({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter((t=>{var n;const r=Ic.fromKey(t),o=new Set(r.scope&&r.scope.split(" ")),i=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],s=r.scope&&i.reduce(((e,t)=>e&&o.has(t)),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&s}))[0]}}class Pc{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const Dc=e=>"number"==typeof e,Fc=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var Lc=cc((function(e,t){var n=ac&&ac.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),s=i.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{t[i[0].replace(r,decodeURIComponent)]=s.replace(r,decodeURIComponent)}catch(e){}}return t}function s(){return i(document.cookie)}function a(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=s,t.get=function(e){return s()[e]},t.set=a,t.remove=function(e,t){a(e,"",n(n({},t),{expires:-1}))}}));lc(Lc),Lc.encode,Lc.parse,Lc.getAll;var Bc=Lc.get,Uc=Lc.set,Gc=Lc.remove;const $c={get(e){const t=Bc(e);if(void 0!==t)return JSON.parse(t)},save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Uc(e,JSON.stringify(t),r)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Gc(e,n)}},qc={get:e=>$c.get(e)||$c.get(`_legacy_${e}`),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Uc(`_legacy_${e}`,JSON.stringify(t),r),$c.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Gc(e,n),$c.remove(e,t),$c.remove(`_legacy_${e}`,t)}},zc={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var Vc,Hc=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,!1,function(e){return Vc=Vc||function(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,s=o.substring(i)+(r?"//# sourceMappingURL="+r:""),a=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(a)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,false),new Worker(Vc,e)});const Wc={};class Yc{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return`@@auth0spajs@@::${e}`}}const Qc={memory:()=>(new Ac).enclosedCache,localstorage:()=>new Rc},Jc=e=>Qc[e],Kc=e=>{const{openUrl:t,onRedirect:n}=e,r=sc(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},Xc=new dc;class Zc{constructor(e){let t,n;if(this.userCache=(new Ac).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Xc.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!Cc())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===Cc().subtle)throw new Error("\n      auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n    ")})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!Jc(t))throw new Error(`Invalid cache location "${t}"`);n=Jc(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?$c:qc,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(e=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:zc;var o;this.scope=Oc("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Pc(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||fc,this.cacheManager=new Mc(n,n.allKeys?void 0:new Yc(n,this.options.clientId),this.nowProvider),this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:`https://${o}`),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:`https://${e}/`:`${t}/`)(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Hc)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||pc)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${kc(e)}`)}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,o]=t;if(3!==t.length||!n||!r||!o)throw new Error("ID token could not be decoded");const i=JSON.parse(Nc(r)),s={__raw:e},a={};return Object.keys(i).forEach((e=>{s[e]=i[e],Fc.includes(e)||(a[e]=i[e])})),{encoded:{header:n,payload:r,signature:o},header:JSON.parse(Nc(n)),claims:s,user:a}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Dc(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!Dc(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Dc(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(t.claims.exp+n),r>o)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${o})`);if(null!=t.claims.nbf&&Dc(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),r<e)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${r}) is before ${e}`)}if(null!=t.claims.auth_time&&Dc(t.claims.auth_time)){const o=new Date(0);if(o.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),r>o)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${o}`)}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_id}"`)}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_name}"`)}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r});var o}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){const r=_c(jc()),o=_c(jc()),i=jc(),s=(e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(e=>t[e]))})(window.btoa(String.fromCharCode(...Array.from(t))))})(await(async e=>{const t=Cc().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t})(i)),a=((e,t,n,r,o,i,s,a)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),n),{scope:Oc(t,n.scope),response_type:"code",response_mode:a||"query",state:r,nonce:o,redirect_uri:s||e.authorizationParams.redirect_uri,code_challenge:i,code_challenge_method:"S256"}))(this.options,this.scope,e,r,o,s,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,null==t?void 0:t.response_mode),l=this._authorizeUrl(a);return{nonce:o,code_verifier:i,scope:a.scope,audience:a.audience||"default",redirect_uri:a.redirect_uri,state:r,url:l}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(e=>{const t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${t},top=${n},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const o=await(e=>new Promise(((t,n)=>{let r;const o=setInterval((()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new bc(e.popup)))}),1e3),i=setTimeout((()=>{clearInterval(o),n(new yc(e.popup)),window.removeEventListener("message",r,!1)}),1e3*(e.timeoutInSeconds||60));r=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),s.data.response.error)return n(mc.fromPayload(s.data.response));t(s.data.response)}},window.addEventListener("message",r)})))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==o.state)throw new mc("state_mismatch","Invalid state");const i=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:i})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(e={}){var t;const n=Kc(e),{openUrl:r,fragment:o,appState:i}=n,s=sc(n,["openUrl","fragment","appState"]),a=(null===(t=s.authorizationParams)||void 0===t?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:c}=l,u=sc(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:i}),a&&{organization:a}));const d=o?`${c}#${o}`:c;r?await r(d):window.location.assign(d)}async handleRedirectCallback(e=window.location.href){const t=e.split("?").slice(1);if(0===t.length)throw new Error("There are no query params available for parsing.");const{state:n,code:r,error:o,error_description:i}=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(t.join("")),s=this.transactionManager.get();if(!s)throw new mc("missing_transaction","Invalid state");if(this.transactionManager.remove(),o)throw new gc(o,i||o,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new mc("state_mismatch","Invalid state");const a=s.organization,l=s.nonce,c=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:r},c?{redirect_uri:c}:{}),{nonceIn:l,organization:a}),{appState:s.appState}}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(e={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Oc(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope)})}),r=await((e,t)=>{let n=Wc[t];return n||(n=e().finally((()=>{delete Wc[t],n=null})),Wc[t]=n),n})((()=>this._getTokenSilently(n)),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return e.detailedResponse?r:null==r?void 0:r.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=sc(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}if("cache-only"!==t){if(!await(async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1})((()=>Xc.acquireLock("auth0.lock.getTokenSilently",5e3)),10))throw new vc;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,access_token:o,oauthTokenScope:i,expires_in:s}=e;return Object.assign(Object.assign({id_token:r,access_token:o},i?{scope:i}:null),{expires_in:s})}finally{await Xc.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(e={},t={}){var n;const r=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Oc(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope)})});return t=Object.assign(Object.assign({},hc),t),await this.loginWithPopup(r,t),(await this.cacheManager.get(new Ic({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=sc(t,["federated"]),o=n?"&federated":"";return this._url(`/v2/logout?${kc(Object.assign({clientId:e.clientId},r))}`)+o}async logout(e={}){const t=Kc(e),{openUrl:n}=t,r=sc(t,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const o=this._buildLogoutUrl(r);n?await n(o):!1!==n&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:o,nonce:i,code_verifier:s,redirect_uri:a,scope:l,audience:c}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new mc("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,u=await((e,t,n=60)=>new Promise(((r,o)=>{const i=window.document.createElement("iframe");i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.display="none";const s=()=>{window.document.body.contains(i)&&(window.document.body.removeChild(i),window.removeEventListener("message",a,!1))};let a;const l=setTimeout((()=>{o(new vc),s()}),1e3*n);a=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?o(mc.fromPayload(e.data.response)):r(e.data.response),clearTimeout(l),window.removeEventListener("message",a,!1),setTimeout(s,2e3)},window.addEventListener("message",a,!1),window.document.body.appendChild(i),i.setAttribute("src",e)})))(r,this.domainUrl,n);if(o!==u.state)throw new mc("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:u.code,grant_type:"authorization_code",redirect_uri:a,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:i,organization:t.organization});return Object.assign(Object.assign({},d),{scope:l,oauthTokenScope:d.scope,audience:c})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Ic({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new wc(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null;try{const o=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}));return Object.assign(Object.assign({},o),{scope:e.authorizationParams.scope,oauthTokenScope:o.scope,audience:e.authorizationParams.audience||"default"})}catch(t){if((t.message.indexOf("Missing Refresh Token")>-1||t.message&&t.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=sc(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new Ic({clientId:this.options.clientId,audience:e,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:e,audience:t,clientId:n}){const r=await this.cacheManager.get(new Ic({scope:e,audience:t,clientId:n}),60);if(r&&r.access_token){const{access_token:e,oauthTokenScope:t,expires_in:n}=r,o=await this._getIdTokenFromCache();return o&&Object.assign(Object.assign({id_token:o.id_token,access_token:e},t?{scope:t}:null),{expires_in:n})}}async _requestToken(e,t){const{nonceIn:n,organization:r}=t||{},o=await async function(t,n){var{baseUrl:r,timeout:o,audience:i,scope:s,auth0Client:a,useFormData:l}=t,c=sc(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=l?kc(c):JSON.stringify(c);return await async function(t,n,r,o,i,s,a){let l,c=null;for(let m=0;m<3;m++)try{l=await Tc(t,r,o,i,s,a,n),c=null;break}catch(e){c=e}if(c)throw c;const u=l.json,{error:d,error_description:h}=u,p=sc(u,["error","error_description"]),{ok:f}=l;if(!f){const e=h||`HTTP error. Unable to fetch ${t}`;if("mfa_required"===d)throw new xc(d,e,p.mfa_token);if("missing_refresh_token"===d)throw new wc(r,o);throw new mc(d||"request_error",e)}return p}(`${r}/oauth/token`,o,i||"default",s,{method:"POST",body:u,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||pc))}},n,l)}(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},e),this.worker),i=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:i,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||i.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:i})}}const eu=()=>window.history.replaceState({},document.title,window.location.pathname),tu=o.createContext(),nu=()=>(0,o.useContext)(tu),ru="true"==={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"}.REACT_APP_STANDALONE?({children:e})=>{const[t,n]=(0,o.useState)(!0),[r,i]=(0,o.useState)(),[s,a]=(0,o.useState)(!0);(0,o.useEffect)((e=>{e&&i({given_name:"Peter",family_name:"Parker",nickname:"Spidey",name:"Peter Parker",picture:"",locale:"en",updated_at:"2019-07-04T06:41:25.325Z",email:"foo@example.com",email_verified:!0,sub:"auth0|1111111"}),a(!1)}),[]);return(0,pr.jsx)(tu.Provider,{value:{isAuthenticated:t,user:r,loading:s,loginWithRedirect:()=>n(!0),getTokenSilently:()=>new Promise((e=>{e("random_token")})),logout:({returnTo:e})=>{i(null),n(!1),a(!1),window.location.href=e}},children:e})}:({children:e,onRedirectCallback:t=eu,audience:n,leeway:r,clientId:i,domain:s})=>{const[a,l]=(0,o.useState)(),[c,u]=(0,o.useState)(),[d,h]=(0,o.useState)(),[p,f]=(0,o.useState)(!0),[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(!1);(0,o.useEffect)((()=>{(async()=>{const e=await async function(e){const t=new Zc(e);return await t.checkSession(),t}({clientId:i,domain:s,leeway:r,authorizationParams:{audience:n}});if(h(e),window.location.search.includes("error=")&&y({message:"auth0_error"}),window.location.search.includes("code=")&&!window.location.search.includes("handle=false"))try{const{appState:n}=await e.handleRedirectCallback();t(n)}catch(BK){y(BK)}const o=await e.isAuthenticated();if(l(o),o){const t=await e.getUser();u(t)}f(!1)})()}),[]);return(0,pr.jsx)(tu.Provider,{value:{isAuthenticated:a,user:c,loading:p,popupOpen:m,loginWithPopup:async(e={})=>{g(!0);try{await d.loginWithPopup(e)}catch(n){console.error(n)}finally{g(!1)}const t=await d.getUser();u(t),l(!0)},handleRedirectCallback:async()=>{f(!0),await d.handleRedirectCallback();const e=await d.getUser();f(!1),l(!0),u(e)},authenticationError:v,setAuthenticationError:y,getIdTokenClaims:(...e)=>d.getIdTokenClaims(...e),loginWithRedirect:(...e)=>d.loginWithRedirect(...e),getTokenSilently:(...e)=>d.getTokenSilently(...e),getTokenWithPopup:(...e)=>d.getTokenWithPopup(...e),logout:(...e)=>d.logout(...e)},children:e})},ou=(e,t)=>{let n=e;if("object"===typeof n){const e=t.split(".");for(let t=0;t<e.length;t++){if(void 0===n||null===n)return;n=n[e[t]]}}return n},iu=(e,t)=>JSON.stringify(e)===JSON.stringify(t),su=e=>void 0!==e&&null!==e;function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},au.apply(this,arguments)}function lu(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function cu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uu(e,t){return uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uu(e,t)}function du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,uu(e,t)}var hu=n(5173),pu=n.n(hu);function fu(e){return fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fu(e)}function mu(e){var t=function(e,t){if("object"!=fu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fu(t)?t:String(t)}function gu(e,t,n){return(t=mu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vu,yu=n(6947),bu=n.n(yu),xu=bu()(),wu=bu()(),Su=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return gu(cu(cu(t=e.call.apply(e,[this].concat(r))||this)),"referenceNode",void 0),gu(cu(cu(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}du(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return o.createElement(xu.Provider,{value:this.referenceNode},o.createElement(wu.Provider,{value:this.setReferenceNode},this.props.children))},t}(o.Component),Cu=n(8139),ju=n.n(Cu),_u=o.createContext({});function ku(e){document.body.style.paddingRight=e>0?e+"px":null}function Nu(){var e=function(){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}(),t=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=t?parseInt(t.style.paddingRight||0,10):0;document.body.clientWidth<window.innerWidth&&ku(n+e)}function Eu(e,t){return void 0===e&&(e=""),void 0===t&&(t=vu),t?e.split(" ").map((function(e){return t[e]||e})).join(" "):e}function Tu(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}var Ou={};function Iu(e){Ou[e]||("undefined"!==typeof console&&console.error(e),Ou[e]=!0)}var Ru="object"===typeof window&&window.Element||function(){};function Au(e,t,n){if(!(e[t]instanceof Ru))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var Mu=pu().oneOfType([pu().string,pu().func,Au,pu().shape({current:pu().any})]),Pu=pu().oneOfType([pu().func,pu().string,pu().shape({$$typeof:pu().symbol,render:pu().func}),pu().arrayOf(pu().oneOfType([pu().func,pu().string,pu().shape({$$typeof:pu().symbol,render:pu().func})]))]),Du=150,Fu=300,Lu=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Bu={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},Uu=!("undefined"===typeof window||!window.document||!window.document.createElement);function Gu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function $u(e){var t=typeof e;return null!=e&&("object"===t||"function"===t)}function qu(e){if(function(e){return!(!e||"object"!==typeof e)&&"current"in e}(e))return e.current;if(function(e){if(!$u(e))return!1;var t=Gu(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object Proxy]"===t}(e))return e();if("string"===typeof e&&Uu){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#"+e)),!t.length)throw new Error("The target '"+e+"' could not be identified in the dom, tip: check spelling");return t}return e}function zu(e){return null!==e&&(Array.isArray(e)||Uu&&"number"===typeof e.length)}function Vu(e,t){var n=qu(e);return t?zu(n)?n:null===n?[]:[n]:zu(n)?n[0]:n}var Hu=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],Wu=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","addonType","tag","menuRole"],Yu={a11y:pu().bool,disabled:pu().bool,direction:pu().oneOf(["up","down","left","right"]),group:pu().bool,isOpen:pu().bool,nav:pu().bool,active:pu().bool,addonType:pu().oneOfType([pu().bool,pu().oneOf(["prepend","append"])]),size:pu().string,tag:Pu,toggle:pu().func,children:pu().node,className:pu().string,cssModule:pu().object,inNavbar:pu().bool,setActiveFromChild:pu().bool,menuRole:pu().oneOf(["listbox","menu"])},Qu=[Bu.space,Bu.enter,Bu.up,Bu.down,Bu.end,Bu.home],Ju=function(e){function t(t){var n;return(n=e.call(this,t)||this).addEvents=n.addEvents.bind(cu(n)),n.handleDocumentClick=n.handleDocumentClick.bind(cu(n)),n.handleKeyDown=n.handleKeyDown.bind(cu(n)),n.removeEvents=n.removeEvents.bind(cu(n)),n.toggle=n.toggle.bind(cu(n)),n.handleMenuRef=n.handleMenuRef.bind(cu(n)),n.containerRef=o.createRef(),n.menuRef=o.createRef(),n}du(t,e);var n=t.prototype;return n.handleMenuRef=function(e){this.menuRef.current=e},n.getContextValue=function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:"down"===this.props.direction&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled,onMenuRef:this.handleMenuRef,menuRole:this.props.menuRole}},n.componentDidMount=function(){this.handleProps()},n.componentDidUpdate=function(e){this.props.isOpen!==e.isOpen&&this.handleProps()},n.componentWillUnmount=function(){this.removeEvents()},n.getContainer=function(){return this.containerRef.current},n.getMenu=function(){return this.menuRef.current},n.getMenuCtrl=function(){return this._$menuCtrl||(this._$menuCtrl=this.getContainer().querySelector("[aria-expanded]")),this._$menuCtrl},n.getItemType=function(){return"listbox"===this.context.menuRole?"option":"menuitem"},n.getMenuItems=function(){var e=this.getMenu()||this.getContainer();return[].slice.call(e.querySelectorAll('[role="'+this.getItemType()+'"]'))},n.addEvents=function(){var e=this;["click","touchstart","keyup"].forEach((function(t){return document.addEventListener(t,e.handleDocumentClick,!0)}))},n.removeEvents=function(){var e=this;["click","touchstart","keyup"].forEach((function(t){return document.removeEventListener(t,e.handleDocumentClick,!0)}))},n.handleDocumentClick=function(e){if(!e||3!==e.which&&("keyup"!==e.type||e.which===Bu.tab)){var t=this.getContainer(),n=this.getMenu(),r=t.contains(e.target)&&t!==e.target,o=n&&n.contains(e.target)&&n!==e.target;(!r&&!o||"keyup"===e.type&&e.which!==Bu.tab)&&this.toggle(e)}},n.handleKeyDown=function(e){var t=this,n="menuitem"===e.target.getAttribute("role")||"option"===e.target.getAttribute("role"),r=this.getMenuCtrl()===e.target,o=Bu.tab===e.which;if(!(/input|textarea/i.test(e.target.tagName)||o&&!this.props.a11y||o&&!n&&!r)&&((-1!==Qu.indexOf(e.which)||e.which>=48&&e.which<=90)&&e.preventDefault(),!this.props.disabled&&(r&&([Bu.space,Bu.enter,Bu.up,Bu.down].indexOf(e.which)>-1?(this.props.isOpen||this.toggle(e),setTimeout((function(){return t.getMenuItems()[0].focus()}))):this.props.isOpen&&o?(e.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&e.which===Bu.esc&&this.toggle(e)),this.props.isOpen&&n)))if([Bu.tab,Bu.esc].indexOf(e.which)>-1)this.toggle(e),this.getMenuCtrl().focus();else if([Bu.space,Bu.enter].indexOf(e.which)>-1)e.target.click(),this.getMenuCtrl().focus();else if([Bu.down,Bu.up].indexOf(e.which)>-1||[Bu.n,Bu.p].indexOf(e.which)>-1&&e.ctrlKey){var i=this.getMenuItems(),s=i.indexOf(e.target);Bu.up===e.which||Bu.p===e.which&&e.ctrlKey?s=0!==s?s-1:i.length-1:(Bu.down===e.which||Bu.n===e.which&&e.ctrlKey)&&(s=s===i.length-1?0:s+1),i[s].focus()}else if(Bu.end===e.which){var a=this.getMenuItems();a[a.length-1].focus()}else if(Bu.home===e.which){this.getMenuItems()[0].focus()}else if(e.which>=48&&e.which<=90)for(var l=this.getMenuItems(),c=String.fromCharCode(e.which).toLowerCase(),u=0;u<l.length;u+=1){if((l[u].textContent&&l[u].textContent[0].toLowerCase())===c){l[u].focus();break}}},n.handleProps=function(){this.props.isOpen?this.addEvents():this.removeEvents()},n.toggle=function(e){return this.props.disabled?e&&e.preventDefault():this.props.toggle(e)},n.render=function(){var e,t,n=Tu(this.props,["toggle","disabled","inNavbar","a11y"]),r=n.className,i=n.cssModule,s=n.direction,a=n.isOpen,l=n.group,c=n.size,u=n.nav,d=n.setActiveFromChild,h=n.active,p=n.addonType,f=n.tag,m=(n.menuRole,lu(n,Wu)),g=f||(u?"li":"div"),v=!1;d&&o.Children.map(this.props.children[1].props.children,(function(e){e&&e.props.active&&(v=!0)}));var y=Eu(ju()(r,"down"!==s&&"drop"+s,!(!u||!h)&&"active",!(!d||!v)&&"active",((e={})["input-group-"+p]=p,e["btn-group"]=l,e["btn-group-"+c]=!!c,e.dropdown=!l&&!p,e.show=a,e["nav-item"]=u,e)),i);return o.createElement(_u.Provider,{value:this.getContextValue()},o.createElement(Su,null,o.createElement(g,au({},m,((t={})["string"===typeof g?"ref":"innerRef"]=this.containerRef,t),{onKeyDown:this.handleKeyDown,className:y}))))},t}(o.Component);Ju.propTypes=Yu,Ju.defaultProps={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,addonType:!1,inNavbar:!1,setActiveFromChild:!1};const Ku=Ju;var Xu=n(6440),Zu=n.n(Xu),ed=function(e){return Array.isArray(e)?e[0]:e},td=function(e){if("function"===typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},nd=function(e,t){if("function"===typeof e)return td(e,t);null!=e&&(e.current=t)},rd=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return gu(cu(cu(t=e.call.apply(e,[this].concat(r))||this)),"refHandler",(function(e){nd(t.props.innerRef,e),td(t.props.setReferenceNode,e)})),t}du(t,e);var n=t.prototype;return n.componentWillUnmount=function(){nd(this.props.innerRef,null)},n.render=function(){return Zu()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),ed(this.props.children)({ref:this.refHandler})},t}(o.Component);function od(e){return o.createElement(wu.Consumer,null,(function(t){return o.createElement(rd,au({setReferenceNode:t},e))}))}var id=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],sd={active:pu().bool,"aria-label":pu().string,block:pu().bool,color:pu().string,disabled:pu().bool,outline:pu().bool,tag:Pu,innerRef:pu().oneOfType([pu().object,pu().func,pu().string]),onClick:pu().func,size:pu().string,children:pu().node,className:pu().string,cssModule:pu().object,close:pu().bool},ad=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.onClick=function(e){if(!this.props.disabled)return this.props.onClick?this.props.onClick(e):void 0;e.preventDefault()},n.render=function(){var e=this.props,t=e.active,n=e["aria-label"],r=e.block,i=e.className,s=e.close,a=e.cssModule,l=e.color,c=e.outline,u=e.size,d=e.tag,h=e.innerRef,p=lu(e,id);s&&"undefined"===typeof p.children&&(p.children=o.createElement("span",{"aria-hidden":!0},"\xd7"));var f="btn"+(c?"-outline":"")+"-"+l,m=Eu(ju()(i,{close:s},s||"btn",s||f,!!u&&"btn-"+u,!!r&&"btn-block",{active:t,disabled:this.props.disabled}),a);p.href&&"button"===d&&(d="a");var g=s?"Close":null;return o.createElement(d,au({type:"button"===d&&p.onClick?"button":void 0},p,{className:m,ref:h,onClick:this.onClick,"aria-label":n||g}))},t}(o.Component);ad.propTypes=sd,ad.defaultProps={color:"secondary",tag:"button"};const ld=ad;var cd=["className","color","cssModule","caret","split","nav","tag","innerRef"],ud={caret:pu().bool,color:pu().string,children:pu().node,className:pu().string,cssModule:pu().object,disabled:pu().bool,onClick:pu().func,"aria-haspopup":pu().bool,split:pu().bool,tag:Pu,nav:pu().bool},dd=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.onClick=function(e){this.props.disabled||this.context.disabled?e.preventDefault():(this.props.nav&&!this.props.tag&&e.preventDefault(),this.props.onClick&&this.props.onClick(e),this.context.toggle(e))},n.getRole=function(){return this.context.menuRole||this.props["aria-haspopup"]},n.render=function(){var e,t=this,n=this.props,r=n.className,i=n.color,s=n.cssModule,a=n.caret,l=n.split,c=n.nav,u=n.tag,d=n.innerRef,h=lu(n,cd),p=h["aria-label"]||"Toggle Dropdown",f=Eu(ju()(r,{"dropdown-toggle":a||l,"dropdown-toggle-split":l,"nav-link":c}),s),m="undefined"!==typeof h.children?h.children:o.createElement("span",{className:"sr-only"},p);return c&&!u?(e="a",h.href="#"):u?e=u:(e=ld,h.color=i,h.cssModule=s),this.context.inNavbar?o.createElement(e,au({},h,{className:f,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):o.createElement(od,{innerRef:d},(function(n){var r,i=n.ref;return o.createElement(e,au({},h,((r={})["string"===typeof e?"ref":"innerRef"]=i,r),{className:f,onClick:t.onClick,"aria-expanded":t.context.isOpen,"aria-haspopup":t.getRole(),children:m}))}))},t}(o.Component);dd.propTypes=ud,dd.defaultProps={color:"secondary","aria-haspopup":!0},dd.contextType=_u;const hd=dd;var pd=n(8287),fd=n.n(pd),md="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,gd=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(md&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var vd=md&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),gd))}};function yd(e){return e&&"[object Function]"==={}.toString.call(e)}function bd(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function xd(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function wd(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=bd(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:wd(xd(e))}function Sd(e){return e&&e.referenceNode?e.referenceNode:e}var Cd=md&&!(!window.MSInputMethodContext||!document.documentMode),jd=md&&/MSIE 10/.test(navigator.userAgent);function _d(e){return 11===e?Cd:10===e?jd:Cd||jd}function kd(e){if(!e)return document.documentElement;for(var t=_d(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===bd(n,"position")?kd(n):n:e?e.ownerDocument.documentElement:document.documentElement}function Nd(e){return null!==e.parentNode?Nd(e.parentNode):e}function Ed(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var s=i.commonAncestorContainer;if(e!==s&&t!==s||r.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||kd(e.firstElementChild)===e)}(s)?s:kd(s);var a=Nd(e);return a.host?Ed(a.host,t):Ed(e,Nd(t).host)}function Td(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function Od(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function Id(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],_d(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Rd(e){var t=e.body,n=e.documentElement,r=_d(10)&&getComputedStyle(n);return{height:Id("Height",t,n,r),width:Id("Width",t,n,r)}}var Ad=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Md=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Pd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function Dd(e){return Pd({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Fd(e){var t={};try{if(_d(10)){t=e.getBoundingClientRect();var n=Td(e,"top"),r=Td(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(BK){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?Rd(e.ownerDocument):{},s=i.width||e.clientWidth||o.width,a=i.height||e.clientHeight||o.height,l=e.offsetWidth-s,c=e.offsetHeight-a;if(l||c){var u=bd(e);l-=Od(u,"x"),c-=Od(u,"y"),o.width-=l,o.height-=c}return Dd(o)}function Ld(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=_d(10),o="HTML"===t.nodeName,i=Fd(e),s=Fd(t),a=wd(e),l=bd(t),c=parseFloat(l.borderTopWidth),u=parseFloat(l.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var d=Dd({top:i.top-s.top-c,left:i.left-s.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!r&&o){var h=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);d.top-=c-h,d.bottom-=c-h,d.left-=u-p,d.right-=u-p,d.marginTop=h,d.marginLeft=p}return(r&&!n?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Td(t,"top"),o=Td(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}(d,t)),d}function Bd(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===bd(e,"position"))return!0;var n=xd(e);return!!n&&Bd(n)}function Ud(e){if(!e||!e.parentElement||_d())return document.documentElement;for(var t=e.parentElement;t&&"none"===bd(t,"transform");)t=t.parentElement;return t||document.documentElement}function Gd(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},s=o?Ud(e):Ed(e,Sd(t));if("viewport"===r)i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=Ld(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:Td(n),a=t?0:Td(n,"left");return Dd({top:s-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:o,height:i})}(s,o);else{var a=void 0;"scrollParent"===r?"BODY"===(a=wd(xd(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===r?e.ownerDocument.documentElement:r;var l=Ld(a,s,o);if("HTML"!==a.nodeName||Bd(s))i=l;else{var c=Rd(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var h="number"===typeof(n=n||0);return i.left+=h?n:n.left||0,i.top+=h?n:n.top||0,i.right-=h?n:n.right||0,i.bottom-=h?n:n.bottom||0,i}function $d(e){return e.width*e.height}function qd(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=Gd(n,r,i,o),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},l=Object.keys(a).map((function(e){return Pd({key:e},a[e],{area:$d(a[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function zd(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Ld(n,r?Ud(t):Ed(t,Sd(n)),r)}function Vd(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Hd(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function Wd(e,t,n){n=n.split("-")[0];var r=Vd(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),s=i?"top":"left",a=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return o[s]=t[s]+t[l]/2-r[l]/2,o[a]=n===a?t[a]-r[c]:t[Hd(a)],o}function Yd(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Qd(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=Yd(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&yd(n)&&(t.offsets.popper=Dd(t.offsets.popper),t.offsets.reference=Dd(t.offsets.reference),t=n(t,e))})),t}function Jd(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=zd(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=qd(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Wd(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Qd(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Kd(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function Xd(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if("undefined"!==typeof document.body.style[i])return i}return null}function Zd(){return this.state.isDestroyed=!0,Kd(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Xd("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function eh(e){var t=e.ownerDocument;return t?t.defaultView:window}function th(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||th(wd(i.parentNode),t,n,r),r.push(i)}function nh(e,t,n,r){n.updateBound=r,eh(e).addEventListener("resize",n.updateBound,{passive:!0});var o=wd(e);return th(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function rh(){this.state.eventsEnabled||(this.state=nh(this.reference,this.options,this.state,this.scheduleUpdate))}function oh(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,eh(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function ih(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function sh(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&ih(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var ah=md&&/Firefox/i.test(navigator.userAgent);function lh(e,t,n){var r=Yd(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var ch=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],uh=ch.slice(3);function dh(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=uh.indexOf(e),r=uh.slice(n+1).concat(uh.slice(0,n));return t?r.reverse():r}var hh="flip",ph="clockwise",fh="counterclockwise";function mh(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),s=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=s.indexOf(Yd(s,(function(e){return-1!==e.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return c=c.map((function(e,r){var o=(1===r?!i:i)?"height":"width",s=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],s=o[2];if(!i)return e;if(0===s.indexOf("%")){return Dd("%p"===s?n:r)[t]/100*i}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))})),c.forEach((function(e,t){e.forEach((function(n,r){ih(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var gh={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:Md({},l,i[l]),end:Md({},l,i[l]+i[c]-s[c])};e.offsets.popper=Pd({},s,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,s=o.reference,a=r.split("-")[0],l=void 0;return l=ih(+n)?[+n,0]:mh(n,i,s,a),"left"===a?(i.top+=l[0],i.left-=l[1]):"right"===a?(i.top+=l[0],i.left+=l[1]):"top"===a?(i.left+=l[0],i.top-=l[1]):"bottom"===a&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||kd(e.instance.popper);e.instance.reference===n&&(n=kd(n));var r=Xd("transform"),o=e.instance.popper.style,i=o.top,s=o.left,a=o[r];o.top="",o.left="",o[r]="";var l=Gd(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=s,o[r]=a,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),Md({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),Md({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=Pd({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<i(r[l])&&(e.offsets.popper[l]=i(r[l])-n[c]),n[l]>i(r[a])&&(e.offsets.popper[l]=i(r[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!lh(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,a=i.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",f=Vd(r)[c];a[p]-f<s[d]&&(e.offsets.popper[d]-=s[d]-(a[p]-f)),a[d]+f>s[p]&&(e.offsets.popper[d]+=a[d]+f-s[p]),e.offsets.popper=Dd(e.offsets.popper);var m=a[d]+a[c]/2-f/2,g=bd(e.instance.popper),v=parseFloat(g["margin"+u]),y=parseFloat(g["border"+u+"Width"]),b=m-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(s[c]-f,b),0),e.arrowElement=r,e.offsets.arrow=(Md(n={},d,Math.round(b)),Md(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Kd(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Gd(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=Hd(r),i=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case hh:s=[r,o];break;case ph:s=dh(r);break;case fh:s=dh(r,!0);break;default:s=t.behavior}return s.forEach((function(a,l){if(r!==a||s.length===l+1)return e;r=e.placement.split("-")[0],o=Hd(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,h="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),p=d(c.left)<d(n.left),f=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&p||"right"===r&&f||"top"===r&&m||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===i&&p||y&&"end"===i&&f||!y&&"start"===i&&m||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&p||!y&&"start"===i&&g||!y&&"end"===i&&m),w=b||x;(h||v||w)&&(e.flipped=!0,(h||v)&&(r=s[l+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=Pd({},e.offsets.popper,Wd(e.instance.popper,e.offsets.reference,e.placement)),e=Qd(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=i[n]-(a?o[s?"width":"height"]:0),e.placement=Hd(t),e.offsets.popper=Dd(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!lh(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Yd(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=Yd(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==i?i:t.gpuAcceleration,a=kd(e.instance.popper),l=Fd(a),c={position:o.position},u=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,s=Math.floor,a=function(e){return e},l=i(o.width),c=i(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),h=t?u||d||l%2===c%2?i:s:a,p=t?i:a;return{left:h(l%2===1&&c%2===1&&!d&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:h(r.right)}}(e,window.devicePixelRatio<2||!ah),d="bottom"===n?"top":"bottom",h="right"===r?"left":"right",p=Xd("transform"),f=void 0,m=void 0;if(m="bottom"===d?"HTML"===a.nodeName?-a.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===h?"HTML"===a.nodeName?-a.clientWidth+u.right:-l.width+u.right:u.left,s&&p)c[p]="translate3d("+f+"px, "+m+"px, 0)",c[d]=0,c[h]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===h?-1:1;c[d]=m*g,c[h]=f*v,c.willChange=d+", "+h}var y={"x-placement":e.placement};return e.attributes=Pd({},y,e.attributes),e.styles=Pd({},c,e.styles),e.arrowStyles=Pd({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return sh(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&sh(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=zd(o,t,e,n.positionFixed),s=qd(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),sh(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},vh={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:gh},yh=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=vd(this.update.bind(this)),this.options=Pd({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Pd({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=Pd({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Pd({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&yd(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Ad(e,[{key:"update",value:function(){return Jd.call(this)}},{key:"destroy",value:function(){return Zd.call(this)}},{key:"enableEventListeners",value:function(){return rh.call(this)}},{key:"disableEventListeners",value:function(){return oh.call(this)}}]),e}();yh.Utils=("undefined"!==typeof window?window:n.g).PopperUtils,yh.placements=ch,yh.Defaults=vh;const bh=yh;var xh={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},wh={},Sh=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return gu(cu(cu(t=e.call.apply(e,[this].concat(r))||this)),"state",{data:void 0,placement:void 0}),gu(cu(cu(t)),"popperInstance",void 0),gu(cu(cu(t)),"popperNode",null),gu(cu(cu(t)),"arrowNode",null),gu(cu(cu(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(nd(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),gu(cu(cu(t)),"setArrowNode",(function(e){t.arrowNode=e})),gu(cu(cu(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),gu(cu(cu(t)),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:au({},t.props.modifiers,{arrow:au({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),gu(cu(cu(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?au({position:t.state.data.offsets.popper.position},t.state.data.styles):xh})),gu(cu(cu(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),gu(cu(cu(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:wh})),gu(cu(cu(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),gu(cu(cu(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),gu(cu(cu(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=cu(cu(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new bh(n,e,t.getOptions()))})),gu(cu(cu(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}du(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&fd()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){nd(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return ed(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(o.Component);gu(Sh,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});bh.placements;function Ch(e){var t=e.referenceElement,n=lu(e,["referenceElement"]);return o.createElement(xu.Consumer,null,(function(e){return o.createElement(Sh,au({referenceElement:void 0!==t?t:e},n))}))}var jh=["className","cssModule","right","tag","flip","modifiers","persist","positionFixed","container"];function _h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_h(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nh={tag:Pu,children:pu().node.isRequired,right:pu().bool,flip:pu().bool,modifiers:pu().object,className:pu().string,cssModule:pu().object,persist:pu().bool,positionFixed:pu().bool,container:Mu},Eh={flip:{enabled:!1}},Th={up:"top",left:"left",right:"right",down:"bottom"},Oh=function(e){function t(){return e.apply(this,arguments)||this}du(t,e);var n=t.prototype;return n.getRole=function(){return"listbox"===this.context.menuRole?"listbox":"menu"},n.render=function(){var e=this,t=this.props,n=t.className,r=t.cssModule,i=t.right,s=t.tag,a=t.flip,l=t.modifiers,c=t.persist,u=t.positionFixed,d=t.container,h=lu(t,jh),p=Eu(ju()(n,"dropdown-menu",{"dropdown-menu-right":i,show:this.context.isOpen}),r),f=s;if(c||this.context.isOpen&&!this.context.inNavbar){var m=(Th[this.context.direction]||"bottom")+"-"+(i?"end":"start"),g=a?l:kh(kh({},l),Eh),v=!!u,y=o.createElement(Ch,{placement:m,modifiers:g,positionFixed:v},(function(t){var n=t.ref,r=t.style,i=t.placement,s=kh(kh({},e.props.style),r);return o.createElement(f,au({tabIndex:"-1",role:e.getRole(),ref:function(t){n(t);var r=e.context.onMenuRef;r&&r(t)}},h,{style:s,"aria-hidden":!e.context.isOpen,className:p,"x-placement":i}))}));return d?Fl.createPortal(y,Vu(d)):y}return o.createElement(f,au({tabIndex:"-1",role:this.getRole()},h,{"aria-hidden":!this.context.isOpen,className:p,"x-placement":h.placement}))},t}(o.Component);Oh.propTypes=Nh,Oh.defaultProps={tag:"div",flip:!0},Oh.contextType=_u;const Ih=Oh;var Rh=["className","cssModule","divider","tag","header","active","text"],Ah={children:pu().node,active:pu().bool,disabled:pu().bool,divider:pu().bool,tag:Pu,header:pu().bool,onClick:pu().func,className:pu().string,cssModule:pu().object,toggle:pu().bool,text:pu().bool},Mh=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind(cu(n)),n.getTabIndex=n.getTabIndex.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.getRole=function(){return"listbox"===this.context.menuRole?"option":"menuitem"},n.onClick=function(e){var t=this.props,n=t.disabled,r=t.header,o=t.divider,i=t.text;n||r||o||i?e.preventDefault():(this.props.onClick&&this.props.onClick(e),this.props.toggle&&this.context.toggle(e))},n.getTabIndex=function(){var e=this.props,t=e.disabled,n=e.header,r=e.divider,o=e.text;return t||n||r||o?"-1":"0"},n.render=function(){var e=this.getTabIndex(),t=e>-1?this.getRole():void 0,n=Tu(this.props,["toggle"]),r=n.className,i=n.cssModule,s=n.divider,a=n.tag,l=n.header,c=n.active,u=n.text,d=lu(n,Rh),h=Eu(ju()(r,{disabled:d.disabled,"dropdown-item":!s&&!l&&!u,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":u}),i);return"button"===a&&(l?a="h6":s?a="div":d.href?a="a":u&&(a="span")),o.createElement(a,au({type:"button"===a&&(d.onClick||this.props.toggle)?"button":void 0},d,{tabIndex:e,role:t,className:h,onClick:this.onClick}))},t}(o.Component);Mh.propTypes=Ah,Mh.defaultProps={tag:"button",toggle:!0},Mh.contextType=_u;const Ph=Mh,Dh=({onClick:e,text:t,icon:n})=>(0,pr.jsx)("div",{className:"mr-4 d-flex align-items-center",children:(0,pr.jsxs)("div",{className:"cursor-pointer d-print-none",onClick:e,children:[(0,pr.jsx)("i",{className:`fa ${n} mr-2 text-primary font-size-16`}),(0,pr.jsx)("span",{className:"text-primary u-font-weight-medium font-size-16",children:t})]})}),Fh=({type:e,searchPlaceholder:t,onSearchChange:n,searchValue:r,addText:i,adminMode:s,filterComponent:a,onAddClick:l,onImportClick:c,bulkImportText:u,additionalImportActions:d,additionalRemoveActions:h,additionalActions:p})=>{const[f,m]=o.useState(!1),[g,v]=o.useState(!1),[y,b]=o.useState(!1),x=o.useCallback((()=>{m((e=>!e))}),[]),w=o.useCallback((()=>{v((e=>!e))}),[]),S=o.useCallback((()=>{b((e=>!e))}),[]);let C=[],j=[],_=[],k=[];return c&&k.push({onClick:c,text:u,icon:"fa-upload"}),"Students"===e?(d&&(C=k.concat(d)),h&&(j=h),p&&(_=p)):_=k.concat(p),(0,pr.jsxs)("div",{className:"d-flex align-items-center justify-content-between pt-2 pb-2 pr-4 pl-4 w-100 "+(s?"bg-admin":""),children:[(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsx)(Dh,{onClick:l,text:i,icon:"fa-plus"}),0!==C.length&&(0,pr.jsxs)(Ku,{className:"mr-4",isOpen:f,toggle:x,children:[(0,pr.jsx)(hd,{className:"btn-120-width btn btn-primary",caret:!0,children:"Import ..."}),(0,pr.jsx)(Ih,{children:C.map(((e,t)=>(0,pr.jsxs)(Ph,{className:"color-blue-mid px-3",onClick:e.onClick,children:[(0,pr.jsx)("i",{className:`fa ${e.icon} mr-2`}),(0,pr.jsx)("span",{children:e.text})]},t)))})]}),0!==j.length&&(0,pr.jsxs)(Ku,{className:"mr-4",isOpen:g,toggle:w,children:[(0,pr.jsx)(hd,{className:"btn-120-width btn btn-primary",caret:!0,children:"Remove ..."}),(0,pr.jsx)(Ih,{children:j.map(((e,t)=>(0,pr.jsxs)(Ph,{className:"color-blue-mid px-3",onClick:e.onClick,children:[(0,pr.jsx)("i",{className:`fa ${e.icon} mr-2`}),(0,pr.jsx)("span",{children:e.text})]},t)))})]}),0!==_.length&&(0,pr.jsxs)(Ku,{className:"mr-4",isOpen:y,toggle:S,children:[(0,pr.jsx)(hd,{className:"btn-120-width btn btn-primary",caret:!0,children:"More ..."}),(0,pr.jsx)(Ih,{children:_.map(((e,t)=>(0,pr.jsxs)(Ph,{className:"color-blue-mid px-3",onClick:e.onClick,children:[(0,pr.jsx)("i",{className:`fa ${e.icon} mr-2`}),(0,pr.jsx)("span",{children:e.text})]},t)))})]})]}),(0,pr.jsxs)("div",{className:"d-flex",children:[su(a)&&a,n&&(0,pr.jsx)(iN,{placeholder:t,value:r,onChange:n})]})]})},Lh=({onClick:e,text:t,active:n=!0,link:r,className:o=""})=>(0,pr.jsxs)("a",{className:`${n?"c-add-button":"c-add-button__inactive"} d-block ${o}`,href:r,onClick:n?e:null,children:[(0,pr.jsx)("i",{className:`fa fa-plus ${n?"u-blue-mid":"u-grey-mid"} mr-3`}),(0,pr.jsx)("span",{className:(n?"u-blue-mid":"u-grey-mid")+" u-font-weight-medium",children:t})]}),Bh=(e,t,n)=>1===e?`${e} ${t}`:`${e} ${n}`,Uh=e=>[e.firstName,e.lastName].join(" ").trim(),Gh=e=>{const t=Uh(e);return t?t.split(/\s+/,2).map((e=>e[0].toUpperCase())).join(""):e.email[0].toUpperCase()},$h=e=>e.map((e=>e.trim().toLowerCase())).filter((e=>!!e)),qh=e=>Wh(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"2-digit"}),zh=e=>Wh(e).toLocaleDateString(void 0,{year:"2-digit",month:"numeric",day:"numeric"}),Vh=e=>`${Wh(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0})}`,Hh=e=>{const t=Wh(e);return`${qh(e)} ${t.toLocaleTimeString(void 0,{hour:"numeric",minute:"numeric"})}`},Wh=e=>e.endsWith("Z")?new Date(e):new Date(e+"Z");var Yh=n(6178),Qh=n.n(Yh);const Jh=({text:e,colourClass:t})=>{const n=`color-grey-mid-light rounded inline-block ${t}`;return(0,pr.jsx)("p",{className:n,style:{fontSize:"0.7rem",padding:"0px 6px",float:"left",margin:"0"},children:e})},Kh=({lastLogin:e,insertedAt:t,updatedAt:n,emailVerified:r,disabled:o})=>{let i,s="Unknown";if(o)s=`Deactivated ${Xh(n)}`,i="color-admin_deactivated";else if(r){const t=Qh()(),n=Qh().duration(t.diff(Qh()(e))).asMonths();e?n<12?(s=`Last active ${Xh(e)}`,i="color-admin_last_active_first"):n<18?(s=`Last active ${Xh(e)}`,i="color-admin_last_active_second"):(s=`Inactive since ${Xh(e)}`,i="color-admin_last_active_third"):(s="Active",i="color-admin_last_active_first")}else s=`Email not verified: added ${Xh(t)}`,i="color-admin_not_activated";return(0,pr.jsx)(Jh,{text:s,colourClass:i})},Xh=e=>qh(e),Zh=({users:e,onEditAdminClick:t,onAddAdminClick:n,errors:r,allowAdd:o=!0,allowEdit:i=!0,invitations:s=[],onRevokeInvitationClick:a,allowRemove:l=!1,onRemoveAdminClick:c})=>(0,pr.jsxs)("div",{className:"c-admin",children:[(0,pr.jsxs)("ul",{className:"c-admin__list-container",children:[e.map(((e,n)=>{const{email:r,positionTitle:o,disabled:s,lastLogin:a,insertedAt:u,updatedAt:d,emailVerified:h}=e;return(0,pr.jsxs)("li",{className:"c-admin__list-item",children:[(0,pr.jsxs)("div",{className:"c-admin__sub-container",children:[(0,pr.jsx)("div",{className:"c-admin__icon",children:Gh(e)}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:`${Uh(e)}${su(o)?`, ${o}`:""}`}),(0,pr.jsx)("div",{children:r}),(0,pr.jsx)(Kh,{lastLogin:a,insertedAt:u,updatedAt:d,emailVerified:h,disabled:s})]})]}),i&&(0,pr.jsx)("a",{className:"text-primary",onClick:()=>t(e),children:"Edit"}),l&&(0,pr.jsx)("a",{className:"text-primary",onClick:()=>c(e),children:"Remove"})]},n)})),s.map(((e,t)=>(0,pr.jsxs)("li",{className:"c-admin__list-item",children:[(0,pr.jsxs)("div",{className:"c-admin__sub-container",children:[(0,pr.jsx)("div",{className:"c-admin__icon",children:Gh(e)}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"color-grey-mid",children:"Details not yet provided"}),(0,pr.jsx)("div",{children:e.email}),(0,pr.jsx)(Jh,{text:`Invitation sent on: ${Xh(e.updatedAt)}`,colourClass:"color-admin_last_active_third"})]})]}),(0,pr.jsx)("a",{className:"text-primary",onClick:()=>a(e),children:"Remove"})]},t)))]}),(0,pr.jsx)($k,{text:ou(r,"activate")}),(0,pr.jsx)(Lh,{active:o,text:"Add new administrator",onClick:n})]}),ep=Math.min,tp=Math.max,np=Math.round,rp=Math.floor,op=e=>({x:e,y:e}),ip={left:"right",right:"left",bottom:"top",top:"bottom"},sp={start:"end",end:"start"};function ap(e,t,n){return tp(e,ep(t,n))}function lp(e,t){return"function"===typeof e?e(t):e}function cp(e){return e.split("-")[0]}function up(e){return e.split("-")[1]}function dp(e){return"x"===e?"y":"x"}function hp(e){return"y"===e?"height":"width"}function pp(e){return["top","bottom"].includes(cp(e))?"y":"x"}function fp(e){return dp(pp(e))}function mp(e){return e.replace(/start|end/g,(e=>sp[e]))}function gp(e){return e.replace(/left|right|bottom|top/g,(e=>ip[e]))}function vp(e){return"number"!==typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function yp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function bp(e,t,n){let{reference:r,floating:o}=e;const i=pp(t),s=fp(t),a=hp(s),l=cp(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(up(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function xp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=lp(t,e),f=vp(p),m=a[h?"floating"===d?"reference":"floating":d],g=yp(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{...s.floating,x:r,y:o}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=yp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+f.top)/b.y,bottom:(x.bottom-g.bottom+f.bottom)/b.y,left:(g.left-x.left+f.left)/b.x,right:(x.right-g.right+f.right)/b.x}}const wp=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=cp(n),a=up(n),l="y"===pp(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=lp(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"===typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"===typeof f&&(p="end"===a?-1*f:f),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}};function Sp(e){return _p(e)?(e.nodeName||"").toLowerCase():"#document"}function Cp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function jp(e){var t;return null==(t=(_p(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function _p(e){return e instanceof Node||e instanceof Cp(e).Node}function kp(e){return e instanceof Element||e instanceof Cp(e).Element}function Np(e){return e instanceof HTMLElement||e instanceof Cp(e).HTMLElement}function Ep(e){return"undefined"!==typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Cp(e).ShadowRoot)}function Tp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Mp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Op(e){return["table","td","th"].includes(Sp(e))}function Ip(e){const t=Rp(),n=Mp(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Rp(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ap(e){return["html","body","#document"].includes(Sp(e))}function Mp(e){return Cp(e).getComputedStyle(e)}function Pp(e){return kp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Dp(e){if("html"===Sp(e))return e;const t=e.assignedSlot||e.parentNode||Ep(e)&&e.host||jp(e);return Ep(t)?t.host:t}function Fp(e){const t=Dp(e);return Ap(t)?e.ownerDocument?e.ownerDocument.body:e.body:Np(t)&&Tp(t)?t:Fp(t)}function Lp(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Fp(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Cp(o);return i?t.concat(s,s.visualViewport||[],Tp(o)?o:[],s.frameElement&&n?Lp(s.frameElement):[]):t.concat(o,Lp(o,[],n))}function Bp(e){const t=Mp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Np(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=np(n)!==i||np(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Up(e){return kp(e)?e:e.contextElement}function Gp(e){const t=Up(e);if(!Np(t))return op(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Bp(t);let s=(i?np(n.width):n.width)/r,a=(i?np(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const $p=op(0);function qp(e){const t=Cp(e);return Rp()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:$p}function zp(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Up(e);let s=op(1);t&&(r?kp(r)&&(s=Gp(r)):s=Gp(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Cp(e))&&t}(i,n,r)?qp(i):op(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=Cp(i),t=r&&kp(r)?Cp(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Gp(o),t=o.getBoundingClientRect(),r=Mp(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=Cp(o),o=n.frameElement}}return yp({width:u,height:d,x:l,y:c})}const Vp=[":popover-open",":modal"];function Hp(e){return Vp.some((t=>{try{return e.matches(t)}catch(BK){return!1}}))}function Wp(e){return zp(jp(e)).left+Pp(e).scrollLeft}function Yp(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Cp(e),r=jp(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Rp();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=jp(e),n=Pp(e),r=e.ownerDocument.body,o=tp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Wp(e);const a=-n.scrollTop;return"rtl"===Mp(r).direction&&(s+=tp(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(jp(e));else if(kp(t))r=function(e,t){const n=zp(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Np(e)?Gp(e):op(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=qp(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return yp(r)}function Qp(e,t){const n=Dp(e);return!(n===t||!kp(n)||Ap(n))&&("fixed"===Mp(n).position||Qp(n,t))}function Jp(e,t,n){const r=Np(t),o=jp(t),i="fixed"===n,s=zp(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=op(0);if(r||!r&&!i)if(("body"!==Sp(t)||Tp(o))&&(a=Pp(t)),r){const e=zp(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Wp(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Kp(e,t){return Np(e)&&"fixed"!==Mp(e).position?t?t(e):e.offsetParent:null}function Xp(e,t){const n=Cp(e);if(!Np(e)||Hp(e))return n;let r=Kp(e,t);for(;r&&Op(r)&&"static"===Mp(r).position;)r=Kp(r,t);return r&&("html"===Sp(r)||"body"===Sp(r)&&"static"===Mp(r).position&&!Ip(r))?n:r||function(e){let t=Dp(e);for(;Np(t)&&!Ap(t);){if(Ip(t))return t;t=Dp(t)}return null}(e)||n}const Zp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=jp(r),a=!!t&&Hp(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=op(1);const u=op(0),d=Np(r);if((d||!d&&!i)&&(("body"!==Sp(r)||Tp(s))&&(l=Pp(r)),Np(r))){const e=zp(r);c=Gp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:jp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Lp(e,[],!1).filter((e=>kp(e)&&"body"!==Sp(e))),o=null;const i="fixed"===Mp(e).position;let s=i?Dp(e):e;for(;kp(s)&&!Ap(s);){const t=Mp(s),n=Ip(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Tp(s)&&!n&&Qp(e,s))?r=r.filter((e=>e!==s)):o=t,s=Dp(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=Yp(t,n,o);return e.top=tp(r.top,e.top),e.right=ep(r.right,e.right),e.bottom=ep(r.bottom,e.bottom),e.left=tp(r.left,e.left),e}),Yp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xp,getElementRects:async function(e){const t=this.getOffsetParent||Xp,n=this.getDimensions;return{reference:Jp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Bp(e);return{width:t,height:n}},getScale:Gp,isElement:kp,isRTL:function(e){return"rtl"===Mp(e).direction}};function ef(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"===typeof ResizeObserver,layoutShift:a="function"===typeof IntersectionObserver,animationFrame:l=!1}=r,c=Up(e),u=o||i?[...c?Lp(c):[],...Lp(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=jp(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-rp(u)+"px "+-rp(o.clientWidth-(c+d))+"px "+-rp(o.clientHeight-(u+h))+"px "+-rp(c)+"px",threshold:tp(0,ep(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}f=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(BK){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?zp(e):null;return l&&function t(){const r=zp(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const tf=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lp(e,t),c={x:n,y:r},u=await xp(t,l),d=pp(cp(o)),h=dp(d);let p=c[h],f=c[d];if(i){const e="y"===h?"bottom":"right";p=ap(p+u["y"===h?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";f=ap(f+u["y"===d?"top":"left"],f,f-u[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nf=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=lp(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=cp(o),y=cp(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=h||(y||!m?[gp(a)]:function(e){const t=gp(e);return[mp(e),t,mp(t)]}(a));h||"none"===f||x.push(...function(e,t,n,r){const o=up(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(cp(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(mp)))),i}(a,m,f,b));const w=[a,...x],S=await xp(t,g),C=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&C.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=up(e),o=fp(e),i=hp(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gp(s)),[s,gp(s)]}(o,s,b);C.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:o,overflows:C}],!C.every((e=>e<=0))){var _,k;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(k=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=j.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},rf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=lp(e,t)||{};if(null==c)return{};const d=vp(u),h={x:n,y:r},p=fp(o),f=hp(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let C=S?S[b]:0;C&&await(null==s.isElement?void 0:s.isElement(S))||(C=a.floating[b]||i.floating[f]);const j=x/2-w/2,_=C/2-m[f]/2-1,k=ep(d[v],_),N=ep(d[y],_),E=k,T=C-m[f]-N,O=C/2-m[f]/2+j,I=ap(E,O,T),R=!l.arrow&&null!=up(o)&&O!==I&&i.reference[f]/2-(O<E?k:N)-m[f]/2<0,A=R?O<E?O-E:O-T:0;return{[p]:h[p]+A,data:{[p]:I,centerOffset:O-I-A,...R&&{alignmentOffset:A}},reset:R}}}),of=(e,t,n)=>{const r=new Map,o={platform:Zp,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=bp(c,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:n,fn:i}=a[m],{x:g,y:v,data:y,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[n]:{...p[n],...y}},b&&f<=50&&(f++,"object"===typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=bp(c,h,l))),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},sf="react-tooltip-core-styles",af="react-tooltip-base-styles",lf={core:!1,base:!1};function cf({css:e,id:t=af,type:n="base",ref:r}){var o,i;if(!e||"undefined"==typeof document||lf[n])return;if("core"===n&&"undefined"!=typeof process&&(null===(o=null===process||void 0===process?void 0:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"})||void 0===o?void 0:o.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==n&&"undefined"!=typeof process&&(null===(i=null===process||void 0===process?void 0:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV:"production",REACT_APP_VERSION:"0.1.0-8051ae4",REACT_APP_API_URL:"https://api.classsolver.com/api",REACT_APP_HOME_URL:"https://classsolver.com"})||void 0===i?void 0:i.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===n&&(t=sf),r||(r={});const{insertAt:s}=r;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css","top"===s&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),lf[n]=!0}const uf=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:s=[wp(Number(o)),nf({fallbackAxisSideDirection:"start"}),tf({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const l=s;return n?(l.push(rf({element:n,padding:5})),of(e,t,{placement:r,strategy:i,middleware:l}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let h=0;if(a){const e=`${a}`.match(/(\d+)px/);h=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+h}px`},place:n}}))):of(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})))},df=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),hf=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},pf=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ff=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ff(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!pf(e)||!pf(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>ff(e[n],t[n])))},mf=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},gf=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(mf(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},vf="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,yf="DEFAULT_TOOLTIP_ID",bf={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xf=(0,o.createContext)({getTooltipData:()=>bf});function wf(e=yf){return(0,o.useContext)(xf).getTooltipData(e)}var Sf={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Cf={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const jf=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:i="dark",anchorId:s,anchorSelect:a,place:l="top",offset:c=10,events:u=["hover"],openOnClick:d=!1,positionStrategy:h="absolute",middlewares:p,wrapper:f,delayShow:m=0,delayHide:g=0,float:v=!1,hidden:y=!1,noArrow:b=!1,clickable:x=!1,closeOnEsc:w=!1,closeOnScroll:S=!1,closeOnResize:C=!1,openEvents:j,closeEvents:_,globalCloseEvents:k,imperativeModeOnly:N,style:E,position:T,afterShow:O,afterHide:I,content:R,contentWrapperRef:A,isOpen:M,defaultIsOpen:P=!1,setIsOpen:D,activeAnchor:F,setActiveAnchor:L,border:B,opacity:U,arrowColor:G,role:$="tooltip"})=>{var q;const z=(0,o.useRef)(null),V=(0,o.useRef)(null),H=(0,o.useRef)(null),W=(0,o.useRef)(null),Y=(0,o.useRef)(null),[Q,J]=(0,o.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[K,X]=(0,o.useState)(!1),[Z,ee]=(0,o.useState)(!1),[te,ne]=(0,o.useState)(null),re=(0,o.useRef)(!1),oe=(0,o.useRef)(null),{anchorRefs:ie,setActiveAnchor:se}=wf(t),ae=(0,o.useRef)(!1),[le,ce]=(0,o.useState)([]),ue=(0,o.useRef)(!1),de=d||u.includes("click"),he=de||(null==j?void 0:j.click)||(null==j?void 0:j.dblclick)||(null==j?void 0:j.mousedown),pe=j?{...j}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!j&&de&&Object.assign(pe,{mouseenter:!1,focus:!1,click:!0});const fe=_?{..._}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!_&&de&&Object.assign(fe,{mouseleave:!1,blur:!1});const me=k?{...k}:{escape:w||!1,scroll:S||!1,resize:C||!1,clickOutsideAnchor:he||!1};N&&(Object.assign(pe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(fe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),vf((()=>(ue.current=!0,()=>{ue.current=!1})),[]);const ge=e=>{ue.current&&(e&&ee(!0),setTimeout((()=>{ue.current&&(null==D||D(e),void 0===M&&X(e))}),10))};(0,o.useEffect)((()=>{if(void 0===M)return()=>null;M&&ee(!0);const e=setTimeout((()=>{X(M)}),10);return()=>{clearTimeout(e)}}),[M]),(0,o.useEffect)((()=>{if(K!==re.current)if(Y.current&&clearTimeout(Y.current),re.current=K,K)null==O||O();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,n,r]=t;return Number(n)*("ms"===r?1:1e3)})();Y.current=setTimeout((()=>{ee(!1),ne(null),null==I||I()}),e+25)}}),[K]);const ve=e=>{J((t=>ff(t,e)?t:e))},ye=(e=m)=>{H.current&&clearTimeout(H.current),Z?ge(!0):H.current=setTimeout((()=>{ge(!0)}),e)},be=(e=g)=>{W.current&&clearTimeout(W.current),W.current=setTimeout((()=>{ae.current||ge(!1)}),e)},xe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return L(null),void se({current:null});m?ye():ge(!0),L(n),se({current:n}),W.current&&clearTimeout(W.current)},we=()=>{x?be(g||100):g?be():ge(!1),H.current&&clearTimeout(H.current)},Se=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};uf({place:null!==(n=null==te?void 0:te.place)&&void 0!==n?n:l,offset:c,elementReference:r,tooltipReference:z.current,tooltipArrowReference:V.current,strategy:h,middlewares:p,border:B}).then((e=>{ve(e)}))},Ce=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Se(n),oe.current=n},je=e=>{var t;if(!K)return;const n=e.target;n.isConnected&&((null===(t=z.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...le].some((e=>null==e?void 0:e.contains(n)))||(ge(!1),H.current&&clearTimeout(H.current)))},_e=hf(xe,50,!0),ke=hf(we,50,!0),Ne=e=>{ke.cancel(),_e(e)},Ee=()=>{_e.cancel(),ke()},Te=(0,o.useCallback)((()=>{var e,t;const n=null!==(e=null==te?void 0:te.position)&&void 0!==e?e:T;n?Se(n):v?oe.current&&Se(oe.current):(null==F?void 0:F.isConnected)&&uf({place:null!==(t=null==te?void 0:te.place)&&void 0!==t?t:l,offset:c,elementReference:F,tooltipReference:z.current,tooltipArrowReference:V.current,strategy:h,middlewares:p,border:B}).then((e=>{ue.current&&ve(e)}))}),[K,F,R,E,l,null==te?void 0:te.place,c,h,T,null==te?void 0:te.position,v]);(0,o.useEffect)((()=>{var e,t;const n=new Set(ie);le.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${s}']`);r&&n.add({current:r});const o=()=>{ge(!1)},i=gf(F),a=gf(z.current);me.scroll&&(window.addEventListener("scroll",o),null==i||i.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let l=null;me.resize?window.addEventListener("resize",o):F&&z.current&&(l=ef(F,z.current,Te,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&ge(!1)};me.escape&&window.addEventListener("keydown",c),me.clickOutsideAnchor&&window.addEventListener("click",je);const u=[],d=e=>{K&&(null==e?void 0:e.target)===F||xe(e)},h=e=>{K&&(null==e?void 0:e.target)===F&&we()},p=["mouseenter","mouseleave","focus","blur"],f=["click","dblclick","mousedown","mouseup"];Object.entries(pe).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:Ne}):f.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(fe).forEach((([e,t])=>{t&&(p.includes(e)?u.push({event:e,listener:Ee}):f.includes(e)&&u.push({event:e,listener:h}))})),v&&u.push({event:"pointermove",listener:Ce});const m=()=>{ae.current=!0},g=()=>{ae.current=!1,we()};return x&&!he&&(null===(e=z.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=z.current)||void 0===t||t.addEventListener("mouseleave",g)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;me.scroll&&(window.removeEventListener("scroll",o),null==i||i.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),me.resize?window.removeEventListener("resize",o):null==l||l(),me.clickOutsideAnchor&&window.removeEventListener("click",je),me.escape&&window.removeEventListener("keydown",c),x&&!he&&(null===(e=z.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=z.current)||void 0===t||t.removeEventListener("mouseleave",g)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[F,Te,Z,ie,le,j,_,k,de,m,g]),(0,o.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==te?void 0:te.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(F){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,F))&&(ee(!1),ge(!1),L(null),H.current&&clearTimeout(H.current),W.current&&clearTimeout(W.current),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ce((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,a,null==te?void 0:te.anchorSelect,F]),(0,o.useEffect)((()=>{Te()}),[Te]),(0,o.useEffect)((()=>{if(!(null==A?void 0:A.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Te()))}));return e.observe(A.current),()=>{e.disconnect()}}),[R,null==A?void 0:A.current]),(0,o.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...le,t];F&&n.includes(F)||L(null!==(e=le[0])&&void 0!==e?e:t)}),[s,le,F]),(0,o.useEffect)((()=>(P&&ge(!0),()=>{H.current&&clearTimeout(H.current),W.current&&clearTimeout(W.current)})),[]),(0,o.useEffect)((()=>{var e;let n=null!==(e=null==te?void 0:te.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));ce(e)}catch(e){ce([])}}),[t,a,null==te?void 0:te.anchorSelect]),(0,o.useEffect)((()=>{H.current&&(clearTimeout(H.current),ye(m))}),[m]);const Oe=null!==(q=null==te?void 0:te.content)&&void 0!==q?q:R,Ie=K&&Object.keys(Q.tooltipStyles).length>0;return(0,o.useImperativeHandle)(e,(()=>({open:t=>{if(null==t?void 0:t.anchorSelect)try{document.querySelector(t.anchorSelect)}catch(e){return void console.warn(`[react-tooltip] "${t.anchorSelect}" is not a valid CSS selector`)}ne(null!=t?t:null),(null==t?void 0:t.delay)?ye(t.delay):ge(!0)},close:e=>{(null==e?void 0:e.delay)?be(e.delay):ge(!1)},activeAnchor:F,place:Q.place,isOpen:Boolean(Z&&!y&&Oe&&Ie)}))),Z&&!y&&Oe?o.createElement(f,{id:t,role:$,className:Cu("react-tooltip",Sf.tooltip,Cf.tooltip,Cf[i],n,`react-tooltip__place-${Q.place}`,Sf[Ie?"show":"closing"],Ie?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Sf.fixed,x&&Sf.clickable),onTransitionEnd:e=>{Y.current&&clearTimeout(Y.current),K||"opacity"!==e.propertyName||(ee(!1),ne(null),null==I||I())},style:{...E,...Q.tooltipStyles,opacity:void 0!==U&&Ie?U:void 0},ref:z},Oe,o.createElement(f,{className:Cu("react-tooltip-arrow",Sf.arrow,Cf.arrow,r,b&&Sf.noArrow),style:{...Q.tooltipArrowStyles,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0},ref:V})):null},_f=({content:e})=>o.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),kf=o.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:i,render:s,className:a,classNameArrow:l,variant:c="dark",place:u="top",offset:d=10,wrapper:h="div",children:p=null,events:f=["hover"],openOnClick:m=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:x=!1,hidden:w=!1,noArrow:S=!1,clickable:C=!1,closeOnEsc:j=!1,closeOnScroll:_=!1,closeOnResize:k=!1,openEvents:N,closeEvents:E,globalCloseEvents:T,imperativeModeOnly:O=!1,style:I,position:R,isOpen:A,defaultIsOpen:M=!1,disableStyleInjection:P=!1,border:D,opacity:F,arrowColor:L,setIsOpen:B,afterShow:U,afterHide:G,role:$="tooltip"},q)=>{const[z,V]=(0,o.useState)(r),[H,W]=(0,o.useState)(i),[Y,Q]=(0,o.useState)(u),[J,K]=(0,o.useState)(c),[X,Z]=(0,o.useState)(d),[ee,te]=(0,o.useState)(y),[ne,re]=(0,o.useState)(b),[oe,ie]=(0,o.useState)(x),[se,ae]=(0,o.useState)(w),[le,ce]=(0,o.useState)(h),[ue,de]=(0,o.useState)(f),[he,pe]=(0,o.useState)(g),[fe,me]=(0,o.useState)(null),[ge,ve]=(0,o.useState)(null),ye=(0,o.useRef)(P),{anchorRefs:be,activeAnchor:xe}=wf(e),we=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;Q(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:r)},html:e=>{W(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{Z(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:h)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:f)},"position-strategy":e=>{var t;pe(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{te(null===e?y:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?x:"true"===e)},hidden:e=>{ae(null===e?w:"true"===e)},"class-name":e=>{me(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,o.useEffect)((()=>{V(r)}),[r]),(0,o.useEffect)((()=>{W(i)}),[i]),(0,o.useEffect)((()=>{Q(u)}),[u]),(0,o.useEffect)((()=>{K(c)}),[c]),(0,o.useEffect)((()=>{Z(d)}),[d]),(0,o.useEffect)((()=>{te(y)}),[y]),(0,o.useEffect)((()=>{re(b)}),[b]),(0,o.useEffect)((()=>{ie(x)}),[x]),(0,o.useEffect)((()=>{ae(w)}),[w]),(0,o.useEffect)((()=>{pe(g)}),[g]),(0,o.useEffect)((()=>{ye.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[P]),(0,o.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}))}),[]),(0,o.useEffect)((()=>{var r;const o=new Set(be);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&o.add({current:s}),!o.size)return()=>null;const a=null!==(r=null!=ge?ge:s)&&void 0!==r?r:xe.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=we(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=we(a);Se(e),l.observe(a,c)}return()=>{l.disconnect()}}),[be,xe,ge,t,n]),(0,o.useEffect)((()=>{(null==I?void 0:I.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!df("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==I?void 0:I.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!df("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`)}),[]);let Ce=p;const je=(0,o.useRef)(null);if(s){const e=s({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||z||null,activeAnchor:ge});Ce=e?o.createElement("div",{ref:je,className:"react-tooltip-content-wrapper"},e):null}else z&&(Ce=z);H&&(Ce=o.createElement(_f,{content:H}));const _e={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:Cu(a,fe),classNameArrow:l,content:Ce,contentWrapperRef:je,place:Y,variant:J,offset:X,wrapper:le,events:ue,openOnClick:m,positionStrategy:he,middlewares:v,delayShow:ee,delayHide:ne,float:oe,hidden:se,noArrow:S,clickable:C,closeOnEsc:j,closeOnScroll:_,closeOnResize:k,openEvents:N,closeEvents:E,globalCloseEvents:T,imperativeModeOnly:O,style:I,position:R,isOpen:A,defaultIsOpen:M,border:D,opacity:F,arrowColor:L,setIsOpen:B,afterShow:U,afterHide:G,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:$};return o.createElement(jf,{..._e})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||cf({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||cf({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Nf=({id:e,onClick:t,labelText:n,tooltipHeader:r,tooltipBody:o,badgeType:i})=>{const s=i?`c-toggle-badge--${i}`:"";return(0,pr.jsxs)("div",{className:`c-toggle-badge ${s}`,children:[(0,pr.jsx)("a",{onClick:t,"data-tooltip-id":e,children:n}),(0,pr.jsx)(kf,{className:"c-badge-tooltip p-0",id:e,variant:"light",float:!0,opacity:1,children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-badge-tooltip__header",children:r}),(0,pr.jsx)("div",{className:"c-badge-tooltip__body",children:o})]})})]})},Ef=({className:e,cancelText:t,onCancelClick:n,buttonText:r,onButtonClick:o,disabled:i})=>(0,pr.jsxs)("div",{className:`d-flex justify-content-end align-items-center ${e||""}`,children:[(0,pr.jsx)("span",{className:"text-primary px-4 cursor-pointer",onClick:n,children:t||"Cancel"}),(0,pr.jsx)(ld,{color:"primary",onClick:o,disabled:i,type:"button",children:r||"Submit"})]});var Tf={children:pu().node.isRequired,node:pu().any},Of=function(e){function t(){return e.apply(this,arguments)||this}du(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null},n.render=function(){return Uu?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Fl.createPortal(this.props.children,this.props.node||this.defaultNode)):null},t}(o.Component);Of.propTypes=Tf;const If=Of;var Rf=n(7111),Af=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mf(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Df=Pf(Pf({},Rf.Transition.propTypes),{},{children:pu().oneOfType([pu().arrayOf(pu().node),pu().node]),tag:Pu,baseClass:pu().string,baseClassActive:pu().string,className:pu().string,cssModule:pu().object,innerRef:pu().oneOfType([pu().object,pu().string,pu().func])}),Ff=Pf(Pf({},Rf.Transition.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:Du,appear:!0,enter:!0,exit:!0,in:!0});function Lf(e){var t=e.tag,n=e.baseClass,r=e.baseClassActive,i=e.className,s=e.cssModule,a=e.children,l=e.innerRef,c=lu(e,Af),u=function(e,t){for(var n,r=Array.isArray(t)?t:[t],o=r.length,i={};o>0;)i[n=r[o-=1]]=e[n];return i}(c,Lu),d=Tu(c,Lu);return o.createElement(Rf.Transition,u,(function(e){var c="entered"===e,u=Eu(ju()(i,n,c&&r),s);return o.createElement(t,au({className:u},d,{ref:l}),a)}))}Lf.propTypes=Df,Lf.defaultProps=Ff;const Bf=Lf;function Uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uf(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $f(){}var qf=pu().shape(Bf.propTypes),zf={isOpen:pu().bool,autoFocus:pu().bool,centered:pu().bool,scrollable:pu().bool,size:pu().string,toggle:pu().func,keyboard:pu().bool,role:pu().string,labelledBy:pu().string,backdrop:pu().oneOfType([pu().bool,pu().oneOf(["static"])]),onEnter:pu().func,onExit:pu().func,onOpened:pu().func,onClosed:pu().func,children:pu().node,className:pu().string,wrapClassName:pu().string,modalClassName:pu().string,backdropClassName:pu().string,contentClassName:pu().string,external:pu().node,fade:pu().bool,cssModule:pu().object,zIndex:pu().oneOfType([pu().number,pu().string]),backdropTransition:qf,modalTransition:qf,innerRef:pu().oneOfType([pu().object,pu().string,pu().func]),unmountOnClose:pu().bool,returnFocusAfterClose:pu().bool,container:Mu,trapFocus:pu().bool},Vf=Object.keys(zf),Hf={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:$f,onClosed:$f,modalTransition:{timeout:Fu},backdropTransition:{mountOnEnter:!0,timeout:Du},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Wf=function(e){function t(t){var n;return(n=e.call(this,t)||this)._element=null,n._originalBodyPadding=null,n.getFocusableChildren=n.getFocusableChildren.bind(cu(n)),n.handleBackdropClick=n.handleBackdropClick.bind(cu(n)),n.handleBackdropMouseDown=n.handleBackdropMouseDown.bind(cu(n)),n.handleEscape=n.handleEscape.bind(cu(n)),n.handleStaticBackdropAnimation=n.handleStaticBackdropAnimation.bind(cu(n)),n.handleTab=n.handleTab.bind(cu(n)),n.onOpened=n.onOpened.bind(cu(n)),n.onClosed=n.onClosed.bind(cu(n)),n.manageFocusAfterClose=n.manageFocusAfterClose.bind(cu(n)),n.clearBackdropAnimationTimeout=n.clearBackdropAnimationTimeout.bind(cu(n)),n.trapFocus=n.trapFocus.bind(cu(n)),n.state={isOpen:!1,showStaticBackdropAnimation:!1},n}du(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.isOpen,n=e.autoFocus,r=e.onEnter;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0},n.componentDidUpdate=function(e,t){if(this.props.isOpen&&!e.isOpen)return this.init(),void this.setState({isOpen:!0});this.props.autoFocus&&this.state.isOpen&&!t.isOpen&&this.setFocus(),this._element&&e.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)},n.componentWillUnmount=function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1},n.trapFocus=function(e){if(this.props.trapFocus&&this._element&&(!this._dialog||this._dialog.parentNode!==e.target)&&!(this.modalIndex<t.openCount-1)){for(var n=this.getFocusableChildren(),r=0;r<n.length;r++)if(n[r]===e.target)return;n.length>0&&(e.preventDefault(),e.stopPropagation(),n[0].focus())}},n.onOpened=function(e,t){this.props.onOpened(),(this.props.modalTransition.onEntered||$f)(e,t)},n.onClosed=function(e){var t=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||$f)(e),t&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})},n.setFocus=function(){this._dialog&&this._dialog.parentNode&&"function"===typeof this._dialog.parentNode.focus&&this._dialog.parentNode.focus()},n.getFocusableChildren=function(){return this._element.querySelectorAll(Hu.join(", "))},n.getFocusedChild=function(){var e,t=this.getFocusableChildren();try{e=document.activeElement}catch(n){e=t[0]}return e},n.handleBackdropClick=function(e){if(e.target===this._mouseDownElement){e.stopPropagation();var t=this._dialog?this._dialog.parentNode:null;if(t&&e.target===t&&"static"===this.props.backdrop&&this.handleStaticBackdropAnimation(),!this.props.isOpen||!0!==this.props.backdrop)return;t&&e.target===t&&this.props.toggle&&this.props.toggle(e)}},n.handleTab=function(e){if(9===e.which&&!(this.modalIndex<t.openCount-1)){var n=this.getFocusableChildren(),r=n.length;if(0!==r){for(var o=this.getFocusedChild(),i=0,s=0;s<r;s+=1)if(n[s]===o){i=s;break}e.shiftKey&&0===i?(e.preventDefault(),n[r-1].focus()):e.shiftKey||i!==r-1||(e.preventDefault(),n[0].focus())}}},n.handleBackdropMouseDown=function(e){this._mouseDownElement=e.target},n.handleEscape=function(e){this.props.isOpen&&e.keyCode===Bu.esc&&this.props.toggle&&(this.props.keyboard?(e.preventDefault(),e.stopPropagation(),this.props.toggle(e)):"static"===this.props.backdrop&&(e.preventDefault(),e.stopPropagation(),this.handleStaticBackdropAnimation()))},n.handleStaticBackdropAnimation=function(){var e=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout((function(){e.setState({showStaticBackdropAnimation:!1})}),100)},n.init=function(){try{this._triggeringElement=document.activeElement}catch(e){this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Vu(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=function(){var e=window.getComputedStyle(document.body,null);return parseInt(e&&e.getPropertyValue("padding-right")||0,10)}(),Nu(),0===t.openCount&&(document.body.className=ju()(document.body.className,Eu("modal-open",this.props.cssModule))),this.modalIndex=t.openCount,t.openCount+=1},n.destroy=function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()},n.manageFocusAfterClose=function(){if(this._triggeringElement){var e=this.props.returnFocusAfterClose;this._triggeringElement.focus&&e&&this._triggeringElement.focus(),this._triggeringElement=null}},n.close=function(){if(t.openCount<=1){var e=Eu("modal-open",this.props.cssModule),n=new RegExp("(^| )"+e+"( |$)");document.body.className=document.body.className.replace(n," ").trim()}this.manageFocusAfterClose(),t.openCount=Math.max(0,t.openCount-1),ku(this._originalBodyPadding)},n.renderModalDialog=function(){var e,t=this,n=Tu(this.props,Vf),r="modal-dialog";return o.createElement("div",au({},n,{className:Eu(ju()(r,this.props.className,(e={},e["modal-"+this.props.size]=this.props.size,e[r+"-centered"]=this.props.centered,e[r+"-scrollable"]=this.props.scrollable,e)),this.props.cssModule),role:"document",ref:function(e){t._dialog=e}}),o.createElement("div",{className:Eu(ju()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))},n.render=function(){var e=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!e)){var t=!!this._element&&!this.state.isOpen&&!e;this._element.style.display=t?"none":"block";var n=this.props,r=n.wrapClassName,i=n.modalClassName,s=n.backdropClassName,a=n.cssModule,l=n.isOpen,c=n.backdrop,u=n.role,d=n.labelledBy,h=n.external,p=n.innerRef,f={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":d,role:u,tabIndex:"-1"},m=this.props.fade,g=Gf(Gf(Gf({},Bf.defaultProps),this.props.modalTransition),{},{baseClass:m?this.props.modalTransition.baseClass:"",timeout:m?this.props.modalTransition.timeout:0}),v=Gf(Gf(Gf({},Bf.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),y=c&&(m?o.createElement(Bf,au({},v,{in:l&&!!c,cssModule:a,className:Eu(ju()("modal-backdrop",s),a)})):o.createElement("div",{className:Eu(ju()("modal-backdrop","show",s),a)}));return o.createElement(If,{node:this._element},o.createElement("div",{className:Eu(r)},o.createElement(Bf,au({},f,g,{in:l,onEntered:this.onOpened,onExited:this.onClosed,cssModule:a,className:Eu(ju()("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),a),innerRef:p}),h,this.renderModalDialog()),y))}return null},n.clearBackdropAnimationTimeout=function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)},t}(o.Component);Wf.propTypes=zf,Wf.defaultProps=Hf,Wf.openCount=0;const Yf=Wf,Qf=({isOpen:e=!0,loading:t,toggle:n,heading:r,text:o,buttonText:i,onButtonClick:s,showCancel:a=!0,error:l,showNotice:c=!0,showCautionIcon:u=!0})=>(0,pr.jsx)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:r,toggle:n}),t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{className:"mt-4 d-flex justify-content-between",children:[u&&(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[c&&(0,pr.jsx)("div",{className:"text-primary mb-3",children:"IMPORTANT NOTICE"}),(0,pr.jsx)("div",{children:o})]})]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:s,children:i}),a&&(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:n,children:"Cancel"}),(0,pr.jsx)($k,{text:l})]})]})}),Jf=({name:e,characteristicResponses:t,...n})=>(0,pr.jsx)(kf,{className:"c-characteristic-tooltip p-0",opacity:1,...n,children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-characteristic-tooltip__header text-primary",children:e}),(0,pr.jsx)("div",{className:"c-characteristic-tooltip__body",children:su(t)&&t.map(((e,t)=>(0,pr.jsxs)("div",{className:"mt-3 c-characteristic-tooltip__description",children:[(0,pr.jsx)("span",{className:"u-bold",children:e.label}),null!==e.description&&(0,pr.jsx)("span",{children:` - ${e.description}`})]},t)))})]})});var Kf=["cssModule","children","isOpen","flip","target","offset","fallbackPlacement","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","positionFixed","boundariesElement","onClosed","fade","transition","placement"];function Xf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xf(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var em={children:pu().oneOfType([pu().node,pu().func]).isRequired,popperClassName:pu().string,placement:pu().string,placementPrefix:pu().string,arrowClassName:pu().string,hideArrow:pu().bool,tag:Pu,isOpen:pu().bool.isRequired,cssModule:pu().object,offset:pu().oneOfType([pu().string,pu().number]),fallbackPlacement:pu().oneOfType([pu().string,pu().array]),flip:pu().bool,container:Mu,target:Mu.isRequired,modifiers:pu().object,positionFixed:pu().bool,boundariesElement:pu().oneOfType([pu().string,Au]),onClosed:pu().func,fade:pu().bool,transition:pu().shape(Bf.propTypes)},tm={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:0,fallbackPlacement:"flip",flip:!0,container:"body",modifiers:{},onClosed:function(){},fade:!0,transition:Zf({},Bf.defaultProps)},nm=function(e){function t(t){var n;return(n=e.call(this,t)||this).setTargetNode=n.setTargetNode.bind(cu(n)),n.getTargetNode=n.getTargetNode.bind(cu(n)),n.getRef=n.getRef.bind(cu(n)),n.onClosed=n.onClosed.bind(cu(n)),n.state={isOpen:t.isOpen},n}du(t,e),t.getDerivedStateFromProps=function(e,t){return e.isOpen&&!t.isOpen?{isOpen:e.isOpen}:null};var n=t.prototype;return n.componentDidUpdate=function(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()},n.setTargetNode=function(e){this.targetNode="string"===typeof e?Vu(e):e},n.getTargetNode=function(){return this.targetNode},n.getContainerNode=function(){return Vu(this.props.container)},n.getRef=function(e){this._element=e},n.onClosed=function(){this.props.onClosed(),this.setState({isOpen:!1})},n.renderChildren=function(){var e=this.props,t=e.cssModule,n=e.children,r=e.isOpen,i=e.flip,s=(e.target,e.offset),a=e.fallbackPlacement,l=e.placementPrefix,c=e.arrowClassName,u=e.hideArrow,d=e.popperClassName,h=e.tag,p=(e.container,e.modifiers),f=e.positionFixed,m=e.boundariesElement,g=(e.onClosed,e.fade),v=e.transition,y=e.placement,b=lu(e,Kf),x=Eu(ju()("arrow",c),t),w=Eu(ju()(d,l?l+"-auto":""),this.props.cssModule),S=Zf({offset:{offset:s},flip:{enabled:i,behavior:a},preventOverflow:{boundariesElement:m}},p),C=Zf(Zf(Zf({},Bf.defaultProps),v),{},{baseClass:g?v.baseClass:"",timeout:g?v.timeout:0});return o.createElement(Bf,au({},C,b,{in:r,onExited:this.onClosed,tag:h}),o.createElement(Ch,{referenceElement:this.targetNode,modifiers:S,placement:y,positionFixed:f},(function(e){var t=e.ref,r=e.style,i=e.placement,s=e.outOfBoundaries,a=e.arrowProps,l=e.scheduleUpdate;return o.createElement("div",{ref:t,style:r,className:w,"x-placement":i,"x-out-of-boundaries":s?"true":void 0},"function"===typeof n?n({scheduleUpdate:l}):n,!u&&o.createElement("span",{ref:a.ref,className:x,style:a.style}))})))},n.render=function(){return this.setTargetNode(this.props.target),this.state.isOpen?"inline"===this.props.container?this.renderChildren():Fl.createPortal(o.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null},t}(o.Component);nm.propTypes=em,nm.defaultProps=tm;const rm=nm;var om={children:pu().oneOfType([pu().node,pu().func]),placement:pu().oneOf(["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"]),target:Mu.isRequired,container:Mu,isOpen:pu().bool,disabled:pu().bool,hideArrow:pu().bool,boundariesElement:pu().oneOfType([pu().string,Au]),className:pu().string,innerClassName:pu().string,arrowClassName:pu().string,popperClassName:pu().string,cssModule:pu().object,toggle:pu().func,autohide:pu().bool,placementPrefix:pu().string,delay:pu().oneOfType([pu().shape({show:pu().number,hide:pu().number}),pu().number]),modifiers:pu().object,positionFixed:pu().bool,offset:pu().oneOfType([pu().string,pu().number]),innerRef:pu().oneOfType([pu().func,pu().string,pu().object]),trigger:pu().string,fade:pu().bool,flip:pu().bool},im={show:0,hide:50},sm={isOpen:!1,hideArrow:!1,autohide:!1,delay:im,toggle:function(){},trigger:"click",fade:!0};function am(e,t){return t&&(e===t||t.contains(e))}function lm(e,t){return void 0===t&&(t=[]),t&&t.length&&t.filter((function(t){return am(e,t)}))[0]}var cm=function(e){function t(t){var n;return(n=e.call(this,t)||this)._targets=[],n.currentTargetElement=null,n.addTargetEvents=n.addTargetEvents.bind(cu(n)),n.handleDocumentClick=n.handleDocumentClick.bind(cu(n)),n.removeTargetEvents=n.removeTargetEvents.bind(cu(n)),n.toggle=n.toggle.bind(cu(n)),n.showWithDelay=n.showWithDelay.bind(cu(n)),n.hideWithDelay=n.hideWithDelay.bind(cu(n)),n.onMouseOverTooltipContent=n.onMouseOverTooltipContent.bind(cu(n)),n.onMouseLeaveTooltipContent=n.onMouseLeaveTooltipContent.bind(cu(n)),n.show=n.show.bind(cu(n)),n.hide=n.hide.bind(cu(n)),n.onEscKeyDown=n.onEscKeyDown.bind(cu(n)),n.getRef=n.getRef.bind(cu(n)),n.state={isOpen:t.isOpen},n._isMounted=!1,n}du(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this.updateTarget()},n.componentWillUnmount=function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()},t.getDerivedStateFromProps=function(e,t){return e.isOpen&&!t.isOpen?{isOpen:e.isOpen}:null},n.onMouseOverTooltipContent=function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())},n.onMouseLeaveTooltipContent=function(e){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),e.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,e),this.getDelay("hide")))},n.onEscKeyDown=function(e){"Escape"===e.key&&this.hide(e)},n.getRef=function(e){var t=this.props.innerRef;t&&("function"===typeof t?t(e):"object"===typeof t&&(t.current=e)),this._popover=e},n.getDelay=function(e){var t=this.props.delay;return"object"===typeof t?isNaN(t[e])?im[e]:t[e]:t},n.getCurrentTarget=function(e){if(!e)return null;var t=this._targets.indexOf(e);return t>=0?this._targets[t]:this.getCurrentTarget(e.parentElement)},n.show=function(e){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=e?e.currentTarget||this.getCurrentTarget(e.target):null,e&&e.composedPath&&"function"===typeof e.composedPath){var t=e.composedPath();this.currentTargetElement=t&&t[0]||this.currentTargetElement}this.toggle(e)}},n.showWithDelay=function(e){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,e),this.getDelay("show"))},n.hide=function(e){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(e))},n.hideWithDelay=function(e){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,e),this.getDelay("hide"))},n.clearShowTimeout=function(){clearTimeout(this._showTimeout),this._showTimeout=void 0},n.clearHideTimeout=function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0},n.handleDocumentClick=function(e){var t=this.props.trigger.split(" ");t.indexOf("legacy")>-1&&(this.props.isOpen||lm(e.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!am(e.target,this._popover)?this.hideWithDelay(e):this.props.isOpen||this.showWithDelay(e)):t.indexOf("click")>-1&&lm(e.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(e):this.showWithDelay(e))},n.addEventOnTargets=function(e,t,n){this._targets.forEach((function(r){r.addEventListener(e,t,n)}))},n.removeEventOnTargets=function(e,t,n){this._targets.forEach((function(r){r.removeEventListener(e,t,n)}))},n.addTargetEvents=function(){if(this.props.trigger){var e=this.props.trigger.split(" ");-1===e.indexOf("manual")&&((e.indexOf("click")>-1||e.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(e.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),e.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}},n.removeTargetEvents=function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)},n.updateTarget=function(){var e=Vu(this.props.target,!0);e!==this._targets&&(this.removeTargetEvents(),this._targets=e?Array.from(e):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())},n.toggle=function(e){return this.props.disabled||!this._isMounted?e&&e.preventDefault():this.props.toggle(e)},n.render=function(){var e=this;this.props.isOpen&&this.updateTarget();var t=this.currentTargetElement||this._targets[0];if(!t)return null;var n=this.props,r=n.className,i=n.cssModule,s=n.innerClassName,a=n.isOpen,l=n.hideArrow,c=n.boundariesElement,u=n.placement,d=n.placementPrefix,h=n.arrowClassName,p=n.popperClassName,f=n.container,m=n.modifiers,g=n.positionFixed,v=n.offset,y=n.fade,b=n.flip,x=n.children,w=Tu(this.props,Object.keys(om)),S=Eu(p,i),C=Eu(s,i);return o.createElement(rm,{className:r,target:t,isOpen:a,hideArrow:l,boundariesElement:c,placement:u,placementPrefix:d,arrowClassName:h,popperClassName:S,container:f,modifiers:m,positionFixed:g,offset:v,cssModule:i,fade:y,flip:b},(function(t){var n=t.scheduleUpdate;return o.createElement("div",au({},w,{ref:e.getRef,className:C,role:"tooltip",onMouseOver:e.onMouseOverTooltipContent,onMouseLeave:e.onMouseLeaveTooltipContent,onKeyDown:e.onEscKeyDown}),"function"===typeof x?x({scheduleUpdate:n}):x)}))},t}(o.Component);cm.propTypes=om,cm.defaultProps=sm;const um=cm;var dm=function(e){var t=ju()("tooltip","show",e.popperClassName),n=ju()("tooltip-inner",e.innerClassName);return o.createElement(um,au({},e,{popperClassName:t,innerClassName:n}))};dm.propTypes=om,dm.defaultProps={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};const hm=dm;function pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var fm=["defaultOpen"],mm=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={isOpen:t.defaultOpen||!1},n.toggle=n.toggle.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.toggle=function(){this.setState({isOpen:!this.state.isOpen})},n.render=function(){return o.createElement(hm,au({isOpen:this.state.isOpen,toggle:this.toggle},Tu(this.props,fm)))},t}(o.Component);mm.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pm(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultOpen:pu().bool},hm.propTypes);const gm=({label:e,className:t,backgroundColor:n})=>{const r=(0,o.useMemo)((()=>"classbadge"+Math.trunc(1e7*Math.random())),[]);return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{id:r,style:n?{backgroundColor:n}:null,className:`${t} c-class-badge ${su(e)?"":"c-class-badge--new"}`,children:(0,pr.jsx)("span",{className:"c-class-badge__label",children:e||"N/A"})}),(0,pr.jsx)(mm,{delay:{show:400,hide:50},innerClassName:"c-class-badge-tooltip",hideArrow:!0,placement:"top",target:r,children:e})]})},vm=({classes:e,rowId:t})=>{const n=[];for(let r=0;r<e.length;r++){if(!(n.length<2)){const o=`${t}-info`,i=e.map((e=>(0,pr.jsx)("p",{children:e.label},e.label)));n.push((0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"mr-2 badge-extra","data-tooltip-id":o,children:(0,pr.jsx)("span",{children:"+"+(e.length-2)})},r),(0,pr.jsx)(kf,{className:"c-badge-tooltip",style:{zIndex:100},id:o,variant:"light",opacity:1,children:i})]},"more"));break}n.push((0,pr.jsx)(gm,{className:"mr-2",label:e[r].label},r))}return(0,pr.jsx)("div",{className:"d-flex",children:n})};var ym,bm,xm=n(4376),wm=n(4273),Sm=n(2172);function Cm(e){var t;switch(e){case ym.Query:t="Query";break;case ym.Mutation:t="Mutation";break;case ym.Subscription:t="Subscription"}return t}function jm(e){bm||(bm=new xm.A(wm.v.parser||1e3));var t,n,r=bm.get(e);if(r)return r;(0,l.V1)(!!e&&!!e.kind,59,e);for(var o=[],i=[],s=[],a=[],c=0,u=e.definitions;c<u.length;c++){var d=u[c];if("FragmentDefinition"!==d.kind){if("OperationDefinition"===d.kind)switch(d.operation){case"query":i.push(d);break;case"mutation":s.push(d);break;case"subscription":a.push(d)}}else o.push(d)}(0,l.V1)(!o.length||i.length||s.length||a.length,60),(0,l.V1)(i.length+s.length+a.length<=1,61,e,i.length,a.length,s.length),n=i.length?ym.Query:ym.Mutation,i.length||s.length||(n=ym.Subscription);var h=i.length?i:s.length?s:a;(0,l.V1)(1===h.length,62,e,h.length);var p=h[0];t=p.variableDefinitions||[];var f={name:p.name&&"Name"===p.name.kind?p.name.value:"data",type:n,variables:t};return bm.set(e,f),f}function _m(e,t){var n=jm(e),r=Cm(t),o=Cm(n.type);(0,l.V1)(n.type===t,63,r,r,o)}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(ym||(ym={})),jm.resetCache=function(){bm=void 0},!1!==globalThis.__DEV__&&(0,Sm.D_)("parser",(function(){return bm?bm.size:0}));var km=n(219),Nm=n.n(km),Em=!1,Tm=u.useSyncExternalStore||function(e,t,n){var r=t();!1===globalThis.__DEV__||Em||r===t()||(Em=!0,!1!==globalThis.__DEV__&&l.V1.error(58));var o=c.useState({inst:{value:r,getSnapshot:t}}),i=o[0].inst,s=o[1];return d.JR?c.useLayoutEffect((function(){Object.assign(i,{value:r,getSnapshot:t}),Om(i)&&s({inst:i})}),[e,r,t]):Object.assign(i,{value:r,getSnapshot:t}),c.useEffect((function(){return Om(i)&&s({inst:i}),e((function(){Om(i)&&s({inst:i})}))}),[e]),r};function Om(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(r){return!0}}var Im=n(4902),Rm=n(2277),Am=n(7832),Mm=n(1388);function Pm(e){var t=c.useContext(p()),n=e||t.client;return(0,l.V1)(!!n,49),n}var Dm=n(6250),Fm=n(8694),Lm=n(8829),Bm=Symbol.for("apollo.hook.wrappers");var Um=Object.prototype.hasOwnProperty;function Gm(e,t){return void 0===t&&(t=Object.create(null)),function(e,t,n){var r=n.queryManager,o=r&&r[Bm],i=o&&o[e];return i?i(t):t}("useQuery",$m,Pm(t&&t.client))(e,t)}function $m(e,t){return qm(Pm(t.client),e).useQuery(t)}function qm(e,t){var n=c.useRef();n.current&&e===n.current.client&&t===n.current.query||(n.current=new zm(e,t,n.current));var r=n.current;return r.forceUpdateState=c.useReducer((function(e){return e+1}),0)[1],r}var zm=function(){function e(e,t,n){var r=this;this.client=e,this.query=t,this.forceUpdate=function(){return r.forceUpdateState()},this.ssrDisabledResult=(0,Dm.G)({loading:!0,data:void 0,error:void 0,networkStatus:Mm.pT.loading}),this.skipStandbyResult=(0,Dm.G)({loading:!1,data:void 0,error:void 0,networkStatus:Mm.pT.ready}),this.toQueryResultCache=new(d.et?WeakMap:Map),_m(t,ym.Query);var o=n&&n.result,i=o&&o.data;i&&(this.previousData=i)}return e.prototype.forceUpdateState=function(){!1!==globalThis.__DEV__&&l.V1.warn(51)},e.prototype.executeQuery=function(e){var t,n=this;e.query&&Object.assign(this,{query:e.query}),this.watchQueryOptions=this.createWatchQueryOptions(this.queryHookOptions=e);var r=this.observable.reobserveAsConcast(this.getObsQueryOptions());return this.previousData=(null===(t=this.result)||void 0===t?void 0:t.data)||this.previousData,this.result=void 0,this.forceUpdate(),new Promise((function(e){var t;r.subscribe({next:function(e){t=e},error:function(){e(n.toQueryResult(n.observable.getCurrentResult()))},complete:function(){e(n.toQueryResult(t))}})}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=c.useContext(p()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=Tm(c.useCallback((function(e){if(t.renderPromises)return function(){};t.forceUpdate=e;var r=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&(0,Im.L)(e.data,r.data)||t.setResult(r)},o=function(e){if(i.unsubscribe(),i=n.resubscribeAfterError(r,o),!Um.call(e,"graphQLErrors"))throw e;var s=t.result;(!s||s&&s.loading||!(0,Im.L)(e,s.error))&&t.setResult({data:s&&s.data,error:e,loading:!1,networkStatus:Mm.pT.error})},i=n.subscribe(r,o);return function(){setTimeout((function(){return i.unsubscribe()})),t.forceUpdate=function(){return t.forceUpdateState()}}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));return this.unsafeHandlePartialRefetch(r),this.toQueryResult(r)},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;(0,Im.L)(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push((0,Fm.o)(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(Rm.l)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,(0,a.Tt)(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var i=o.fetchPolicy,s=void 0===i?this.getDefaultFetchPolicy():i,l=o.initialFetchPolicy,c=void 0===l?s:l;Object.assign(o,{initialFetchPolicy:c,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=c.useMemo((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e,t)},e.prototype.handleErrorOrCompleted=function(e,t){var n=this;if(!e.loading){var r=this.toApolloError(e);Promise.resolve().then((function(){r?n.onError(r):e.data&&(null===t||void 0===t?void 0:t.networkStatus)!==e.networkStatus&&e.networkStatus===Mm.pT.ready&&n.onCompleted(e.data)})).catch((function(e){!1!==globalThis.__DEV__&&l.V1.warn(e)}))}},e.prototype.toApolloError=function(e){return(0,Lm.E)(e.errors)?new Am.K4({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,(0,a.Tt)(e,["data","partial"]));return this.toQueryResultCache.set(e,t=(0,a.Cl)((0,a.Cl)((0,a.Cl)({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&(0,Lm.E)(e.errors)&&(t.error=new Am.K4({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:Mm.pT.refetch}),this.observable.refetch())},e}();function Vm(e){var t=e.children,n=Gm(e.query,(0,a.Tt)(e,["children","query"]));return n?t(n):null}Vm.propTypes={client:hu.object,children:hu.func.isRequired,fetchPolicy:hu.string,notifyOnNetworkStatusChange:hu.bool,onCompleted:hu.func,onError:hu.func,pollInterval:hu.number,query:hu.object.isRequired,variables:hu.object,ssr:hu.bool,partialRefetch:hu.bool,returnPartialData:hu.bool};var Hm=function(){return{}},Wm=function(){return!1};function Ym(e){return e.displayName||e.name||"Component"}function Qm(e,t){for(var n={},r=0,o=e.variables;r<o.length;r++){var i=o[r],s=i.variable,a=i.type;if(s.name&&s.name.value){var l=s.name.value,c=t[l];"undefined"===typeof c?"NonNullType"!==a.kind&&(n[l]=void 0):n[l]=c}}return n}var Jm=function(e){function t(t){var n=e.call(this,t)||this;return n.withRef=!1,n.setWrappedInstance=n.setWrappedInstance.bind(n),n}return(0,a.C6)(t,e),t.prototype.getWrappedInstance=function(){return(0,l.V1)(this.withRef,47),this.wrappedInstance},t.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},t}(c.Component);function Km(e,t){var n=Pm(null===t||void 0===t?void 0:t.client);_m(e,ym.Mutation);var r=c.useState({called:!1,loading:!1,client:n}),o=r[0],i=r[1],s=c.useRef({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var l=c.useCallback((function(e){void 0===e&&(e={});var t=s.current,n=t.options,r=t.mutation,o=(0,a.Cl)((0,a.Cl)({},n),{mutation:r}),l=e.client||s.current.client;s.current.result.loading||o.ignoreResults||!s.current.isMounted||i(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:l});var c=++s.current.mutationId,u=(0,Rm.l)(o,e);return l.mutate(u).then((function(t){var n,r,o=t.data,a=t.errors,d=a&&a.length>0?new Am.K4({graphQLErrors:a}):void 0,h=e.onError||(null===(n=s.current.options)||void 0===n?void 0:n.onError);if(d&&h&&h(d,u),c===s.current.mutationId&&!u.ignoreResults){var p={called:!0,loading:!1,data:o,error:d,client:l};s.current.isMounted&&!(0,Im.L)(s.current.result,p)&&i(s.current.result=p)}var f=e.onCompleted||(null===(r=s.current.options)||void 0===r?void 0:r.onCompleted);return d||null===f||void 0===f||f(t.data,u),t})).catch((function(t){var n;if(c===s.current.mutationId&&s.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:l};(0,Im.L)(s.current.result,r)||i(s.current.result=r)}var o=e.onError||(null===(n=s.current.options)||void 0===n?void 0:n.onError);if(o)return o(t,u),{data:void 0,errors:t};throw t}))}),[]),u=c.useCallback((function(){if(s.current.isMounted){var e={called:!1,loading:!1,client:n};Object.assign(s.current,{mutationId:0,result:e}),i(e)}}),[]);return c.useEffect((function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}}),[]),[l,(0,a.Cl)({reset:u},o)]}function Xm(e){var t=Km(e.mutation,e),n=t[0],r=t[1];return e.children?e.children(n,r):null}function Zm(e){var t=function(e,t){var n=c.useRef(!1),r=Pm(null===t||void 0===t?void 0:t.client);_m(e,ym.Subscription);var o=c.useState({loading:!(null===t||void 0===t?void 0:t.skip),error:void 0,data:void 0,variables:null===t||void 0===t?void 0:t.variables}),i=o[0],s=o[1];n.current||(n.current=!0,(null===t||void 0===t?void 0:t.onSubscriptionData)&&!1!==globalThis.__DEV__&&l.V1.warn(t.onData?52:53),(null===t||void 0===t?void 0:t.onSubscriptionComplete)&&!1!==globalThis.__DEV__&&l.V1.warn(t.onComplete?54:55));var a=c.useState((function(){return(null===t||void 0===t?void 0:t.skip)?null:r.subscribe({query:e,variables:null===t||void 0===t?void 0:t.variables,fetchPolicy:null===t||void 0===t?void 0:t.fetchPolicy,context:null===t||void 0===t?void 0:t.context})})),u=a[0],d=a[1],h=c.useRef(!1);c.useEffect((function(){return function(){h.current=!0}}),[]);var p=c.useRef({client:r,subscription:e,options:t});return c.useEffect((function(){var n,o,i,a,l=null===t||void 0===t?void 0:t.shouldResubscribe;"function"===typeof l&&(l=!!l(t)),(null===t||void 0===t?void 0:t.skip)?(!(null===t||void 0===t?void 0:t.skip)!==!(null===(n=p.current.options)||void 0===n?void 0:n.skip)||h.current)&&(s({loading:!1,data:void 0,error:void 0,variables:null===t||void 0===t?void 0:t.variables}),d(null),h.current=!1):(!1===l||r===p.current.client&&e===p.current.subscription&&(null===t||void 0===t?void 0:t.fetchPolicy)===(null===(o=p.current.options)||void 0===o?void 0:o.fetchPolicy)&&!(null===t||void 0===t?void 0:t.skip)===!(null===(i=p.current.options)||void 0===i?void 0:i.skip)&&(0,Im.L)(null===t||void 0===t?void 0:t.variables,null===(a=p.current.options)||void 0===a?void 0:a.variables))&&!h.current||(s({loading:!0,data:void 0,error:void 0,variables:null===t||void 0===t?void 0:t.variables}),d(r.subscribe({query:e,variables:null===t||void 0===t?void 0:t.variables,fetchPolicy:null===t||void 0===t?void 0:t.fetchPolicy,context:null===t||void 0===t?void 0:t.context})),h.current=!1),Object.assign(p.current,{client:r,subscription:e,options:t})}),[r,e,t,h.current]),c.useEffect((function(){if(u){var e=!1,n=u.subscribe({next:function(n){var o,i;if(!e){var a={loading:!1,data:n.data,error:void 0,variables:null===t||void 0===t?void 0:t.variables};s(a),(null===(o=p.current.options)||void 0===o?void 0:o.onData)?p.current.options.onData({client:r,data:a}):(null===(i=p.current.options)||void 0===i?void 0:i.onSubscriptionData)&&p.current.options.onSubscriptionData({client:r,subscriptionData:a})}},error:function(n){var r,o;e||(s({loading:!1,data:void 0,error:n,variables:null===t||void 0===t?void 0:t.variables}),null===(o=null===(r=p.current.options)||void 0===r?void 0:r.onError)||void 0===o||o.call(r,n))},complete:function(){var t,n;e||((null===(t=p.current.options)||void 0===t?void 0:t.onComplete)?p.current.options.onComplete():(null===(n=p.current.options)||void 0===n?void 0:n.onSubscriptionComplete)&&p.current.options.onSubscriptionComplete())}});return function(){e=!0,setTimeout((function(){n.unsubscribe()}))}}}),[u]),i}(e.subscription,e);return e.children&&t?e.children(t):null}function eg(e,t){switch(void 0===t&&(t={}),jm(e).type){case ym.Mutation:return function(e,t){void 0===t&&(t={});var n=jm(e),r=t.options,o=void 0===r?Hm:r,i=t.alias,s=void 0===i?"Apollo":i,l=o;return"function"!==typeof l&&(l=function(){return o}),function(r){var o="".concat(s,"(").concat(Ym(r),")"),i=function(i){function s(){return null!==i&&i.apply(this,arguments)||this}return(0,a.C6)(s,i),s.prototype.render=function(){var o=this.props,i=l(o);return t.withRef&&(this.withRef=!0,o=Object.assign({},o,{ref:this.setWrappedInstance})),!i.variables&&n.variables.length>0&&(i.variables=Qm(n,o)),c.createElement(Xm,(0,a.Cl)({ignoreResults:!0},i,{mutation:e}),(function(e,n){var i,s,l=n.data,u=(0,a.Tt)(n,["data"]),d=Object.assign(u,l||{}),h=t.name||"mutate",p=t.name?"".concat(h,"Result"):"result",f=((i={})[h]=e,i[p]=d,i);if(t.props){var m=((s={})[h]=e,s[p]=d,s.ownProps=o,s);f=t.props(m)}return c.createElement(r,(0,a.Cl)({},o,f))}))},s.displayName=o,s.WrappedComponent=r,s}(Jm);return km(i,r,{})}}(e,t);case ym.Subscription:return function(e,t){void 0===t&&(t={});var n=jm(e),r=t.options,o=void 0===r?Hm:r,i=t.skip,s=void 0===i?Wm:i,l=t.alias,u=void 0===l?"Apollo":l,d=t.shouldResubscribe,h=o;"function"!==typeof h&&(h=function(){return o});var p,f=s;return"function"!==typeof f&&(f=function(){return s}),function(r){var o="".concat(u,"(").concat(Ym(r),")"),i=function(i){function s(e){var t=i.call(this,e)||this;return t.state={resubscribe:!1},t}return(0,a.C6)(s,i),s.prototype.updateResubscribe=function(e){this.setState({resubscribe:e})},s.prototype.componentDidUpdate=function(e){var t=!(!d||!d(e,this.props));this.state.resubscribe!==t&&this.updateResubscribe(t)},s.prototype.render=function(){var i=this,s=this.props,l=f(s),u=l?Object.create(null):h(s);return!l&&!u.variables&&n.variables.length>0&&(u.variables=Qm(n,s)),c.createElement(Zm,(0,a.Cl)({},u,{displayName:o,skip:l,subscription:e,shouldResubscribe:this.state.resubscribe}),(function(e){var n,o,u=e.data,d=(0,a.Tt)(e,["data"]);if(t.withRef&&(i.withRef=!0,s=Object.assign({},s,{ref:i.setWrappedInstance})),l)return c.createElement(r,(0,a.Cl)({},s,{}));var h=Object.assign(d,u||{}),f=t.name||"data",m=((n={})[f]=h,n);if(t.props){var g=((o={})[f]=h,o.ownProps=s,o);m=p=t.props(g,p)}return c.createElement(r,(0,a.Cl)({},s,m))}))},s.displayName=o,s.WrappedComponent=r,s}(Jm);return km(i,r,{})}}(e,t);case ym.Query:default:return function(e,t){void 0===t&&(t={});var n=jm(e),r=t.options,o=void 0===r?Hm:r,i=t.skip,s=void 0===i?Wm:i,l=t.alias,u=void 0===l?"Apollo":l,d=o;"function"!==typeof d&&(d=function(){return o});var h,p=s;return"function"!==typeof p&&(p=function(){return s}),function(r){var o="".concat(u,"(").concat(Ym(r),")"),i=function(i){function s(){return null!==i&&i.apply(this,arguments)||this}return(0,a.C6)(s,i),s.prototype.render=function(){var i=this,s=this.props,l=p(s),u=l?Object.create(null):(0,a.Cl)({},d(s));return!l&&!u.variables&&n.variables.length>0&&(u.variables=Qm(n,s)),c.createElement(Vm,(0,a.Cl)({},u,{displayName:o,skip:l,query:e}),(function(e){e.client;var n,o,u=e.data,d=(0,a.Tt)(e,["client","data"]);if(t.withRef&&(i.withRef=!0,s=Object.assign({},s,{ref:i.setWrappedInstance})),l)return c.createElement(r,(0,a.Cl)({},s,{}));var p=Object.assign(d,u||{}),f=t.name||"data",m=((n={})[f]=p,n);if(t.props){var g=((o={})[f]=p,o.ownProps=s,o);m=h=t.props(g,h)}return c.createElement(r,(0,a.Cl)({},s,m))}))},s.displayName=o,s.WrappedComponent=r,s}(Jm);return km(i,r,{})}}(e,t)}}Xm.propTypes={mutation:hu.object.isRequired,variables:hu.object,optimisticResponse:hu.oneOfType([hu.object,hu.func]),refetchQueries:hu.oneOfType([hu.arrayOf(hu.oneOfType([hu.string,hu.object])),hu.func]),awaitRefetchQueries:hu.bool,update:hu.func,children:hu.func.isRequired,onCompleted:hu.func,onError:hu.func,fetchPolicy:hu.string},Zm.propTypes={subscription:hu.object.isRequired,variables:hu.object,children:hu.func,onSubscriptionData:hu.func,onData:hu.func,onSubscriptionComplete:hu.func,onComplete:hu.func,shouldResubscribe:hu.oneOfType([hu.func,hu.bool])};var tg=n(4333),ng=n.n(tg);const rg=w.J1`
  query ($schoolId: ID!) {
    teachers(schoolId: $schoolId) {
      id
      firstName
      lastName
      email
      currentClasses {
        id
        label
        grades {
          id
          order
        }
      }
      survey {
        id
        completed
        allocatedClasses {
          id
          label
        }
        updatedAt
        expired
        restricted
      }
    }
  }
`,og=w.J1`
  query ($schoolId: ID!) {
    teachers(schoolId: $schoolId) {
      id
      firstName
      lastName
      email
      currentClasses {
        id
        label
        grades {
          id
          order
        }
      }
    }
  }
`,ig=w.J1`
  query ($schoolId: ID!) {
    teachers(schoolId: $schoolId) {
      firstName
      lastName
      id
    }
  }
`,sg=w.J1`
  query get($id: ID, $email: String, $schoolId: ID) {
    teacher(id: $id, email: $email, schoolId: $schoolId) {
      email
      firstName
      id
      schoolId
      lastName
      currentClasses {
        id
        label
      }
      active
    }
  }
`,ag=w.J1`
  query get($id: ID, $email: String, $schoolId: ID) {
    teacher(id: $id, email: $email, schoolId: $schoolId) {
      id
      survey {
        url
      }
    }
  }
`,lg=w.J1`
  mutation ($schoolId: ID!, $completed: Boolean!) {
    closeOrOpenAllSurveys(schoolId: $schoolId, completed: $completed) {
      totalUpdated
    }
  }
`,cg=w.J1`
  mutation ($surveyCloseOpenParams: SurveyCloseOpenParams!) {
    closeOrOpenSurvey(surveyCloseOpenParams: $surveyCloseOpenParams) {
      id
      teacherId
      completed
    }
  }
`,ug=w.J1`
  mutation createOrUpdateTeacher($teacherParams: TeacherParams) {
    createOrUpdateTeacher(teacher: $teacherParams) {
      id
    }
  }
`,dg=w.J1`
  mutation (
    $schoolId: ID!
    $message: String!
    $classAssignments: [ClassAssignment!]!
    $ccList: [String!]
    $restricted: Boolean!
    $sendNotification: Boolean
  ) {
    inviteTeachersToSurveys(
      message: $message
      classAssignments: $classAssignments
      ccList: $ccList
      schoolId: $schoolId
      restricted: $restricted
      sendNotification: $sendNotification
    ) {
      id
    }
  }
`,hg=w.J1`
  mutation ($id: ID!) {
    deleteTeacher(id: $id) {
      id
    }
  }
`,pg=w.J1`
  mutation ($schoolId: ID!, $file: Upload!) {
    bulkUploadTeachers(schoolId: $schoolId, file: $file) {
      id
      status
    }
  }
`,fg=w.J1`
  mutation ($schoolId: ID!) {
    deactivateAllTeachers(schoolId: $schoolId)
  }
`,mg=w.J1`
  query ($schoolId: ID!) {
    newClasses(schoolId: $schoolId) {
      id
      label
      maxClassSize
      maxSizePerGrade {
        grade {
          id
          label
          code
        }
        max
      }
      schoolGrades {
        id
        code
        order
        label
      }
      teachers {
        id
        firstName
        lastName
      }
      solution {
        id
      }
      studentCount {
        total
        studentCountPerGrade {
          grade {
            id
          }
          count
        }
      }
      entryCriteriaStudentAttribute {
        attribute
        value
      }
      entryCriteriaCharacteristicResponse {
        characteristicResponse {
          id
          label
          characteristic {
            id
            name
          }
          value
        }
      }
      entryCriteriaNullResponse {
        characteristic {
          id
          name
        }
      }
    }
  }
`,gg=(w.J1`
  query ($schoolId: ID!) {
    currentClasses(schoolId: $schoolId) {
      id
      label
      grades {
        id
        code
      }
    }
  }
`,w.J1`
  query ($schoolId: ID!) {
    activeCurrentClasses(schoolId: $schoolId) {
      id
      label
      studentCount
      grades {
        id
        code
        order
      }
    }
  }
`),vg=(w.J1`
  query ($schoolId: ID!) {
    schoolGrades(schoolId: $schoolId) {
      id
      code
      label
      order
    }
  }
`,w.J1`
  query ($schoolId: ID!, $includeNew: Boolean, $includeLeaving: Boolean) {
    newSchoolGrades(
      schoolId: $schoolId
      includeNew: $includeNew
      includeLeaving: $includeLeaving
    ) {
      id
      code
      label
      order
    }
  }
`),yg=w.J1`
  query ($schoolId: ID!, $includeNew: Boolean, $includeLeaving: Boolean) {
    currentSchoolGrades(
      schoolId: $schoolId
      includeNew: $includeNew
      includeLeaving: $includeLeaving
    ) {
      id
      code
      order
      label
      defaultNewGrade {
        __typename
        ... on SchoolGrade {
          id
          label
          code
          order
        }
        ... on SchoolGradesByGender {
          maleGrade {
            id
            label
            code
            order
          }
          femaleGrade {
            id
            label
            code
            order
          }
          nonBinaryGrade {
            id
            label
            code
            order
          }
        }
      }
    }
  }
`,bg=w.J1`
  query ($schoolId: ID!) {
    activeSchoolGrades(schoolId: $schoolId) {
      id
      code
      order
      label
    }
  }
`,xg=w.J1`
  query ($schoolId: ID!) {
    activeNewSchoolGrades(schoolId: $schoolId) {
      id
      code
      order
      label
    }
  }
`,wg=w.J1`
  query ($schoolId: ID!) {
    schoolGradesWithSolutions(schoolId: $schoolId) {
      id
      code
      order
    }
  }
`,Sg=w.J1`
  mutation ($schoolGradeParams: SchoolGradeParams!) {
    createOrUpdateSchoolGrades(schoolGradeParams: $schoolGradeParams) {
      id
      code
      label
    }
  }
`,Cg=w.J1`
  mutation createOrUpdateNewClass($newClassParams: NewClassParams!) {
    createOrUpdateNewClass(newClassParams: $newClassParams) {
      id
    }
  }
`,jg=w.J1`
  mutation createOrUpdateCurrentClass(
    $currentClassParams: CurrentClassParams!
  ) {
    createOrUpdateCurrentClass(currentClassParams: $currentClassParams) {
      id
    }
  }
`,_g=w.J1`
  mutation swapNewClassLabels($swapClassesParams: SwapClassesParams!) {
    swapNewClassLabels(swapClassesParams: $swapClassesParams) {
      id
    }
  }
`,kg=w.J1`
  mutation ($id: ID!) {
    deleteNewClass(id: $id) {
      id
    }
  }
`,Ng=w.J1`
  mutation deleteAllNewClasses($schoolId: ID!) {
    deleteAllNewClasses(schoolId: $schoolId)
  }
`;var Eg=["className","cssModule","tag"],Tg={tag:Pu,className:pu().string,cssModule:pu().object},Og=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=lu(e,Eg),s=Eu(ju()(t,"modal-body"),n);return o.createElement(r,au({},i,{className:s}))};Og.propTypes=Tg,Og.defaultProps={tag:"div"};const Ig=Og;var Rg=["className","cssModule","noGutters","tag","form","widths"],Ag=pu().oneOfType([pu().number,pu().string]),Mg={tag:Pu,noGutters:pu().bool,className:pu().string,cssModule:pu().object,form:pu().bool,xs:Ag,sm:Ag,md:Ag,lg:Ag,xl:Ag},Pg={tag:"div",widths:["xs","sm","md","lg","xl"]},Dg=function(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,s=e.form,a=e.widths,l=lu(e,Rg),c=[];a.forEach((function(t,n){var r=e[t];if(delete l[t],r){var o=!n;c.push(o?"row-cols-"+r:"row-cols-"+t+"-"+r)}}));var u=Eu(ju()(t,r?"no-gutters":null,s?"form-row":"row",c),n);return o.createElement(i,au({},l,{className:u}))};Dg.propTypes=Mg,Dg.defaultProps=Pg;const Fg=Dg;var Lg=["className","cssModule","row","disabled","check","inline","tag"],Bg={children:pu().node,row:pu().bool,check:pu().bool,inline:pu().bool,disabled:pu().bool,tag:Pu,className:pu().string,cssModule:pu().object},Ug=function(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,s=e.check,a=e.inline,l=e.tag,c=lu(e,Lg),u=Eu(ju()(t,!!r&&"row",s?"form-check":"form-group",!(!s||!a)&&"form-check-inline",!(!s||!i)&&"disabled"),n);return"fieldset"===l&&(c.disabled=i),o.createElement(l,au({},c,{className:u}))};Ug.propTypes=Bg,Ug.defaultProps={tag:"div"};const Gg=Ug;var $g=["className","cssModule","hidden","widths","tag","check","size","for"],qg=pu().oneOfType([pu().number,pu().string]),zg=pu().oneOfType([pu().bool,pu().string,pu().number,pu().shape({size:qg,order:qg,offset:qg})]),Vg={children:pu().node,hidden:pu().bool,check:pu().bool,size:pu().string,for:pu().string,tag:Pu,className:pu().string,cssModule:pu().object,xs:zg,sm:zg,md:zg,lg:zg,xl:zg,widths:pu().array},Hg={tag:"label",widths:["xs","sm","md","lg","xl"]},Wg=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},Yg=function(e){var t=e.className,n=e.cssModule,r=e.hidden,i=e.widths,s=e.tag,a=e.check,l=e.size,c=e.for,u=lu(e,$g),d=[];i.forEach((function(t,r){var o=e[t];if(delete u[t],o||""===o){var i,s=!r;if($u(o)){var a,l=s?"-":"-"+t+"-";i=Wg(s,t,o.size),d.push(Eu(ju()(((a={})[i]=o.size||""===o.size,a["order"+l+o.order]=o.order||0===o.order,a["offset"+l+o.offset]=o.offset||0===o.offset,a))),n)}else i=Wg(s,t,o),d.push(i)}}));var h=Eu(ju()(t,!!r&&"sr-only",!!a&&"form-check-label",!!l&&"col-form-label-"+l,d,!!d.length&&"col-form-label"),n);return o.createElement(s,au({htmlFor:c},u,{className:h}))};Yg.propTypes=Vg,Yg.defaultProps=Hg;const Qg=Yg;var Jg=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],Kg={children:pu().node,type:pu().string,size:pu().oneOfType([pu().number,pu().string]),bsSize:pu().string,valid:pu().bool,invalid:pu().bool,tag:Pu,innerRef:pu().oneOfType([pu().object,pu().func,pu().string]),plaintext:pu().bool,addon:pu().bool,className:pu().string,cssModule:pu().object},Xg=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(cu(n)),n.focus=n.focus.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.focus=function(){this.ref&&this.ref.focus()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,r=e.type,i=e.bsSize,s=e.valid,a=e.invalid,l=e.tag,c=e.addon,u=e.plaintext,d=e.innerRef,h=lu(e,Jg),p=["radio","checkbox"].indexOf(r)>-1,f=new RegExp("\\D","g"),m=l||("select"===r||"textarea"===r?r:"input"),g="form-control";u?(g+="-plaintext",m=l||"input"):"file"===r?g+="-file":"range"===r?g+="-range":p&&(g=c?null:"form-check-input"),h.size&&f.test(h.size)&&(Iu('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),i=h.size,delete h.size);var v=Eu(ju()(t,a&&"is-invalid",s&&"is-valid",!!i&&"form-control-"+i,g),n);return("input"===m||l&&"function"===typeof l)&&(h.type=r),h.children&&!u&&"select"!==r&&"string"===typeof m&&"select"!==m&&(Iu('Input with a type of "'+r+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete h.children),o.createElement(m,au({},h,{ref:d,className:v,"aria-invalid":a}))},t}(o.Component);Xg.propTypes=Kg,Xg.defaultProps={type:"text"};const Zg=Xg;var ev=["className","cssModule","tag","size"],tv={tag:Pu,size:pu().string,className:pu().string,cssModule:pu().object},nv=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.size,s=lu(e,ev),a=Eu(ju()(t,"input-group",i?"input-group-"+i:null),n);return o.createElement(r,au({},s,{className:a}))};nv.propTypes=tv,nv.defaultProps={tag:"div"};const rv=nv;var ov=["className","cssModule","size","vertical","tag"],iv={tag:Pu,"aria-label":pu().string,className:pu().string,cssModule:pu().object,role:pu().string,size:pu().string,vertical:pu().bool},sv=function(e){var t=e.className,n=e.cssModule,r=e.size,i=e.vertical,s=e.tag,a=lu(e,ov),l=Eu(ju()(t,!!r&&"btn-group-"+r,i?"btn-group-vertical":"btn-group"),n);return o.createElement(s,au({},a,{className:l}))};sv.propTypes=iv,sv.defaultProps={tag:"div",role:"group"};const av=sv;function lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lv(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dv(e,t){if(e){if("string"===typeof e)return uv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uv(e,t):void 0}}function hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||dv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pv(e,t){if(null==e)return{};var n,r,o=lu(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fv=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mv(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,s=e.defaultValue,a=void 0===s?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,h=e.onMenuClose,p=e.onMenuOpen,f=e.value,m=pv(e,fv),g=hv((0,o.useState)(void 0!==l?l:n),2),v=g[0],y=g[1],b=hv((0,o.useState)(void 0!==c?c:i),2),x=b[0],w=b[1],S=hv((0,o.useState)(void 0!==f?f:a),2),C=S[0],j=S[1],_=(0,o.useCallback)((function(e,t){"function"===typeof u&&u(e,t),j(e)}),[u]),k=(0,o.useCallback)((function(e,t){var n;"function"===typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),N=(0,o.useCallback)((function(){"function"===typeof p&&p(),w(!0)}),[p]),E=(0,o.useCallback)((function(){"function"===typeof h&&h(),w(!1)}),[h]),T=void 0!==l?l:v,O=void 0!==c?c:x,I=void 0!==f?f:C;return cv(cv({},m),{},{inputValue:T,menuIsOpen:O,onChange:_,onInputChange:k,onMenuClose:E,onMenuOpen:N,value:I})}function gv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mu(r.key),r)}}function vv(e){return vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vv(e)}function yv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yv=function(){return!!e})()}function bv(e){var t=yv();return function(){var n,r=vv(e);if(t){var o=vv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===fu(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cu(e)}(this,n)}}function xv(e){return function(e){if(Array.isArray(e))return uv(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wv=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(BK){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Sv=Math.abs,Cv=String.fromCharCode,jv=Object.assign;function _v(e){return e.trim()}function kv(e,t,n){return e.replace(t,n)}function Nv(e,t){return e.indexOf(t)}function Ev(e,t){return 0|e.charCodeAt(t)}function Tv(e,t,n){return e.slice(t,n)}function Ov(e){return e.length}function Iv(e){return e.length}function Rv(e,t){return t.push(e),e}var Av=1,Mv=1,Pv=0,Dv=0,Fv=0,Lv="";function Bv(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Av,column:Mv,length:s,return:""}}function Uv(e,t){return jv(Bv("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gv(){return Fv=Dv>0?Ev(Lv,--Dv):0,Mv--,10===Fv&&(Mv=1,Av--),Fv}function $v(){return Fv=Dv<Pv?Ev(Lv,Dv++):0,Mv++,10===Fv&&(Mv=1,Av++),Fv}function qv(){return Ev(Lv,Dv)}function zv(){return Dv}function Vv(e,t){return Tv(Lv,e,t)}function Hv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Wv(e){return Av=Mv=1,Pv=Ov(Lv=e),Dv=0,[]}function Yv(e){return Lv="",e}function Qv(e){return _v(Vv(Dv-1,Xv(91===e?e+2:40===e?e+1:e)))}function Jv(e){for(;(Fv=qv())&&Fv<33;)$v();return Hv(e)>2||Hv(Fv)>3?"":" "}function Kv(e,t){for(;--t&&$v()&&!(Fv<48||Fv>102||Fv>57&&Fv<65||Fv>70&&Fv<97););return Vv(e,zv()+(t<6&&32==qv()&&32==$v()))}function Xv(e){for(;$v();)switch(Fv){case e:return Dv;case 34:case 39:34!==e&&39!==e&&Xv(Fv);break;case 40:41===e&&Xv(e);break;case 92:$v()}return Dv}function Zv(e,t){for(;$v()&&e+Fv!==57&&(e+Fv!==84||47!==qv()););return"/*"+Vv(t,Dv-1)+"*"+Cv(47===e?e:$v())}function ey(e){for(;!Hv(qv());)$v();return Vv(e,Dv)}var ty="-ms-",ny="-moz-",ry="-webkit-",oy="comm",iy="rule",sy="decl",ay="@keyframes";function ly(e,t){for(var n="",r=Iv(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function cy(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case sy:return e.return=e.return||e.value;case oy:return"";case ay:return e.return=e.value+"{"+ly(e.children,r)+"}";case iy:e.value=e.props.join(",")}return Ov(n=ly(e.children,r))?e.return=e.value+"{"+n+"}":""}function uy(e){return Yv(dy("",null,null,null,[""],e=Wv(e),0,[0],e))}function dy(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,h=0,p=0,f=0,m=1,g=1,v=1,y=0,b="",x=o,w=i,S=r,C=b;g;)switch(f=y,y=$v()){case 40:if(108!=f&&58==Ev(C,d-1)){-1!=Nv(C+=kv(Qv(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=Qv(y);break;case 9:case 10:case 13:case 32:C+=Jv(f);break;case 92:C+=Kv(zv()-1,7);continue;case 47:switch(qv()){case 42:case 47:Rv(py(Zv($v(),zv()),t,n),l);break;default:C+="/"}break;case 123*m:a[c++]=Ov(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==v&&(C=kv(C,/\f/g,"")),p>0&&Ov(C)-d&&Rv(p>32?fy(C+";",r,n,d-1):fy(kv(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Rv(S=hy(C,t,n,c,u,o,a,b,x=[],w=[],d),i),123===y)if(0===u)dy(C,t,S,S,x,i,d,a,w);else switch(99===h&&110===Ev(C,3)?100:h){case 100:case 108:case 109:case 115:dy(e,S,S,r&&Rv(hy(e,S,S,0,0,o,a,b,o,x=[],d),w),o,w,d,a,r?x:w);break;default:dy(C,S,S,S,[""],w,0,a,w)}}c=u=p=0,m=v=1,b=C="",d=s;break;case 58:d=1+Ov(C),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==Gv())continue;switch(C+=Cv(y),y*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(Ov(C)-1)*v,v=1;break;case 64:45===qv()&&(C+=Qv($v())),h=qv(),u=d=Ov(b=C+=ey(zv())),y++;break;case 45:45===f&&2==Ov(C)&&(m=0)}}return i}function hy(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,h=0===o?i:[""],p=Iv(h),f=0,m=0,g=0;f<r;++f)for(var v=0,y=Tv(e,d+1,d=Sv(m=s[f])),b=e;v<p;++v)(b=_v(m>0?h[v]+" "+y:kv(y,/&\f/g,h[v])))&&(l[g++]=b);return Bv(e,t,n,0===o?iy:a,l,c,u)}function py(e,t,n){return Bv(e,t,n,oy,Cv(Fv),Tv(e,2,-2),0)}function fy(e,t,n,r){return Bv(e,t,n,sy,Tv(e,0,r),Tv(e,r+1,-1),r)}var my=function(e,t,n){for(var r=0,o=0;r=o,o=qv(),38===r&&12===o&&(t[n]=1),!Hv(o);)$v();return Vv(e,Dv)},gy=function(e,t){return Yv(function(e,t){var n=-1,r=44;do{switch(Hv(r)){case 0:38===r&&12===qv()&&(t[n]=1),e[n]+=my(Dv-1,t,n);break;case 2:e[n]+=Qv(r);break;case 4:if(44===r){e[++n]=58===qv()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Cv(r)}}while(r=$v());return e}(Wv(e),t))},vy=new WeakMap,yy=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||vy.get(n))&&!r){vy.set(e,!0);for(var o=[],i=gy(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},by=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function xy(e,t){switch(function(e,t){return 45^Ev(e,0)?(((t<<2^Ev(e,0))<<2^Ev(e,1))<<2^Ev(e,2))<<2^Ev(e,3):0}(e,t)){case 5103:return ry+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ry+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ry+e+ny+e+ty+e+e;case 6828:case 4268:return ry+e+ty+e+e;case 6165:return ry+e+ty+"flex-"+e+e;case 5187:return ry+e+kv(e,/(\w+).+(:[^]+)/,ry+"box-$1$2"+ty+"flex-$1$2")+e;case 5443:return ry+e+ty+"flex-item-"+kv(e,/flex-|-self/,"")+e;case 4675:return ry+e+ty+"flex-line-pack"+kv(e,/align-content|flex-|-self/,"")+e;case 5548:return ry+e+ty+kv(e,"shrink","negative")+e;case 5292:return ry+e+ty+kv(e,"basis","preferred-size")+e;case 6060:return ry+"box-"+kv(e,"-grow","")+ry+e+ty+kv(e,"grow","positive")+e;case 4554:return ry+kv(e,/([^-])(transform)/g,"$1"+ry+"$2")+e;case 6187:return kv(kv(kv(e,/(zoom-|grab)/,ry+"$1"),/(image-set)/,ry+"$1"),e,"")+e;case 5495:case 3959:return kv(e,/(image-set\([^]*)/,ry+"$1$`$1");case 4968:return kv(kv(e,/(.+:)(flex-)?(.*)/,ry+"box-pack:$3"+ty+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ry+e+e;case 4095:case 3583:case 4068:case 2532:return kv(e,/(.+)-inline(.+)/,ry+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ov(e)-1-t>6)switch(Ev(e,t+1)){case 109:if(45!==Ev(e,t+4))break;case 102:return kv(e,/(.+:)(.+)-([^]+)/,"$1"+ry+"$2-$3$1"+ny+(108==Ev(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Nv(e,"stretch")?xy(kv(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ev(e,t+1))break;case 6444:switch(Ev(e,Ov(e)-3-(~Nv(e,"!important")&&10))){case 107:return kv(e,":",":"+ry)+e;case 101:return kv(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ry+(45===Ev(e,14)?"inline-":"")+"box$3$1"+ry+"$2$3$1"+ty+"$2box$3")+e}break;case 5936:switch(Ev(e,t+11)){case 114:return ry+e+ty+kv(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ry+e+ty+kv(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ry+e+ty+kv(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ry+e+ty+e+e}return e}var wy=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case sy:e.return=xy(e.value,e.length);break;case ay:return ly([Uv(e,{value:kv(e.value,"@","@"+ry)})],r);case iy:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ly([Uv(e,{props:[kv(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ly([Uv(e,{props:[kv(t,/:(plac\w+)/,":"+ry+"input-$1")]}),Uv(e,{props:[kv(t,/:(plac\w+)/,":-moz-$1")]}),Uv(e,{props:[kv(t,/:(plac\w+)/,ty+"input-$1")]})],r)}return""}))}}],Sy=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||wy;var o,i,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,c,u=[cy,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=Iv(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}([yy,by].concat(r,u));i=function(e,t,n,r){l=n,function(e){ly(uy(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new wv({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h};var Cy=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var jy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_y=n(918),ky=/[A-Z]|^ms/g,Ny=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ey=function(e){return 45===e.charCodeAt(1)},Ty=function(e){return null!=e&&"boolean"!==typeof e},Oy=(0,_y.A)((function(e){return Ey(e)?e:e.replace(ky,"-$&").toLowerCase()})),Iy=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(Ny,(function(e,t,n){return Ay={name:t,styles:n,next:Ay},t}))}return 1===jy[e]||Ey(e)||"number"!==typeof t||0===t?t:t+"px"};function Ry(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ay={name:n.name,styles:n.styles,next:Ay},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Ay={name:r.name,styles:r.styles,next:Ay},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ry(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!==typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":Ty(s)&&(r+=Oy(i)+":"+Iy(i,s)+";");else if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=Ry(e,t,s);switch(i){case"animation":case"animationName":r+=Oy(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var l=0;l<s.length;l++)Ty(s[l])&&(r+=Oy(i)+":"+Iy(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Ay,i=n(e);return Ay=o,Ry(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var Ay,My=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Py=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ay=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ry(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=Ry(n,t,e[s]),r&&(o+=i[s]);My.lastIndex=0;for(var a,l="";null!==(a=My.exec(o));)l+="-"+a[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Ay}},Dy=!!i.useInsertionEffect&&i.useInsertionEffect,Fy=Dy||function(e){return e()},Ly=(Dy||o.useLayoutEffect,{}.hasOwnProperty),By=o.createContext("undefined"!==typeof HTMLElement?Sy({key:"css"}):null);By.Provider;var Uy=function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(By);return e(t,r,n)}))};var Gy=o.createContext({});var $y="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qy=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Cy(t,n,r),Fy((function(){return function(e,t,n){Cy(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},zy=Uy((function(e,t,n){var r=e.css;"string"===typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[$y],s=[r],a="";"string"===typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,s,e.className):null!=e.className&&(a=e.className+" ");var l=Py(s,void 0,o.useContext(Gy));a+=t.key+"-"+l.name;var c={};for(var u in e)Ly.call(e,u)&&"css"!==u&&u!==$y&&(c[u]=e[u]);return c.ref=n,c.className=a,o.createElement(o.Fragment,null,o.createElement(qy,{cache:t,serialized:l,isStringTag:"string"===typeof i}),o.createElement(i,c))}));var Vy=zy,Hy=function(e,t){var n=arguments;if(null==t||!Ly.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Vy,i[1]=function(e,t){var n={};for(var r in t)Ly.call(t,r)&&(n[r]=t[r]);return n[$y]=e,n}(e,t);for(var s=2;s<r;s++)i[s]=n[s];return o.createElement.apply(null,i)};function Wy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Py(t)}const Yy=o.useLayoutEffect;var Qy=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Jy=function(){};function Ky(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Xy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&i.push("".concat(Ky(e,s)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Zy=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===fu(e)&&null!==e?[e]:[];var t},eb=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,cv({},pv(e,Qy))},tb=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,s=e.className;return{css:o(t,e),className:r(null!==n&&void 0!==n?n:{},i(t,e),s)}};function nb(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function rb(e){return nb(e)?window.pageYOffset:e.scrollTop}function ob(e,t){nb(e)?window.scrollTo(0,t):e.scrollTop=t}function ib(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jy,o=rb(e),i=t-o,s=0;!function t(){var a=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(s+=10,o,i,n);ob(e,a),s<n?window.requestAnimationFrame(t):r(e)}()}function sb(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?ob(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&ob(e,Math.max(t.offsetTop-o,0))}function ab(){try{return document.createEvent("TouchEvent"),!0}catch(BK){return!1}}var lb=!1,cb={get passive(){return lb=!0}},ub="undefined"!==typeof window?window:{};ub.addEventListener&&ub.removeEventListener&&(ub.addEventListener("p",Jy,cb),ub.removeEventListener("p",Jy,!1));var db=lb;function hb(e){return null!=e}function pb(e,t,n){return e?t:n}var fb=["children","innerProps"],mb=["children","innerProps"];function gb(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),p=h.bottom,f=h.height,m=h.top,g=n.offsetParent.getBoundingClientRect().top,v=s?window.innerHeight:nb(u=l)?window.innerHeight:u.clientHeight,y=rb(l),b=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=g-x,S=v-m,C=w+y,j=d-y-m,_=p-v+y+b,k=y+m-x,N=160;switch(o){case"auto":case"bottom":if(S>=f)return{placement:"bottom",maxHeight:t};if(j>=f&&!s)return i&&ib(l,_,N),{placement:"bottom",maxHeight:t};if(!s&&j>=r||s&&S>=r)return i&&ib(l,_,N),{placement:"bottom",maxHeight:s?S-b:j-b};if("auto"===o||s){var E=t,T=s?w:C;return T>=r&&(E=Math.min(T-b-a,t)),{placement:"top",maxHeight:E}}if("bottom"===o)return i&&ob(l,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=f)return{placement:"top",maxHeight:t};if(C>=f&&!s)return i&&ib(l,k,N),{placement:"top",maxHeight:t};if(!s&&C>=r||s&&w>=r){var O=t;return(!s&&C>=r||s&&w>=r)&&(O=s?w-x:C-x),i&&ib(l,k,N),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var vb,yb=function(e){return"auto"===e?"bottom":e},bb=(0,o.createContext)(null),xb=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,s=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=((0,o.useContext)(bb)||{}).setPortalPlacement,u=(0,o.useRef)(null),d=hv((0,o.useState)(r),2),h=d[0],p=d[1],f=hv((0,o.useState)(null),2),m=f[0],g=f[1],v=l.spacing.controlHeight;return Yy((function(){var e=u.current;if(e){var t="fixed"===s,o=gb({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});p(o.maxHeight),g(o.placement),null===c||void 0===c||c(o.placement)}}),[r,i,s,a,n,c,v]),t({ref:u,placerProps:cv(cv({},e),{},{placement:m||yb(i),maxHeight:h})})},wb=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Hy("div",au({},tb(e,"menu",{menu:!0}),{ref:n},r),t)},Sb=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return cv({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Cb=Sb,jb=Sb,_b=["size"],kb=["innerProps","isRtl","size"];var Nb,Eb,Tb={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ob=function(e){var t=e.size,n=pv(e,_b);return Hy("svg",au({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Tb},n))},Ib=function(e){return Hy(Ob,au({size:20},e),Hy("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Rb=function(e){return Hy(Ob,au({size:20},e),Hy("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ab=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cv({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Mb=Ab,Pb=Ab,Db=function(){var e=Wy.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(vb||(Nb=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Eb||(Eb=Nb.slice(0)),vb=Object.freeze(Object.defineProperties(Nb,{raw:{value:Object.freeze(Eb)}})))),Fb=function(e){var t=e.delay,n=e.offset;return Hy("span",{css:Wy({animation:"".concat(Db," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Lb=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,s=e.menuIsOpen;return Hy("div",au({ref:o},tb(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":s}),i,{"aria-disabled":n||void 0}),t)},Bb=["data"],Ub=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Hy("div",au({},tb(e,"group",{group:!0}),a),Hy(i,au({},s,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),Hy("div",null,t))},Gb=["innerRef","isDisabled","isHidden","inputClassName"],$b={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},qb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":cv({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},$b)},zb=function(e){return cv({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},$b)},Vb=function(e){var t=e.children,n=e.innerProps;return Hy("div",n,t)};var Hb=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,s=e.removeProps,a=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Hy(l,{data:r,innerProps:cv(cv({},tb(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:a},Hy(c,{data:r,innerProps:cv({},tb(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),Hy(u,{data:r,innerProps:cv(cv({},tb(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},Wb=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,s=e.innerProps;return Hy("div",au({},tb(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},s),t)},Yb=function(e){var t=e.children,n=e.innerProps;return Hy("div",au({},tb(e,"placeholder",{placeholder:!0}),n),t)},Qb=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Hy("div",au({},tb(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},Jb={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Hy("div",au({},tb(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Hy(Ib,null))},Control:Lb,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Hy("div",au({},tb(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Hy(Rb,null))},DownChevron:Rb,CrossIcon:Ib,Group:Ub,GroupHeading:function(e){var t=eb(e);t.data;var n=pv(t,Bb);return Hy("div",au({},tb(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Hy("div",au({},tb(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Hy("span",au({},t,tb(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=eb(e),o=r.innerRef,i=r.isDisabled,s=r.isHidden,a=r.inputClassName,l=pv(r,Gb);return Hy("div",au({},tb(e,"input",{"input-container":!0}),{"data-value":n||""}),Hy("input",au({className:t({input:!0},a),ref:o,style:zb(s),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=pv(e,kb);return Hy("div",au({},tb(cv(cv({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Hy(Fb,{delay:0,offset:n}),Hy(Fb,{delay:160,offset:!0}),Hy(Fb,{delay:320,offset:!n}))},Menu:wb,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Hy("div",au({},tb(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,s=e.menuPlacement,a=e.menuPosition,l=(0,o.useRef)(null),c=(0,o.useRef)(null),u=hv((0,o.useState)(yb(s)),2),d=u[0],h=u[1],p=(0,o.useMemo)((function(){return{setPortalPlacement:h}}),[]),f=hv((0,o.useState)(null),2),m=f[0],g=f[1],v=(0,o.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[d]+t;n===(null===m||void 0===m?void 0:m.offset)&&e.left===(null===m||void 0===m?void 0:m.rect.left)&&e.width===(null===m||void 0===m?void 0:m.rect.width)||g({offset:n,rect:e})}}),[r,a,d,null===m||void 0===m?void 0:m.offset,null===m||void 0===m?void 0:m.rect.left,null===m||void 0===m?void 0:m.rect.width]);Yy((function(){v()}),[v]);var y=(0,o.useCallback)((function(){"function"===typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=ef(r,l.current,v,{elementResize:"ResizeObserver"in window}))}),[r,v]);Yy((function(){y()}),[y]);var b=(0,o.useCallback)((function(e){l.current=e,y()}),[y]);if(!t&&"fixed"!==a||!m)return null;var x=Hy("div",au({ref:b},tb(cv(cv({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Hy(bb.Provider,{value:p},t?(0,Fl.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=pv(e,mb);return Hy("div",au({},tb(cv(cv({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=pv(e,fb);return Hy("div",au({},tb(cv(cv({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:Hb,MultiValueContainer:Vb,MultiValueLabel:Vb,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Hy("div",au({role:"button"},n),t||Hy(Ib,{size:14}))},Option:Wb,Placeholder:Yb,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Hy("div",au({},tb(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:Qb,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Hy("div",au({},tb(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},Kb=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Xb(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Kb(r)&&Kb(o)))return!1;var r,o;return!0}for(var Zb={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},ex=function(e){return Hy("span",au({css:Zb},e))},tx={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,s=e.selectValue,a=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(i," focused, ").concat(u(s,n),".");if("menu"===t&&c){var d=a?" disabled":"",h="".concat(l?" selected":"").concat(d);return"".concat(i).concat(h,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},nx=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,s=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,f=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,v=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,x=l.tabSelectsValue,w=l.isLoading,S=l["aria-label"],C=l["aria-live"],j=(0,o.useMemo)((function(){return cv(cv({},tx),d||{})}),[d]),_=(0,o.useMemo)((function(){var e,n="";if(t&&j.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?h(c):"",d=o||s||void 0,p=d?d.map(h):[],f=cv({isDisabled:c&&m(c,a),label:u,labels:p},t);n=j.onChange(f)}return n}),[t,j,m,a,h]),k=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&j.onFocus){var s={focused:t,label:h(t),isDisabled:m(t,a),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=j.onFocus(s)}return e}),[n,r,h,m,j,i,a,u]),N=(0,o.useMemo)((function(){var e="";if(v&&y.length&&!w&&j.onFilter){var t=b({count:i.length});e=j.onFilter({inputValue:p,resultsMessage:t})}return e}),[i,p,v,j,y,b,w]),E="initial-input-focus"===(null===t||void 0===t?void 0:t.action),T=(0,o.useMemo)((function(){var e="";if(j.guidance){var t=r?"value":v?"menu":"input";e=j.guidance({"aria-label":S,context:t,isDisabled:n&&m(n,a),isMulti:f,isSearchable:g,tabSelectsValue:x,isInitialFocus:E})}return e}),[S,n,r,f,m,g,v,j,a,x,E]),O=Hy(o.Fragment,null,Hy("span",{id:"aria-selection"},_),Hy("span",{id:"aria-focused"},k),Hy("span",{id:"aria-results"},N),Hy("span",{id:"aria-guidance"},T));return Hy(o.Fragment,null,Hy(ex,{id:c},E&&O),Hy(ex,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!E&&O))},rx=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],ox=new RegExp("["+rx.map((function(e){return e.letters})).join("")+"]","g"),ix={},sx=0;sx<rx.length;sx++)for(var ax=rx[sx],lx=0;lx<ax.letters.length;lx++)ix[ax.letters[lx]]=ax.base;var cx=function(e){return e.replace(ox,(function(e){return ix[e]}))},ux=function(e,t){void 0===t&&(t=Xb);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(cx),dx=function(e){return e.replace(/^\s+|\s+$/g,"")},hx=function(e){return"".concat(e.label," ").concat(e.value)},px=["innerRef"];function fx(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=hv(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=hv(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(pv(e,px),"onExited","in","enter","exit","appear");return Hy("input",au({ref:t},n,{css:Wy({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var mx=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};var gx=["boxSizing","height","overflow","paddingRight","position"],vx={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function yx(e){e.preventDefault()}function bx(e){e.stopPropagation()}function xx(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function wx(){return"ontouchstart"in window||navigator.maxTouchPoints}var Sx=!("undefined"===typeof window||!window.document||!window.document.createElement),Cx=0,jx={capture:!1,passive:!1};var _x=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},kx={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Nx(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,s=e.onTopLeave,a=(0,o.useRef)(!1),l=(0,o.useRef)(!1),c=(0,o.useRef)(0),u=(0,o.useRef)(null),d=(0,o.useCallback)((function(e,t){if(null!==u.current){var o=u.current,c=o.scrollTop,d=o.scrollHeight,h=o.clientHeight,p=u.current,f=t>0,m=d-h-c,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),f&&l.current&&(s&&s(e),l.current=!1),f&&t>m?(n&&!a.current&&n(e),p.scrollTop=d,g=!0,a.current=!0):!f&&-t>c&&(i&&!l.current&&i(e),p.scrollTop=0,g=!0,l.current=!0),g&&mx(e)}}),[n,r,i,s]),h=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,o.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),f=(0,o.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,o.useCallback)((function(e){if(e){var t=!!db&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,h]),g=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,h]);return(0,o.useEffect)((function(){if(t){var e=u.current;return m(e),function(){g(e)}}}),[t,m,g]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),s=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),s=(0,o.useRef)(null),a=(0,o.useCallback)((function(e){if(Sx){var t=document.body,n=t&&t.style;if(r&&gx.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Cx<1){var o=parseInt(i.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+o||0;Object.keys(vx).forEach((function(e){var t=vx[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&wx()&&(t.addEventListener("touchmove",yx,jx),e&&(e.addEventListener("touchstart",xx,jx),e.addEventListener("touchmove",bx,jx))),Cx+=1}}),[r]),l=(0,o.useCallback)((function(e){if(Sx){var t=document.body,n=t&&t.style;Cx=Math.max(Cx-1,0),r&&Cx<1&&gx.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&wx()&&(t.removeEventListener("touchmove",yx,jx),e&&(e.removeEventListener("touchstart",xx,jx),e.removeEventListener("touchmove",bx,jx)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=s.current;return a(e),function(){l(e)}}}),[t,a,l]),function(e){s.current=e}}({isEnabled:n});return Hy(o.Fragment,null,n&&Hy("div",{onClick:_x,css:kx}),t((function(e){i(e),s(e)})))}var Ex={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Tx=function(e){var t=e.name,n=e.onFocus;return Hy("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ex,value:"",onChange:function(){}})};function Ox(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Ix(){return Ox(/^Mac/i)}function Rx(){return Ox(/^iPhone/i)||Ox(/^iPad/i)||Ix()&&navigator.maxTouchPoints>1}var Ax=function(e){return e.label},Mx=function(e){return e.value},Px={clearIndicator:Pb,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,s=o.borderRadius;return cv({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:Mb,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return cv({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cv({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,s=o.colors;return cv(cv({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},qb),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,s=o.spacing.baseUnit;return cv({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*s})},loadingMessage:jb,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,s=o.spacing,a=o.colors;return cv((gu(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),gu(n,"position","absolute"),gu(n,"width","100%"),gu(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return cv({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return cv({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return cv({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,s=e.isFocused;return cv({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:s?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Cb,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,s=i.spacing,a=i.colors;return cv({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?a.primary:r?a.primary25:"transparent",color:n?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return cv({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return cv({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return cv({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var Dx={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Fx={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ab(),captureMenuScroll:!ab(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=cv({ignoreCase:!0,ignoreAccents:!0,stringify:hx,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,s=r.stringify,a=r.trim,l=r.matchFrom,c=a?dx(n):n,u=a?dx(s(t)):s(t);return o&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=ux(c),u=cx(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:Ax,getOptionValue:Mx,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(BK){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Lx(e,t,n,r){return{type:"option",data:t,isDisabled:Hx(e,t,n),isSelected:Wx(e,t,n),label:zx(e,t),value:Vx(e,t),index:r}}function Bx(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Lx(e,n,t,r)})).filter((function(t){return $x(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Lx(e,n,t,r);return $x(e,i)?i:void 0})).filter(hb)}function Ux(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,xv(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Gx(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,xv(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function $x(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!Qx(e)||!i)&&Yx(e,{label:s,value:a,data:o},r)}var qx=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},zx=function(e,t){return e.getOptionLabel(t)},Vx=function(e,t){return e.getOptionValue(t)};function Hx(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Wx(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Vx(e,t);return n.some((function(t){return Vx(e,t)===r}))}function Yx(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Qx=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Jx=1,Kx=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uu(e,t)}(s,e);var t,n,r,i=bv(s);function s(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=i.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=Ix()||Rx(),t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,s=o.isMulti,a=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:a}),i&&(t.setState({inputIsHiddenAfterUpdate:!s}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,s=t.state.selectValue,a=o&&t.isOptionSelected(e,s),l=t.isOptionDisabled(e,s);if(a){var c=t.getOptionValue(e);t.setValue(s.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(xv(s),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),s=pb(n,i,i[0]||null);t.onChange(s,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(pb(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=pb(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return qx(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return Gx(Bx(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Xy.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return zx(t.props,e)},t.getOptionValue=function(e){return Vx(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Px[e](n,r);o.boxSizing="border-box";var i=t.props.styles[e];return i?i(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,cv(cv({},Jb),e.components);var e},t.buildCategorizedOptions=function(){return Bx(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return Ux(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:cv({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!t.props.isDisabled){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"===typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&nb(e.target)&&t.props.onMenuClose():"function"===typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return Qx(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,s=n.inputValue,a=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,h=n.openMenuOnFocus,p=t.state,f=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!l&&("function"!==typeof u||(u(e),!e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||s)return;t.focusValue("previous");break;case"ArrowRight":if(!r||s)return;t.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():a&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!f||h&&t.isOptionSelected(f,g))return;t.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(t.isComposing)return;t.selectOption(f);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:s}),t.onMenuClose()):a&&i&&t.clearValue();break;case" ":if(s)return;if(!c){t.openMenu("first");break}if(!f)return;t.selectOption(f);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Jx),t.state.selectValue=Zy(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),r=t.buildFocusableOptions(),o=r.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=r[o],t.state.focusedOptionId=qx(n,r[o])}return t}return t=s,n=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sb(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sb(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),s="first"===e?0:i.length-1;if(!this.props.isMulti){var a=i.indexOf(r[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[s],focusedOptionId:this.getFocusedOptionId(i[s])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(s=o+1)}this.setState({inputIsHidden:-1!==s,focusedValue:n[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Dx):cv(cv({},Dx),this.props.theme):Dx}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,s=this.setValue,a=this.props,l=a.isMulti,c=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Hx(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Wx(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Yx(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,s=e.tabIndex,a=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,h=d.inputIsHidden,p=d.ariaSelection,f=this.commonProps,m=r||this.getElementId("input"),g=cv(cv(cv({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===p||void 0===p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(u,au({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:a,type:"text",value:i},g)):o.createElement(fx,au({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Jy,onFocus:this.onInputFocus,disabled:t,tabIndex:s,inputMode:"none",form:a,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,s=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,h=u.isDisabled,p=u.isMulti,f=u.inputValue,m=u.placeholder,g=this.state,v=g.selectValue,y=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return f?null:o.createElement(l,au({},c,{key:"placeholder",isDisabled:h,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return v.map((function(t,a){var l=t===y,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,au({},c,{components:{Container:r,Label:i,Remove:s},isFocused:l,isDisabled:h,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var x=v[0];return o.createElement(a,au({},c,{data:x,isDisabled:h}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,au({},t,{innerProps:a,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;return e&&i?o.createElement(e,au({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:s})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,s=this.state.isFocused;return o.createElement(n,au({},r,{isDisabled:i,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,au({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,s=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,h=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,v=p.loadingMessage,y=p.minMenuHeight,b=p.maxMenuHeight,x=p.menuIsOpen,w=p.menuPlacement,S=p.menuPosition,C=p.menuPortalTarget,j=p.menuShouldBlockScroll,_=p.menuShouldScrollIntoView,k=p.noOptionsMessage,N=p.onMenuScrollToTop,E=p.onMenuScrollToBottom;if(!x)return null;var T,O=function(t,n){var r=t.type,i=t.data,s=t.isDisabled,a=t.isSelected,l=t.label,c=t.value,p=h===i,f=s?void 0:function(){return e.onOptionHover(i)},m=s?void 0:function(){return e.selectOption(i)},g="".concat(e.getElementId("option"),"-").concat(n),v={id:g,onClick:m,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return o.createElement(u,au({},d,{innerProps:v,data:i,isDisabled:s,isSelected:a,key:g,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,s=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),c="".concat(l,"-heading");return o.createElement(n,au({},d,{key:l,data:i,options:s,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return O(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return O(t,"".concat(t.index))}));else if(g){var I=v({inputValue:m});if(null===I)return null;T=o.createElement(l,d,I)}else{var R=k({inputValue:m});if(null===R)return null;T=o.createElement(c,d,R)}var A={minMenuHeight:y,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:_},M=o.createElement(xb,au({},d,A),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,l=r.maxHeight;return o.createElement(i,au({},d,A,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:a}),o.createElement(Nx,{captureEnabled:f,onTopArrive:N,onBottomArrive:E,lockEnabled:j},(function(t){return o.createElement(s,au({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:h}),T)})))}));return C||"fixed"===S?o.createElement(a,au({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,s=t.name,a=t.required,l=this.state.selectValue;if(a&&!this.hasValue()&&!r)return o.createElement(Tx,{name:s,onFocus:this.onValueInputFocus});if(s&&!r){if(i){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:s,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:s,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:s,type:"hidden",value:""});return o.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:s,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,s=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return o.createElement(nx,au({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:s,selectValue:a,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,s=this.props,a=s.className,l=s.id,c=s.isDisabled,u=s.menuIsOpen,d=this.state.isFocused,h=this.commonProps=this.getCommonProps();return o.createElement(r,au({},h,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),o.createElement(t,au({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),o.createElement(i,au({},h,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,au({},h,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,h=e.inputValue,p=e.isMulti,f=Zy(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||h!==n.inputValue)){var g=d?function(e,t){return Ux(Bx(e,t))}(e,f):[],v=d?Gx(Bx(e,f),"".concat(l,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,f):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:f,focusedOption:b,focusedOptionId:qx(v,b),focusableOptionsWithIds:v,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,S=s&&a;return s&&!S&&(w={value:pb(p,f,f[0]||null),options:f,action:"initial-input-focus"},S=!a),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(w=null),cv(cv(cv({},m),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:S})}}],n&&gv(t.prototype,n),r&&gv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);Kx.defaultProps=Fx;var Xx=(0,o.forwardRef)((function(e,t){var n=mv(e);return o.createElement(Kx,au({ref:t},n))}));const Zx="c-classes__table-header-",ew="c-classes__table-data-",tw={"new-classes":{name:"CLASSES TO BE SOLVED"},"assigned-teachers":{name:"ASSIGNED TEACHERS"},"advanced-settings":{name:"ADVANCED SETTINGS (Optional)"}},nw=[{name:"Class Label",id:"labelElement",section:"new-classes",headerClass:Zx+"label",dataClass:ew+"label"},{name:"New Grade/s",id:"grades",section:"new-classes",headerClass:Zx+"grades",dataClass:ew+"grades"},{name:"Teacher/s",id:"teacherNames",section:"assigned-teachers",headerClass:Zx+"teachers",dataClass:ew+"teachers"},{name:"Max. Class Size",id:"classSizeSummary",section:"advanced-settings",headerClass:Zx+"classSizeSummary",dataClass:ew+"classSizeSummary"},{name:"Class Entry Criteria",id:"classEntryCriteria",section:"advanced-settings",headerClass:Zx+"classEntryCriteria",dataClass:ew+"classEntryCriteria"}],rw="unauthorized",ow="You don't have access to this schools data",iw="some-grades-have-students",sw="Could not save grades as some grades have students",aw=e=>{const t=ou(e,"message");su(t)&&(t.includes(rw)||t.includes(ow))&&(window.location.href="Logout?expired=true")},lw=(cw="paid",e=>cw===e);var cw;const uw=()=>sessionStorage.getItem(Ht),dw=()=>sessionStorage.removeItem(Ht),hw=e=>Object.values(e).filter((e=>!0===(null===e||void 0===e?void 0:e.called))).some((e=>e.loading)),pw=e=>!!(e&&Array.isArray(e)&&e.length),fw=(e,t,n)=>{const r=Array.from(e),o=r[t];return r[t]=r[n],r[n]=o,r},mw=(e,t)=>e.length-1===t,gw=(e,t)=>JSON.stringify(e)===JSON.stringify(t),vw=e=>[...new Set(e)].length!==e.length;var yw=n(6589),bw=n.n(yw);const xw={translations:{"":{Class:{msgstr:["Class"],msgid_plural:["Classes"]},class:{msgstr:["class"],msgid_plural:["classes"]},CLASS:{msgstr:["CLASS"],msgid_plural:["CLASSES"]},Classes:{msgstr:["Classes"]},classes:{msgstr:["classes"]},CLASSES:{msgstr:["CLASSES"]},"Class/es":{msgstr:["Class/es"]},Grade:{msgstr:["Grade"],msgid_plural:["Grades"]},grade:{msgstr:["grade"],msgid_plural:["grades"]},grades:{msgstr:["grades"]},Grades:{msgstr:["Grades"]},GRADES:{msgstr:["GRADES"]},"grade(s)":{msgstr:["grade(s)"]},"Grade/s":{msgstr:["Grade/s"]},"grade (or mixed/composite grade)":{msgstr:["grade (or mixed/composite grade)"]},"New Grade":{msgstr:["New Grade"]},"New Grade/s":{msgstr:["New Grade/s"]}}}},ww={translations:{"":{Class:{msgstr:["Group"],msgid_plural:["Groups"]},class:{msgstr:["group"],msgid_plural:["groups"]},CLASS:{msgstr:["GROUP"],msgid_plural:["GROUPS"]},Classes:{msgstr:["Groups"]},classes:{msgstr:["groups"]},CLASSES:{msgstr:["GROUPS"]},"Class/es":{msgstr:["Group/s"]},Grade:{msgstr:["Group"],msgid_plural:["Groups"]},grade:{msgstr:["group"],msgid_plural:["groups"]},grades:{msgstr:["groups"]},Grades:{msgstr:["Groups"]},GRADES:{msgstr:["GROUPS"]},"grade(s)":{msgstr:["group(s)"]},"Grade/s":{msgstr:["Group/s"]},"grade (or mixed/composite grade)":{msgstr:["student groups"]},"New Grade":{msgstr:["Student Group"]},"New Grade/s":{msgstr:["Student Group/s"]}}}},Sw={translations:{"":{Class:{msgstr:["Cabin"],msgid_plural:["Cabins"]},class:{msgstr:["cabin"],msgid_plural:["cabins"]},CLASS:{msgstr:["CABIN"],msgid_plural:["CABINS"]},Classes:{msgstr:["Cabins"]},classes:{msgstr:["cabins"]},CLASSES:{msgstr:["CABINS"]},"Class/es":{msgstr:["Cabin/s"]},Grade:{msgstr:["Group"],msgid_plural:["Groups"]},grade:{msgstr:["group"],msgid_plural:["groups"]},grades:{msgstr:["groups"]},Grades:{msgstr:["Groups"]},GRADES:{msgstr:["GROUPS"]},"grade(s)":{msgstr:["group(s)"]},"Grade/s":{msgstr:["Group/s"]},"grade (or mixed/composite grade)":{msgstr:["student groups"]},"New Grade":{msgstr:["Student Group"]},"New Grade/s":{msgstr:["Student Group/s"]}}}},Cw=(0,o.createContext)(),jw=({children:e,school:t})=>{const n=new(bw());n.addTranslations("en-AU","CLASS",xw),n.addTranslations("en-AU","CAMP",Sw),n.addTranslations("en-AU","ACTIVITY_GROUP",ww),t&&n.setTextDomain(t.accountType),n.setLocale("en-AU");const r={gettextObj:n};return(0,pr.jsx)(Cw.Provider,{value:r,children:e})},_w=()=>(0,pr.jsx)(kf,{id:"school-status",className:"c-account-details-status-tooltip p-0",variant:"light",opacity:1,children:(0,pr.jsxs)("div",{className:"c-account-details-status-tooltip__body",children:[(0,pr.jsxs)("p",{children:["If \u201cBlind Ding Lock\u201d = True Then \u201c",(0,pr.jsx)("b",{children:"Bling Ding Locked"}),"\u201d"]}),(0,pr.jsxs)("p",{children:["else If \u201cSolver Lock\u201d = True Then \u201c",(0,pr.jsx)("b",{children:"Solver Locked"}),"\u201d"]}),(0,pr.jsx)("p",{children:"else"}),(0,pr.jsxs)("ol",{children:[(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Not Activated"})," - none of the administrators have verified their emails"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Inactive"})," -"," ","if there\u2019s no active administrator (e.g. all administrators were deactivated, there\u2019s no administrator, or all administrators were inactive for >18month)"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Done"})," -"," ","there\u2019s an active solution for all \u201cnew grades\u201d (that\u2019s not LEAVING) that have active students (If too tricky, use <10 unallocated students)"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Step 3"})," -"," ","there\u2019s an active solution (at least one grade has class list run)"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Step 2"})," -"," ","there\u2019s more than 1 surveys (either sent, expired or completed) or there is more than 1 requests entered or there is more than 1 friends"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Step 1"})," - ","there\u2019s a more than 1 active students"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Not started"})," -"," ","at least one administrator has verified their emails and 0 active students"]})}),(0,pr.jsx)("li",{className:"ml-2",children:(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"Error"})," - ","technically shouldn\u2019t happen."]})})]}),(0,pr.jsx)("p",{children:"End if"})]})}),kw=({isSuper:e})=>{const{data:t,loading:n}=Gm(e?Be:Le,{variables:{schoolId:uw()},errorPolicy:"all"}),[r,i]=(0,o.useState)(!1),s=()=>i((e=>!e)),a=t&&t.school;return(0,pr.jsxs)("div",{className:"c-account-details pb-5 u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-5 u-blue-primary",children:"Account Details"}),n?(0,pr.jsx)("div",{className:"position-relative",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:" my-1 ml-3",children:[(0,pr.jsx)("h3",{className:"mb-3 u-bold u-white-space-pre-wrap text-uppercase",children:a.name}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"mb-2",children:a.contactName}),(0,pr.jsxs)("div",{className:"mb-2",children:[`${a.address||""}  `,`${a.suburb||""} `,`  ${a.postcode||""} `,`  ${a.stateCode||""}`,",",`\n              ${a.countryCode}\n              `]}),(0,pr.jsx)("div",{className:"mb-2",children:a.contactNumber}),(0,pr.jsx)("div",{className:"mb-2",children:a.email}),(0,pr.jsx)("div",{className:"mb-2",children:`${a.numberOfStudents} Students`}),e&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"mb-2",children:["CRM Account Name: ",a.crmAccountName]}),(0,pr.jsxs)("div",{className:"mb-2",children:["Crm Status:"," ",null!==a.crmStatus&&`${a.crmStatus}`]}),(0,pr.jsxs)("div",{className:"mb-2",children:["Account Type:"," ",null!==a.accountType&&`${a.accountType.toLowerCase()}`]}),(0,pr.jsxs)("div",{className:"mb-2",children:["Account Name:"," ",null!==a.accountName&&`${a.accountName}`]}),(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"mb-2",children:["School Status: ",(0,pr.jsx)("b",{children:a.schoolStatus}),(0,pr.jsx)("i",{className:"fa fa-info-circle ml-2 icon","data-tooltip-id":"school-status"})]}),(0,pr.jsx)(_w,{})]}),(0,pr.jsxs)("div",{className:"mb-2",children:["Managers: ",a.managers.map(Uh).join(", ")]})]})]}),(0,pr.jsx)("a",{className:"c-account-details__edit text-primary",onClick:s,children:"Edit"}),r&&(0,pr.jsx)(c_,{toggle:s,isSuper:e,refetchQueries:[e?{query:Be,variables:{schoolId:uw()}}:{query:Le,variables:{schoolId:uw()}}],data:a})]})})]})},Nw=w.J1`
  query ($adminOnly: Boolean, $schoolId: ID!) {
    constraints(adminOnly: $adminOnly, schoolId: $schoolId) {
      constraintsStudent {
        id
        schoolId
        studentTo {
          id
          firstName
          lastName
          currentClass {
            id
            label
          }
          currentGrade {
            id
            order
          }
        }
        studentFrom {
          firstName
          lastName
          id
          currentGrade {
            id
            order
          }
          currentClass {
            id
            label
          }
        }
        pair
        description
        inputByName
        insertedAt
        mandatory
        constraintId
        adminOnly
        status {
          reason
          status
        }
      }
      constraintsTeacher {
        id
        pair
        description
        inputByName
        insertedAt
        studentFrom {
          firstName
          lastName
          id
          currentGrade {
            id
            order
          }
          currentClass {
            id
            label
          }
        }
        schoolId
        teacherTo {
          id
          firstName
          lastName
        }
        mandatory
        constraintId
        adminOnly
        status {
          reason
          status
        }
      }
      unmetConstraints {
        __typename
        ... on ConstraintsStudent {
          id
          constraintId
          met
        }
        ... on ConstraintsTeacher {
          id
          constraintId
          met
        }
      }
    }
  }
`,Ew=w.J1`
  mutation createOrUpdateConstraintsStudent(
    $studentFromId: ID!
    $studentToId: ID!
    $description: String
    $inputByName: String!
    $mandatory: Boolean!
    $pair: Boolean!
    $schoolId: ID!
    $constraintId: ID
    $adminOnly: Boolean
  ) {
    createOrUpdateConstraintsStudent(
      constraintsStudent: {
        studentFromId: $studentFromId
        studentToId: $studentToId
        description: $description
        inputByName: $inputByName
        mandatory: $mandatory
        pair: $pair
        schoolId: $schoolId
        constraintId: $constraintId
        adminOnly: $adminOnly
      }
    ) {
      id
      studentToId
      studentFromId
    }
  }
`,Tw=w.J1`
  mutation createOrUpdateConstraintsTeacher(
    $studentFromId: ID!
    $teacherToId: ID!
    $description: String
    $inputByName: String!
    $mandatory: Boolean!
    $pair: Boolean!
    $schoolId: ID!
    $constraintId: ID
    $adminOnly: Boolean
  ) {
    createOrUpdateConstraintsTeacher(
      constraintsTeacher: {
        studentFromId: $studentFromId
        teacherToId: $teacherToId
        description: $description
        inputByName: $inputByName
        mandatory: $mandatory
        pair: $pair
        schoolId: $schoolId
        constraintId: $constraintId
        adminOnly: $adminOnly
      }
    ) {
      id
      teacherToId
      studentFromId
    }
  }
`,Ow=w.J1`
  mutation deleteConstraintsStudent($constraintId: ID!) {
    deleteConstraintsStudent(constraintId: $constraintId) {
      id
      constraintId
    }
  }
`,Iw=w.J1`
  mutation deleteConstraintsTeacher($constraintId: ID!) {
    deleteConstraintsTeacher(constraintId: $constraintId) {
      id
      constraintId
    }
  }
`,Rw=(w.J1`
  mutation deleteAllRequestConstraints($schoolId: ID!) {
    deleteAllRequestConstraints(schoolId: $schoolId)
  }
`,w.J1`
  mutation deleteRequestConstraintsByCurrentGrade(
    $schoolId: ID!
    $currentGradeIds: [ID!]!
    $deletePairRequests: Boolean
    $deleteSeparateRequests: Boolean
  ) {
    deleteRequestConstraintsByCurrentGrade(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
      deletePairRequests: $deletePairRequests
      deleteSeparateRequests: $deleteSeparateRequests
    )
  }
`),Aw=w.J1`
  {
    requestsPage @client {
      currentGrade
    }
  }
`,Mw=w.J1`
  query ($adminOnly: Boolean, $schoolId: ID!) {
    dashboard(adminOnly: $adminOnly, schoolId: $schoolId) {
      newClassCount
      requestCount
      studentCount
      inactiveStudentCount
      teacherCount
      surveySentCount
      surveyCompletedCount
      studentsPlacedCount
      newAccountLock
      overrideSolverLock
    }
  }
`;class Pw extends o.Component{constructor(e){var t;super(e),this.toggleCautionModal=e=>{this.setState({cautionModal:e||{isOpen:!1}})},this.toggleSuccessModal=()=>{this.setState({successModal:"",successModalHeading:""})},this.onChange=(e,t)=>{const{updateSchoolSettingMutation:n,schoolId:r}=this.props,o={schoolId:r,[e.target.name]:!t};this.setState({loading:!0}),n({variables:{schoolSettingParams:o},refetchQueries:[{query:Ge,variables:{schoolId:r}}]}).then((()=>{setTimeout((()=>{this.setState({loading:!1})}),500)})).catch((e=>{aw(e),this.setState({loading:!1})}))},this.updateAdminOnly=()=>{const{updateSettings:e,settings:t,schoolId:n}=this.props,r=!t.adminOnlyRequests;e({variables:{type:qt,value:r},refetchQueries:[{query:me,variables:{adminOnly:r,schoolId:n}},{query:Nw,variables:{adminOnly:r,schoolId:n}},{query:Mw,variables:{adminOnly:r,schoolId:n}}]})},this.state={loading:!1,cautionModal:{isOpen:!1,heading:null,text:null,buttonText:null,onClick:null},adminData:(t=e.schoolSettings,{firstName:"",lastName:"",positionTitle:"",email:"",schools:[],accounts:[],mfa:t.requireMfa}),successModal:"",successModalHeading:"",errors:{}}}render(){const{client:e,loadingSchool:t,loadingAdmins:n,loadingInvitations:r,loadingPrefences:o,loadingSchoolGrades:i,settings:s,school:a={},schoolSettings:l={},myprofile:c={},currentSchoolGrades:u=[],userRefetchQueries:d,createOrUpdateSisConfigPowerschoolMutation:h,invitations:p,revokeSchoolInvitationMutation:f,removeUserFromSchoolsMutation:m}=this.props,{loading:g,cautionModal:v,successModal:y,successModalHeading:b,adminData:x,errors:w}=this.state,{teachersToAddTeacherRequests:S,teachersToAddStudentRequests:C,feederSchool:j,avoidSameTeacher:_,includeStudentsWithNoValidFriends:k,showTeachersInSolver:N}=l;let E=[];return this.props.users&&(E=Array.from(this.props.users).sort(((e,t)=>e.id-t.id))),(0,pr.jsxs)("div",{className:"container u-mw-750 o-component "+(g?"cursor-wait":""),children:[(0,pr.jsx)("h1",{className:"mb-5 pb-4",children:"Settings"}),(0,pr.jsx)(hS,{apolloClient:e,loading:n||t||r,adminData:x,errors:w,users:E,myprofile:c,userRefetchQueries:d,currentSchool:a,schoolSettings:l,invitations:p,revokeSchoolInvitationMutation:f,removeUserFromSchoolsMutation:m}),(0,pr.jsx)(q_,{teachersToAddTeacherRequests:S,teachersToAddStudentRequests:C,feederSchool:j,onChange:this.onChange}),(0,pr.jsx)(E_,{loading:o,onChange:this.onChange,avoidSameTeacher:_,includeStudentsWithNoValidFriends:k}),(0,pr.jsx)(N_,{adminOnlyRequests:s.adminOnlyRequests,updateAdminOnly:this.updateAdminOnly,showTeachersInSolver:N,updateShowTeachersInSolver:e=>this.onChange(e,N)}),(0,pr.jsx)(m_,{loading:g,loadingSchoolGrades:i,currentSchoolGrades:u}),(0,pr.jsx)(__,{school:a}),(0,pr.jsx)(a_,{}),(0,pr.jsx)(MS,{school:a,createOrUpdateSisConfigPowerschoolMutation:h}),(0,pr.jsx)(Qf,{isOpen:v.isOpen,toggle:this.toggleCautionModal,heading:v.heading,text:v.text,buttonText:v.buttonText,onButtonClick:v.onClick,error:w.mutation}),(0,pr.jsx)(aN,{isOpen:""!==y,toggle:this.toggleSuccessModal,heading:b,text:y})]})}}const Dw=w.J1`
  query ($schoolId: ID!, $showCurrentClassCharacteristic: Boolean) {
    schoolCharacteristics(
      schoolId: $schoolId
      showCurrentClassCharacteristic: $showCurrentClassCharacteristic
    ) {
      id
      name
      priority
      schoolId
      sensitive
      tag_only
      characteristicResponses {
        characteristicId
        description
        id
        label
        value
        colour
      }
    }
  }
`,Fw=w.J1`
  mutation ($schoolCharacteristics: [CharacteristicParams!]!, $schoolId: ID!) {
    updateSchoolCharacteristics(
      schoolCharacteristics: $schoolCharacteristics
      schoolId: $schoolId
    ) {
      id
      characteristicResponses {
        characteristicId
        description
        id
        label
        value
        colour
      }
      schoolId
      name
      priority
      sensitive
      tag_only
    }
  }
`,Lw=(w.J1`
  mutation deleteAllStudentCharacteristicResponses($schoolId: ID!) {
    deleteAllStudentCharacteristicResponses(schoolId: $schoolId)
  }
`,w.J1`
  mutation deleteStudentCharacteristicResponsesFromSchool(
    $schoolId: ID!
    $characteristicIds: [ID!]!
  ) {
    deleteStudentCharacteristicResponsesFromSchool(
      schoolId: $schoolId
      characteristicIds: $characteristicIds
    )
  }
`,w.J1`
  mutation deleteStudentCharacteristicResponsesByCurrentGrade(
    $schoolId: ID!
    $characteristicIds: [ID!]!
    $currentGradeIds: [ID!]!
  ) {
    deleteStudentCharacteristicResponsesByCurrentGrade(
      schoolId: $schoolId
      characteristicIds: $characteristicIds
      currentGradeIds: $currentGradeIds
    )
  }
`),Bw=[{query:Dw,variables:{schoolId:uw()}}],Uw=({isSuper:e,school:t})=>{const{data:n,loading:r}=Gm(Pt),[i,{loading:s}]=Km(nt,{variables:{schoolId:uw()},refetchQueries:Bw}),[a,l]=(0,o.useState)(!1),[c,{loading:u}]=Km(rt,{variables:{schoolId:uw()},refetchQueries:Bw}),[d,{loading:h}]=Km(ot,{variables:{schoolId:uw()}}),[p,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(!1),[b,x]=(0,o.useState)(!1),[w,{loading:S}]=Km(st,{variables:{schoolId:uw()}}),[C,j]=(0,o.useState)(!1),[_,k]=(0,o.useState)(!1),[N,E]=(0,o.useState)(!1);return r?null:(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Admin Actions"}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(PS,{school:t})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>j(!0),buttonText:"Backup school",children:"Take a backup of this school"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>k(!0),buttonText:"Restore backup",children:"Restores a backup for this school"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>l(!0),buttonText:"Convert to cabins",description:Es(n,"convertToCabins"),children:"Convert this school to cabins"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>f(!0),buttonText:"Convert to Activity Groups",description:Es(n,"convertToActivityGroups"),children:"Convert this school to activity groups"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>g(!0),buttonText:"Roll up current students",description:Es(n,"moveStudentsToTheirNewGrade"),children:"Roll up current students"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>y(!0),buttonText:"Remove Solutions by Grades",description:Es(n,"removeSolutionsForGrades"),children:"Remove solutions for grades"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:()=>x(!0),buttonText:"Switch student names",children:"Switch student's first and last names by current grade"})}),e&&(0,pr.jsx)("div",{children:(0,pr.jsx)(B_,{onButtonClick:()=>E(!0),buttonText:"Send Missing Ids Emails",children:"Sends emails to schools if there are students missing ids"})})]}),a&&(0,pr.jsx)(DS,{dangerousMutation:i,mutationLoading:s,cautionHeading:"Converts school to cabins",cautionText:"Are you sure you want to convert this school to cabins?",cautionButtonText:"Yes, Proceed",successMessage:"School has been converted",errorHandler:e=>e.message,toggleComponent:()=>l(!1)}),p&&(0,pr.jsx)(DS,{dangerousMutation:c,mutationLoading:u,cautionHeading:"Convert school to activity groups",cautionText:"Are you sure you want to convert this school to activity groups?",cautionButtonText:"Yes, Proceed",successMessage:"School has been converted",errorMessage:"Could not convert school properly",toggleComponent:()=>f(!1)}),m&&(0,pr.jsx)(DS,{dangerousMutation:d,mutationLoading:h,cautionHeading:"move students to their new grade",cautionText:"Are you sure you want to move students to their new grade?",cautionButtonText:"Yes, Proceed",successMessage:"Students have been moved to their new grade",errorMessage:"Could not move students properly",toggleComponent:()=>g(!1)}),v&&(0,pr.jsx)(FS,{schoolId:uw(),toggle:()=>y(!1)}),b&&(0,pr.jsx)(V_,{schoolId:uw(),toggle:()=>x(!1)}),C&&(0,pr.jsx)(DS,{dangerousMutation:w,mutationLoading:S,cautionHeading:"Backup this school",cautionText:"Are you sure you want to take a backup of this school?",cautionButtonText:"Yes, Proceed",successMessage:"School successfully backed up",errorMessage:"Failed to take a backup",toggleComponent:()=>j(!1)}),_&&(0,pr.jsx)(A_,{toggle:()=>k(!1)}),N&&(0,pr.jsx)(L_,{toggle:()=>E(!1)})]})};var Gw=n(2450);const $w=async(e,t)=>{const n=await fetch(t,{method:"GET",headers:{authorization:e?`Bearer ${e}`:""}});if(200===n.status){const e=await n.blob(),t=n.headers.get("content-disposition").match(/attachment;\s*filename="(.+)"/)[1];(0,Gw.saveAs)(e,t)}return n},qw=async(e,t)=>{const n=await t.getTokenSilently();if(!n)return"No valid token found";const r=await $w(n,e);if(!r.ok){const e=await r.text();return[r,e]}return[r]},zw=(e,t,n,r,o)=>{const i=o&&o.join(","),s=new URLSearchParams(i?{filter_sensitive:r,grade_ids:i}:{filter_sensitive:r}).toString(),a=`${_s()}/export/internal/${e}/${t}?${s}`;return qw(a,n)},Vw=({reportType:e,description:t})=>{const n=nu(),[r,i]=(0,o.useState)();return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(B_,{onButtonClick:async()=>{i(null);const[t,r]=await((e,t)=>{const n=`${_s()}/admin_reports/${e}`;return qw(n,t)})(e,n);r&&i(`Error: ${t.status} - ${r}`)},buttonText:"Download",children:t}),r&&(0,pr.jsx)($k,{className:"mx-3",text:r})]})},Hw=()=>(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Admin Reports"}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(Vw,{description:"Placed Students Report",reportType:"placed_students_report"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(Vw,{description:"Admin Users Report",reportType:"admin_users_report"})}),(0,pr.jsx)("div",{children:(0,pr.jsx)(Vw,{description:"Account Status Report",reportType:"account_status_report"})})]});var Ww=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore"];function Yw(e,t){var n,r=c.useRef(),o=c.useRef(),i=c.useRef(),s=(0,Rm.l)(t,r.current||{}),l=null!==(n=null===s||void 0===s?void 0:s.query)&&void 0!==n?n:e;o.current=t,i.current=l;var u=qm(Pm(t&&t.client),l),d=u.useQuery((0,a.Cl)((0,a.Cl)({},s),{skip:!r.current})),h=d.observable.options.initialFetchPolicy||u.getDefaultFetchPolicy(),p=Object.assign(d,{called:!!r.current}),f=c.useMemo((function(){for(var e={},t=function(t){var n=p[t];e[t]=function(){return r.current||(r.current=Object.create(null),u.forceUpdateState()),n.apply(this,arguments)}},n=0,o=Ww;n<o.length;n++){t(o[n])}return e}),[]);Object.assign(p,f);var m=c.useCallback((function(e){r.current=e?(0,a.Cl)((0,a.Cl)({},e),{fetchPolicy:e.fetchPolicy||h}):{fetchPolicy:h};var t=(0,Rm.l)(o.current,(0,a.Cl)({query:i.current},r.current)),n=u.executeQuery((0,a.Cl)((0,a.Cl)({},t),{skip:!1})).then((function(e){return Object.assign(e,f)}));return n.catch((function(){})),n}),[]);return[m,p]}var Qw=["className","cssModule","widths","tag"],Jw=pu().oneOfType([pu().number,pu().string]),Kw=pu().oneOfType([pu().bool,pu().number,pu().string,pu().shape({size:pu().oneOfType([pu().bool,pu().number,pu().string]),order:Jw,offset:Jw})]),Xw={tag:Pu,xs:Kw,sm:Kw,md:Kw,lg:Kw,xl:Kw,className:pu().string,cssModule:pu().object,widths:pu().array},Zw={tag:"div",widths:["xs","sm","md","lg","xl"]},eS=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},tS=function(e){var t=e.className,n=e.cssModule,r=e.widths,i=e.tag,s=lu(e,Qw),a=[];r.forEach((function(t,r){var o=e[t];if(delete s[t],o||""===o){var i=!r;if($u(o)){var l,c=i?"-":"-"+t+"-",u=eS(i,t,o.size);a.push(Eu(ju()(((l={})[u]=o.size||""===o.size,l["order"+c+o.order]=o.order||0===o.order,l["offset"+c+o.offset]=o.offset||0===o.offset,l)),n))}else{var d=eS(i,t,o);a.push(d)}}})),a.length||a.push("col");var l=Eu(ju()(t,a),n);return o.createElement(i,au({},s,{className:l}))};tS.propTypes=Xw,tS.defaultProps=Zw;const nS=tS,rS=()=>{const[e,t]=(0,o.useState)(),[n,{loading:r,error:i}]=Yw(ze,{fetchPolicy:"network-only",onCompleted:e=>t(e.userByEmail),onError:()=>t()}),[s,a]=(0,o.useState)(!1),[l,{loading:c}]=Km(T,{onError:()=>{}}),[u,d]=(0,o.useState)("");return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Admin Search"}),(0,pr.jsxs)("div",{className:"mb-5 d-flex justify-content-between",children:[(0,pr.jsx)(iN,{placeholder:"Search for User By Email...",value:u,onChange:e=>{d(void 0===e?"":e.target.value)}}),(0,pr.jsx)(ld,{className:"c-button--secondary h-50 align-self-end",onClick:()=>n({variables:{email:u}}),disabled:""===u,children:"Search"})]}),r&&(0,pr.jsx)("p",{children:"Loading ..."}),i&&(0,pr.jsx)($k,{text:"Unable to find user"}),e&&(0,pr.jsx)("div",{className:"pb-5",children:(0,pr.jsx)(oS,{user:e,onDeleteClick:()=>a(!0)})})]}),s&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>a(!1),loading:c,heading:"Delete this user?",text:(0,pr.jsxs)("div",{children:["Deleting user with email ",(0,pr.jsx)("code",{children:e.email})," will unlink them from all accounts and completely remove their profile."]}),onButtonClick:()=>{a(!1),l({variables:{id:e.id,role:e.role}}).then((()=>{a(!1),t()}))}})]})},oS=({user:e,onDeleteClick:t})=>(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)("div",{className:"mb-4",children:[(0,pr.jsxs)("div",{className:"d-flex justify-between",children:[(0,pr.jsx)("h2",{children:"User Details"}),(0,pr.jsx)("a",{className:"text-primary",onClick:t,children:"Delete"})]}),(0,pr.jsx)("div",{children:Uh(e)}),(0,pr.jsx)("div",{children:e.email}),(0,pr.jsx)("div",{children:e.positionTitle}),(0,pr.jsx)("div",{children:e.role})]}),(0,pr.jsxs)(Fg,{className:"mb-1",children:[(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"font-weight-bold",children:"School ID"})}),(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"font-weight-bold",children:"School Name"})}),(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"font-weight-bold",children:"CRM Name"})})]}),0===e.schools.length&&(0,pr.jsx)("div",{children:"User is not linked to any schools"}),e.schools.map(((e,t)=>(0,pr.jsxs)(Fg,{className:"my-3",children:[(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"u-white-space-pre-wrap",children:e.id})}),(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"u-white-space-pre-wrap",children:e.name})}),(0,pr.jsx)(nS,{children:(0,pr.jsx)("div",{className:"u-white-space-pre-wrap",children:e.crm_account_name})})]},t)))]}),iS="ADMIN",sS="SUPER",aS="SUPPORT",lS="TEACHER",cS=e=>e===sS||e===aS,uS=e=>e===sS,dS=e=>e.acceptedCustomerTermsAt&&e.acceptedPrivacyPolicyAt,hS=({apolloClient:e,loading:t,errors:n,users:r,userRefetchQueries:i,currentSchool:s,invitations:a,revokeSchoolInvitationMutation:l,removeUserFromSchoolsMutation:c,myprofile:u})=>{const[d,h]=o.useState(!1),[p,f]=(0,o.useState)(),[m,g]=o.useState(!1),[v,y]=(0,o.useState)(),[b,x]=o.useState(!1),w=cS(u.role)||s.adminCanInviteUser;return(0,pr.jsxs)("div",{className:"u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Administrators"}),(0,pr.jsx)("div",{className:"p-2 pb-5",children:t?(0,pr.jsx)("div",{className:"position-relative",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)(Zh,{users:r,errors:n,invitations:a,allowRemove:!0,allowEdit:!1,onAddAdminClick:()=>h(!0),onRevokeInvitationClick:e=>{y(e.id),x(!0)},onRemoveAdminClick:e=>{f(e.id),g(!0)},allowAdd:w})}),(0,pr.jsxs)("div",{children:[d&&(0,pr.jsx)(C_,{toggle:()=>h(!1),school:s,refetchQueries:i}),m&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>g(!1),heading:"Remove Administrator?",text:"This administrator will no longer be able to access this account. If the Administrator is linked to other Class Solver accounts, they will still be able to access them.",buttonText:"Yes, remove",onButtonClick:()=>{c({variables:{userId:p,schoolIds:[s.id]},refetchQueries:i}).then((()=>{f(),g(!1),u.id===p&&(dw(),window.location.href="/")}))}}),b&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>x(!1),heading:"Remove Invitation?",text:"The invitation for this administrator will be removed. You can send a new invitation by clicking on 'Add new administrator'",buttonText:"Yes, remove",onButtonClick:()=>{l({variables:{inviteId:v},refetchQueries:i,onError:()=>{e.refetchQueries({include:i}),x(!1)}}).then((()=>{y(),x(!1)}))}})]})]})},pS=n.p+"static/media/powerschool_plugin.d66d6760e1c6730af1e1.xml",fS="https://classsolver.com/customer-terms/",mS="https://classsolver.com/privacy-policy/",gS="ADMINS",vS="NEW_CLASSES",yS="STUDENTS",bS="TEACHERS",xS="TEACHER_REQUESTS",wS="ADMIN_ONLY_TEACHER_REQUESTS",SS="STUDENT_REQUESTS",CS="ADMIN_ONLY_STUDENT_REQUESTS",jS="FRIENDSHIPS",_S="STUDENT_CHARACTERISTIC_RESPONSES",kS="CURRENT_SOLUTIONS",NS="HOME_ROOM",ES="ADD_NEW",TS="DELETE_MISSING",OS="UPDATE_EXISTING",IS=({apiEndpoint:e,clientId:t,clientSecret:n,setEdit:r,powerschoolSchoolId:o,useHomeRoomAttribute:i})=>(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)("div",{className:"col sm-6",children:[(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"PowerSchool URL"})}),(0,pr.jsx)("p",{children:e||"Not configured"})]}),(0,pr.jsxs)("div",{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:(0,pr.jsx)("b",{children:"School DCID in PowerSchool"})}),(0,pr.jsx)("p",{children:o||"Not configured"})]})]}),(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)("div",{className:"col sm-6",children:[(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"Client ID"})}),(0,pr.jsx)("p",{children:t||"Not configured"})]}),(0,pr.jsxs)("div",{className:"col sm-6",children:[(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"Client Secret"})}),(0,pr.jsx)("p",{children:n||"Not configured"})]})]}),(0,pr.jsx)(Fg,{children:(0,pr.jsx)(Gg,{className:"col sm-6",children:(0,pr.jsxs)(Qg,{className:"pl-4",style:{cursor:"default"},check:!0,children:[(0,pr.jsx)(Zg,{disabled:!0,type:"checkbox",name:"clientId",checked:i}),"Use the ",(0,pr.jsx)("code",{children:"home_room"})," attribute in Powerschool as current class"]})})}),(0,pr.jsx)("span",{className:"text-primary font-size-14 mr-4 cursor-pointer",onClick:()=>r(!0),children:"Edit"})]}),RS=({schoolId:e,apiEndpoint:t,clientId:n,clientSecret:r,setEdit:i,createOrUpdateSisConfigPowerschoolMutation:s,powerschoolSchoolId:a,useHomeRoomAttribute:l})=>{const[c,u]=(0,o.useState)(""),[d,h]=(0,o.useState)(n||""),[p,f]=(0,o.useState)(r||""),[m,g]=(0,o.useState)(t||""),[v,y]=(0,o.useState)(a||""),[b,x]=(0,o.useState)(l||!1);return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:(0,pr.jsx)("b",{children:"PowerSchool URL"})}),(0,pr.jsx)(Zg,{type:"text",name:"apiEndpoint",onChange:e=>g(e.target.value),value:m}),""===m&&(0,pr.jsx)($k,{text:"Cannot be blank"})]}),(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:(0,pr.jsx)("b",{children:"School DCID in PowerSchool"})}),(0,pr.jsx)(Zg,{type:"text",name:"powerschoolSchoolId",onChange:e=>y(e.target.value),value:v}),""===v&&(0,pr.jsx)($k,{text:"Cannot be blank"})]})]}),(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:(0,pr.jsx)("b",{children:"Client ID"})}),(0,pr.jsx)(Zg,{type:"text",name:"clientId",onChange:e=>h(e.target.value),value:d}),""===d&&(0,pr.jsx)($k,{text:"Cannot be blank"})]}),(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:(0,pr.jsx)("b",{children:"Client Secret"})}),(0,pr.jsx)(Zg,{type:"text",name:"clientSecret",onChange:e=>f(e.target.value),value:p}),""===p&&(0,pr.jsx)($k,{text:"Cannot be blank"})]})]}),(0,pr.jsx)(Fg,{children:(0,pr.jsx)(Gg,{className:"col sm-6",children:(0,pr.jsxs)(Qg,{className:"pl-4",check:!0,children:[(0,pr.jsx)(Zg,{type:"checkbox",name:"clientId",onChange:e=>{x(e.target.checked)},checked:b}),"Use the ",(0,pr.jsx)("code",{children:"home_room"})," attribute in Powerschool as current class"]})})}),(0,pr.jsx)(Ef,{onCancelClick:()=>i(!1),buttonText:"Save Configuration",onButtonClick:()=>{s({variables:{schoolId:e,config:{clientId:d,clientSecret:p,powerschoolSchoolId:v,apiEndpoint:m,currentClassOption:b?NS:"SECTION_ENROLLMENT"}}}).then((()=>{i(!1)})).catch((()=>{u("Error saving configuration")}))}}),(0,pr.jsx)($k,{text:c})]})},AS=({school:{id:e,powerschoolSisConfig:t},createOrUpdateSisConfigPowerschoolMutation:n,toggle:r})=>{const[i,s]=(0,o.useState)(!1),a=t?t.clientId:null,l=t?t.clientSecret:null,c=t?t.apiEndpoint:null,u=t?t.powerschoolSchoolId:null,d=!!t&&t.currentClassOption===NS;return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Set up Powerschool Integration",className:"px-5 py-4",toggle:r}),(0,pr.jsxs)(Ig,{className:"px-5 py-4",children:[(0,pr.jsxs)("p",{children:["Please see detailed instructions available"," ",(0,pr.jsx)("a",{href:"https://classsolverbau.blob.core.windows.net/public/PowerSchool Plugin.pdf",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]}),(0,pr.jsx)("p",{children:"Download and install the following plugin into Power School"}),(0,pr.jsx)("a",{href:pS,download:"Class_Solver_PowerSchool_Plugin.xml",children:(0,pr.jsx)(ld,{color:"primary m-2",children:"Download PowerSchool Plugin"})}),(0,pr.jsx)("p",{className:"py-2",children:"After installing plugin, please enter the Client ID and Client Secret"}),i?(0,pr.jsx)(RS,{schoolId:e,clientId:a,clientSecret:l,apiEndpoint:c,setEdit:s,powerschoolSchoolId:u,createOrUpdateSisConfigPowerschoolMutation:n,useHomeRoomAttribute:d}):(0,pr.jsx)(IS,{apiEndpoint:c,clientId:a,clientSecret:l,setEdit:s,powerschoolSchoolId:u,useHomeRoomAttribute:d})]})]})},MS=({school:e,createOrUpdateSisConfigPowerschoolMutation:t})=>{const[n,r]=(0,o.useState)(!1),i=()=>r(!n),s=vl();return(0,pr.jsxs)("div",{id:"advanced-features",className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-2 mt-5 u-blue-primary",children:"Advanced Features"}),(0,pr.jsx)("div",{className:"mb-5",children:"These features are generally used with the assistance of the Class Solver Support Team."}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-misc-upload__description mb-2",children:"Import Class Lists"}),(0,pr.jsx)("p",{className:"c-misc-upload__description",children:"Import a pre-allocated list of students into the Solver page based on the Student ID."})]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:()=>s("/AccountSettings/ImportClassLists"),children:"Import Class Lists"})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-misc-upload__description mb-2",children:"Transfer Student Requests"}),(0,pr.jsx)("p",{className:"c-misc-upload__description",children:"Export student requests from an account and then import them into a different account."})]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:()=>{s("/AccountSettings/TransferStudentRequests")},children:"Transfer Student Requests"})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-misc-upload__description mb-2",children:"Transfer Teacher Requests"}),(0,pr.jsx)("p",{className:"c-misc-upload__description",children:"Export teacher requests from an account and then import them into a different account."})]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:()=>{s("/Requests/TeacherRequests/Transfer")},children:"Transfer Teacher Requests"})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-misc-upload__description mb-2",children:"Power School Integration"}),(0,pr.jsx)("p",{className:"c-misc-upload__description",children:"Schools that use the Power School Student Information System can import their students details directly without using a CSV."})]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:i,children:"Configure PowerSchool"})]}),n&&(0,pr.jsx)(AS,{toggle:i,school:e,createOrUpdateSisConfigPowerschoolMutation:t})]})},PS=({school:e})=>{const t={[vS]:"New Classes",[yS]:"Students",[bS]:"Teachers",[xS]:"Teacher Requests",[wS]:"Teacher Requests - Admin Only",[SS]:"Student Requests",[CS]:"Student Requests - Admin Only",[jS]:"Student Friendships",[_S]:"Student Responses",[kS]:"Solutions",[gS]:"Admins",NEW_CLASSES_AS_TAG_ONLY_CHARACTERISTICS:"New Classes as Tag-Only Characteristics"},{data:n,loading:r}=Gm(bg,{variables:{schoolId:uw()}}),i=r?[]:n.activeSchoolGrades.map((e=>({label:e.label,value:e.id}))),s=Object.fromEntries(Object.keys(t).map((e=>e===gS?[e,!0]:[e,!1]))),[a,l]=(0,o.useState)(!1),[c,u]=(0,o.useState)(),[d,h]=(0,o.useState)(),[p,f]=(0,o.useState)(s),[m,{loading:g}]=Km(Ke,{onError:e=>{const t=e.graphQLErrors[0].details?e.graphQLErrors[0].details:e;h(`Error - Unable to clone school - ${t}`)},onCompleted:({cloneSchool:e})=>{e&&u(`Successfully cloned to ${e.id} - ${e.name}`)}}),v=()=>l(!a),[y,b]=(0,o.useState)(`${e.name} COPY`),[x,w]=(0,o.useState)([]),[S,C]=(0,o.useState)("CLASS"),j=e=>{f({...p,[e.target.name]:!p[e.target.name]})},_=e=>{C(e.target.value)};return(0,pr.jsxs)(pr.Fragment,{children:[g?(0,pr.jsx)(qk,{className:"loader-container-relative"}):(0,pr.jsx)(B_,{onButtonClick:v,buttonText:"Clone",children:"Clone this school"}),c&&(0,pr.jsx)("span",{className:"text-success",children:c}),d&&(0,pr.jsx)($k,{className:"mx-3",text:d}),a&&(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Cloning this school",toggle:v}),(0,pr.jsxs)(Ig,{className:"px-4 d-flex flex-column align-items-center",children:[(0,pr.jsx)("div",{children:"Are you sure you want to clone this school?"}),(0,pr.jsxs)("div",{className:"my-2 d-flex flex-column align-items-center",children:["Name of new school:",(0,pr.jsx)(Qg,{className:"m-3",children:(0,pr.jsx)(Zg,{type:"text",id:y,name:y,value:y,onChange:e=>{b(`${e.target.value}`)}})},"newSchoolName")]}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Zg,{type:"radio",id:"class",value:"CLASS",name:"accountType",onChange:_}),(0,pr.jsx)("div",{children:"Classes \u2013 students move from Current Grade to New Grade"}),(0,pr.jsx)(Zg,{type:"radio",id:"camp",value:"CAMP",name:"accountType",onChange:_}),(0,pr.jsx)("div",{children:"Camp Cabins - automatically separate the boys and girls"}),(0,pr.jsx)(Zg,{type:"radio",id:"activityGroup",value:"ACTIVITY_GROUP",name:"accountType",onChange:_}),(0,pr.jsx)("div",{children:"Activity Groups \u2013 students stay in their Current Grade "})]}),(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select the Current Grade/s for the students you would like to copy:"}),(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:i,value:x,onChange:e=>{w(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsx)("div",{className:"my-2",children:"Data to copy over:"}),(0,pr.jsx)("span",{className:"cursor-pointer color-blue-mid",onClick:e=>{e.stopPropagation(),f({...p,[vS]:!0,[yS]:!0,[bS]:!0,[xS]:!0,[wS]:!0,[SS]:!0,[CS]:!0,[jS]:!0,[_S]:!0,[kS]:!0,[gS]:!0})},children:"Select All"}),(0,pr.jsx)("div",{className:"d-flex flex-wrap justify-content-center",children:Object.entries(t).map((([e,t])=>(0,pr.jsxs)(Qg,{className:"m-3",children:[(0,pr.jsx)(Zg,{type:"checkbox",id:e,name:e,checked:p[e],onChange:j}),t]},e)))}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:()=>{h(null),u(null),l(!1);const t=Object.entries(p).filter((([e,t])=>!0===t)).map((([e,t])=>e));m({variables:{schoolId:e.id,cloneSchoolParams:{name:y},dataToClone:t,accountType:S,currentGradeIds:x.map((e=>e.value))},refetchQueries:[{query:Ue}]})},children:"Clone"}),(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:v,children:"Cancel"})]})]})]})},DS=({dangerousMutation:e,mutationLoading:t,cautionHeading:n,cautionText:r,cautionButtonText:i,successMessage:s,errorMessage:a,errorHandler:l,toggleComponent:c,showSuccess:u=!0})=>{const[d,h]=(0,o.useState)(!0),[p,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)("");return(0,pr.jsxs)(pr.Fragment,{children:[d&&(0,pr.jsx)(Qf,{isOpen:!0,loading:t,toggle:c,heading:n,text:r,buttonText:i,onButtonClick:()=>{e().then((()=>{h(!d),u?f(!p):c()})).catch((e=>{if(a)y(a);else{const t=l(e);y(t)}g(!0)}))},error:m?v:""}),p&&(0,pr.jsx)(aN,{isOpen:!0,toggle:c,heading:"Success",text:s})]})},FS=({toggle:e,schoolId:t})=>{const{data:n,loading:r}=Gm(vg,{variables:{schoolId:t}}),[i,{error:s,loading:a}]=Km(it,{onError:()=>{}}),[l,c]=(0,o.useState)([]),u=r||a,d=u?[]:n.newSchoolGrades.map((e=>({label:e.label,value:e.id})));return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-35rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Remove Solutions by Grades",toggle:e}),u?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{className:"u-white-space-pre-wrap",children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),"This action cannot be undone."]})]})}),(0,pr.jsxs)("div",{className:"my-3",children:[(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Grades",options:d,value:l,onChange:e=>{c(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN}),s&&(0,pr.jsx)($k,{text:s.message})]}),(0,pr.jsx)(Ef,{className:"mt-5",buttonText:"Yes, remove for selected grades",onButtonClick:()=>{i({variables:{schoolId:t,gradeIds:l.map((e=>e.value))},onCompleted:e})},onCancelClick:e,disabled:0===l.length})]})]})},LS=(e,t)=>{t.sort(((t,n)=>{const r=e===t.newGrade.id,o=e===n.newGrade.id;return r?o?GS(t,n):-1:o?1:GS(t,n)}))},BS=e=>t=>t.newGrade.id===e?0:1,US=e=>t=>{const n=t.characteristicResponses.find((({characteristic:{id:t}})=>t===e));return n?n.value:-1},GS=(e,t)=>e.lastName.concat(e.firstName).localeCompare(t.lastName.concat(t.firstName)),$S=e=>{e.sort(((e,t)=>{const n=e.currentGrade.order-t.currentGrade.order;if(0===n){const n=e.currentClass?t.currentClass?e.currentClass.label.localeCompare(t.currentClass.label):-1:1;return 0===n?GS(e,t):n}return n}))},qS=(e,t)=>{if(0===e.schoolGrades.length)return 1;if(0===t.schoolGrades.length)return-1;const n=e.schoolGrades.sort()[0].order-t.schoolGrades.sort()[0].order;return 0===n?e.label.localeCompare(t.label,void 0,{numeric:!0}):n},zS=e=>e.slice().sort(((e,t)=>e.classDetails.label.localeCompare(t.classDetails.label,void 0,{numeric:!0}))),VS=(e,t)=>{const n=e.currentClasses[0],r=t.currentClasses[0];return n&&r?HS(e,n,t,r):n||r?n?-1:1:e.lastName.localeCompare(t.lastName)},HS=(e,t,n,r)=>{const o=t.grades[0],i=r.grades[0];if(o&&i)return o.order===i.order?t.label===r.label?e.lastName.localeCompare(n.lastName):t.label.localeCompare(r.label):o.order-i.order},WS=e=>(0,j.cloneDeep)(e).sort(((e,t)=>e.label.localeCompare(t.label))),YS=e=>(0,j.cloneDeep)(e).sort(QS),QS=(e,t)=>{const n=e.grades.sort(((e,t)=>e.order-t.order))[0],r=t.grades.sort(((e,t)=>e.order-t.order))[0];return n.order===r.order?e.grades.length===t.grades.length?e.label.localeCompare(t.label):e.grades.length-t.grades.length:n.order-r.order},JS=({toggle:e,schoolId:t})=>{const{data:n,loading:r}=Gm(gg,{variables:{schoolId:t}}),[i,{error:s,loading:a}]=Km(Oe,{onError:()=>{}}),[l,c]=(0,o.useState)([]),u=r||a,d=u?[]:YS(n.activeCurrentClasses).map((e=>({label:e.label,value:e.id})));return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Delete Students by Current Class",toggle:e}),u?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{className:"u-white-space-pre-wrap",children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),"This action cannot be undone."]})]})}),(0,pr.jsxs)("div",{className:"my-3",children:[(0,pr.jsx)(Xx,{name:"current_classes",className:"c-input__multiselect",placeholder:"Select Current Classes",options:d,value:l,onChange:e=>{c(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN}),s&&(0,pr.jsx)($k,{text:s.message})]}),(0,pr.jsx)(Ef,{className:"mt-5",buttonText:"Yes, delete",onButtonClick:()=>{i({variables:{schoolId:t,currentClassIds:l.map((e=>e.value))},onCompleted:e})},onCancelClick:e,disabled:0===l.length})]})]})},KS=({toggle:e,schoolId:t})=>{const{data:n,loading:r}=Gm(yg,{variables:{schoolId:t}}),[i,{error:s,loading:a}]=Km(Te,{onError:()=>{}}),[l,c]=(0,o.useState)([]),u=r||a,d=u?[]:n.currentSchoolGrades.map((e=>({label:e.label,value:e.id})));return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Delete Students by Current Grade",toggle:e}),u?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{className:"u-white-space-pre-wrap",children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),"This action cannot be undone."]})]})}),(0,pr.jsxs)("div",{className:"my-3",children:[(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:d,value:l,onChange:e=>{c(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN}),s&&(0,pr.jsx)($k,{text:s.message})]}),(0,pr.jsx)(Ef,{className:"mt-5",buttonText:"Yes, delete",onButtonClick:()=>{i({variables:{schoolId:t,currentGradeIds:l.map((e=>e.value))},onCompleted:e})},onCancelClick:e,disabled:0===l.length})]})]})},XS="https://player.vimeo.com/video/683707181?h=bf16393561",ZS="https://player.vimeo.com/video/853262578?h=76c04aa506",eC="https://player.vimeo.com/video/853264665?h=f0f4150e7e",tC=({loading:e,isOpen:t,toggle:n,student:r,onChange:i,onCurrentClassChange:s,errors:a,onGenderChange:l,addStudent:c,newSchoolGrades:u,currentSchoolGrades:d,currentClasses:h,newClasses:p,onBulkUploadClick:f})=>{const[m,g]=(0,o.useState)(!1),v=()=>g((e=>!e));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Yf,{isOpen:t,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Add Student",toggle:n,toggle2:v,className:"px-4 py-3"}),e?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-4",children:[(0,pr.jsx)(Uj,{student:r,onChange:i,onCurrentClassChange:s,onGenderChange:l,errors:a,currentSchoolGrades:d,newSchoolGrades:u,currentClasses:h,newClasses:p,addStudent:!0}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:f,children:"Bulk Import Students"}),(0,pr.jsx)(Ef,{onCancelClick:n,onButtonClick:c,buttonText:"Add Student",className:"my-3"})]}),(0,pr.jsx)($k,{text:a.mutation})]})]}),m&&(0,pr.jsx)(vN,{toggle:v,videoUrl:"https://player.vimeo.com/video/881358416?h=fe61db46b0",title:"Add & Remove Students"})]})},nC=w.J1`
  query ($schoolId: ID!) {
    schoolSettings(schoolId: $schoolId) {
      id
      maxFriends
    }
  }
`,rC=w.J1`
  mutation ($constraintsFriend: ConstraintsFriendParams) {
    createOrUpdateConstraintsFriend(constraintsFriend: $constraintsFriend) {
      constraintsFriends {
        id
        constraintId
      }
    }
  }
`,oC=(w.J1`
  mutation deleteAllConstraintsFriends($schoolId: ID!) {
    deleteAllConstraintsFriends(schoolId: $schoolId)
  }
`,w.J1`
  mutation deleteConstraintsFriendsByCurrentGrades(
    $schoolId: ID!
    $currentGradeIds: [ID!]!
  ) {
    deleteConstraintsFriendsByCurrentGrades(
      schoolId: $schoolId
      currentGradeIds: $currentGradeIds
    )
  }
`),iC=w.J1`
  mutation ($schoolId: ID!) {
    pruneMaxFriends(schoolId: $schoolId)
  }
`,sC=w.J1`
  query ($adminOnly: Boolean, $schoolId: ID!) {
    constraints(adminOnly: $adminOnly, schoolId: $schoolId) {
      constraintsFriend {
        id
        studentFromId
      }
    }
  }
`,aC=(e,t=1,n=Number.MAX_SAFE_INTEGER)=>{if(su(e)&&"string"===typeof e){const r=e.trim();if(r)return r.length>=t&&r.length<n}return!1},lC=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),cC=(e,t=!0)=>{const n={};return aC(e.countryCode)||(n.countryCode="Country is required"),aC(e.schoolName)||(n.schoolName="School Name is required"),aC(e.stateCode)||(n.stateCode="State Code is required"),t&&(aC(e.contactFirstName)||(n.contactFirstName="First Name is required"),aC(e.contactLastName)||(n.contactLastName="Last Name is required"),aC(e.contactPositionTitle)||(n.contactPositionTitle="Position Title is required"),lC(e.contactEmail)||(n.contactEmail="Invalid Email")),aC(e.contactNumber)||(n.contactNumber="Contact Number is required"),(e=>{const t=parseInt(e,10);return!isNaN(t)&&String(t)===String(e)})(e.numberOfStudents)||(n.numberOfStudents="Invalid Number Of Students"),n},uC=e=>{const t={};return aC(e.firstName)||(t.firstName="Cannot be blank"),aC(e.lastName)||(t.lastName="Cannot be blank"),aC(e.gender)||(t.gender="Cannot be blank"),aC(e.newGrade)||(t.newGrade="Must select a New Grade"),t},dC=n.p+"static/media/students_template.53da8c2fbdd6e918314d.csv",hC="student_code",pC="Student Id already exists",fC="NEW",mC="LEAVING",gC=e=>({status:t,type:n})=>"PENDING"===t&&n===e,vC=(e,t)=>{if(!e)return{job:null,error:null};const n=e.error;if((e=>{var t;return(null===e||void 0===e||null===(t=e.networkError)||void 0===t?void 0:t.statusCode)>=500})(n))return{job:null,error:n};const r=e.school&&e.school.uploadJobs.find(gC(t));return((e,t)=>{if(!e)return!1;const n=e.graphQLErrors;for(let r of n){const e=r.path;if("school"===e[0]&&"uploadJobs"===e[1]&&e[2]===t)return!0}return!1})(n,e.school&&e.school.uploadJobs.findIndex(gC(t)))?{job:r,error:n}:{job:r,error:null}},yC=(0,pr.jsx)("p",{children:(0,pr.jsx)("b",{children:"Please try again by fixing the following issue:"})}),bC={"invalid-encoding":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["This is not a valid CSV file. Please check that the file extension is"," ",(0,pr.jsx)("code",{children:".csv"})," and that the file only contains valid characters (e.g A-z, \u2018-\u2018, \u2018_\u2019) and try again."]}),(0,pr.jsxs)("p",{children:["If you are using a Mac, please save the file format as"," ",(0,pr.jsx)("code",{children:"CSV UTF-8 (.csv)"})]})]}),actions:()=>[]},"invalid-csv":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["The file was not saved as a .CSV ",(0,pr.jsx)("b",{children:"OR"})," does not have the correct number of columns. Please use the template provided and try again."]})]}),actions:()=>[]},"invalid-number-of-columns":{title:void 0,body:(e,t)=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["The number of columns is wrong",t&&t.expected?`, you should have at least ${t.expected} columns`:"",". Please check that your file is a valid comma (,) separated file and try again."]})]}),actions:()=>[]},"file-not-found":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsx)("p",{children:"File is no longer found at the specified location. Please cancel the upload and try again."})]}),actions:({schoolUploads:e,updateBulkUploadJob:t,navigate:n})=>[{color:"warning",onClick:()=>{const{job:r}=vC(e,"STUDENT"),o={jobParams:{id:r.id,status:"CANCELLED",type:r.type}};t({variables:o}),n("/Students")},text:"Cancel Upload"}]},"grade-does-not-exist":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsx)("p",{children:"The file contains a student grade that is not recognised. Please check your school\u2019s Grades list in Settings and try again."})]}),actions:({navigate:e})=>[{color:"primary",onClick:()=>{e("/Students/Upload/GradeLabels")},text:"Go To Grade Settings"}]},"class-does-not-exist":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsx)("p",{children:"One or more classes do not exist. Please check with your school\u2019s Classes list in Settings and try again."})]}),actions:()=>[]},"missing-required-data":{title:void 0,body:(e,t)=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsx)("p",{children:"The following row is missing some required data:"}),(0,pr.jsx)("pre",{children:JSON.stringify(t.rows[0],null,2).replace(/["{}]/g,"")})]}),actions:()=>[]},generic:{title:void 0,body:e=>(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("p",{children:["We\u2019re sorry, but something went wrong with your ",e," record upload."]}),(0,pr.jsx)("p",{children:"Please contact an administrator."})]}),actions:()=>[]},"duplicate-email":{title:void 0,body:(e,t)=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["We found a duplicate email in your list: ",(0,pr.jsx)("i",{children:t.email}),", please remove/change it and try again."]})]}),actions:()=>[]},"invalid-email-format":{title:void 0,body:(e,t)=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["We found an email with an invalid format in your list:"," ",(0,pr.jsx)("code",{children:t.email}),", please remove/change it and try again."]})]}),actions:()=>[]},"file-has-no-data":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:(0,pr.jsx)("b",{children:"The file does not contain any data."})}),(0,pr.jsx)("p",{children:"You may have accidently selected a blank template. Please check you are importing the correct file, that it contains data, and try again."})]}),actions:()=>[]},"invalid-gender-format":{title:void 0,body:()=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsxs)("p",{children:["The gender format in your CSV is incorrect. It must be either"," ",(0,pr.jsx)("code",{children:"M"})," or ",(0,pr.jsx)("code",{children:"F"}),"."]})]}),actions:()=>[]},"empty-file":{title:void 0,body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"Uploaded file is empty. Please try again with a non-empty file."})}),actions:({schoolUploads:e,updateBulkUploadJob:t,navigate:n})=>[{color:"warning",onClick:()=>{const{job:r}=vC(e,"STUDENT"),o={jobParams:{id:r.id,status:"CANCELLED",type:r.type}};t({variables:o}),n("/Students")},text:"Cancel Upload"}]},"missing-required-headers":{title:void 0,body:(e,t)=>(0,pr.jsxs)("div",{children:[yC,(0,pr.jsx)("p",{children:"The CSV file is missing some column headers. Please make sure the CSV file contains the correct headers in the first row."}),t&&t.missing&&(0,pr.jsxs)("p",{children:["Missing headers:",(0,pr.jsx)("br",{}),(0,pr.jsx)("code",{children:t.missing.join(", ").replace(/_/g," ")})]})]}),actions:()=>[]}},xC=w.J1`
  query ($schoolId: ID!, $sis: SisTypes!) {
    getImportableStudents(schoolId: $schoolId, sis: $sis) {
      students {
        firstName
        lastName
        gender
        studentCode
        currentClasses {
          name
        }
        currentGrade {
          name
        }
      }
    }
  }
`,wC=w.J1`
  mutation ($schoolId: ID!, $students: [ImportableStudent!]!) {
    importStudents(schoolId: $schoolId, students: $students) {
      importedStudents {
        id
      }
    }
  }
`,SC=({school:e,toggleSync:t,refetchQueries:n})=>{const[r,i]=(0,o.useState)(!1);return r?(0,pr.jsx)(kC,{school:e,toggleSync:t,refetchQueries:n,sisType:"POWERSCHOOL"}):(0,pr.jsxs)("div",{className:"container-fluid d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("h1",{className:"m-2",children:"Sync Students from PowerSchool"}),(0,pr.jsx)(ld,{color:"primary m-2",onClick:()=>i(!0),children:"Sync"}),(0,pr.jsx)(ld,{color:"link",onClick:t,children:"Back to Students page"})]})},CC=({school:e,toggleSync:t,refetchQueries:n})=>{const[r,i]=(0,o.useState)(!1);return r?(0,pr.jsx)(kC,{school:e,toggleSync:t,refetchQueries:n,sisType:"SFTP"}):(0,pr.jsxs)("div",{className:"container-fluid d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("h1",{className:"m-2",children:"Sync Students from SFTP Server"}),(0,pr.jsx)(ld,{color:"primary m-2",onClick:()=>i(!0),children:"Sync"}),(0,pr.jsx)(ld,{color:"link",onClick:t,children:"Back to Students page"})]})},jC={POWERSCHOOL:"PowerSchool",SFTP:"SFTP Server"},_C=({error:e,toggle:t,sisType:n})=>{if(!e)return null;if(e.graphQLErrors[0]&&e.graphQLErrors[0].message){const r=e.graphQLErrors[0].message;let o,i;return"grade-does-not-exist"===r?(o="Error with Grade Codes",i=`\n        Some grade codes were not found in your "School Grade Settings".\n        Please go to "School Grade Settings" and make sure the Grade\n        Codes matches the Grade Names in ${jC[n]}.\n        `):"school-id-not-found"===r?(o="Error finding school in PowerSchool",i="Unable to find the school with the configured DCID, please check you have entered the correct school DCID in the PowerSchool Integration settings."):(o="Error Importing data",i="An error has occurred importing the data. Please double check the credentials and try again or contact Class Solver support."),(0,pr.jsx)(Qf,{isOpen:!0,toggle:t,onButtonClick:t,buttonText:"Cancel Import",showCancel:!1,heading:o,text:(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:i})})})}},kC=({school:e,toggleSync:t,refetchQueries:n,sisType:r})=>{const[i,s]=(0,o.useState)(),{data:a,loading:l,error:c}=Gm(xC,{variables:{schoolId:e.id,sis:r},fetchPolicy:"network-only"}),[u]=Km(wC);if(l)return(0,pr.jsx)(NC,{sisType:r});if(c)return(0,pr.jsx)(_C,{error:c,toggle:t,sisType:r});const d=a.getImportableStudents.students,h=d.length,p=d.map((e=>(e=>{const t=e.currentClasses&&e.currentClasses[0];return{firstName:e.firstName,lastName:e.lastName,gender:e.gender,studentCode:e.studentCode,currentClass:t?t.name:null,currentGrade:e.currentGrade.name?e.currentGrade.name:null}})(e)));return(0,pr.jsxs)("div",{className:"container-fluid d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsxs)("h1",{className:"m-2",children:["We have found ",h," students from ",jC[r]," ","ready for importing"]}),(0,pr.jsx)(ld,{color:"primary m-2",onClick:()=>{u({variables:{schoolId:e.id,students:p},refetchQueries:n}).then((()=>{t()})).catch((e=>{s(e)}))},disabled:0===h,children:"Import into Class Solver"}),(0,pr.jsx)(ld,{color:"link",onClick:t,children:"Back to Students page"}),(0,pr.jsx)(_C,{error:i,toggle:t,sisType:r})]})},NC=({sisType:e})=>(0,pr.jsxs)("div",{className:"container-fluid d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsxs)("h1",{children:["Connecting to ",jC[e],", this may take a few minutes..."]}),(0,pr.jsx)("div",{className:"mt-3",children:(0,pr.jsx)(qk,{className:"loader-container-relative"})})]}),EC=w.J1`
  mutation (
    $notificationType: NotificationTypes!
    $uploadJobId: ID
    $message: String
    $schoolId: ID
  ) {
    sendAdminNotification(
      notificationType: $notificationType
      uploadJobId: $uploadJobId
      message: $message
      schoolId: $schoolId
    )
  }
`,TC=w.J1`
  query ($schoolId: ID!) {
    getNotifications(schoolId: $schoolId) {
      notificationId
      severity
      title
      message
    }
  }
`,OC=e=>e.startsWith("new_"),IC=e=>{const t=e.toUpperCase();return"M"===t?"color-male":"F"===t?"color-female":"color-non-binary"},RC=e=>{const t=e.toUpperCase();return"M"===t?"Male":"F"===t?"Female":"Non-Binary"},AC=e=>e.code===fC,MC=e=>e.code===mC,PC=e=>AC(e)||MC(e),DC=e=>"SchoolGradesByGender"===e.defaultNewGrade.__typename,FC=(e,t)=>{let n;const r=e.defaultNewGrade;if("SchoolGrade"===r.__typename)n=r;else if(DC(e))switch(t&&t.gender){case"M":n=r.maleGrade;break;case"F":default:n=r.femaleGrade;break;case"X":n=r.nonBinaryGrade}return n},LC=e=>{const t=e[0],n=FC(t);return{firstName:"",lastName:"",gender:"",currentClass:"",currentGrade:t?t.code:"",newGrade:n?n.code:"",studentCode:""}};class BC extends o.Component{constructor(e){super(e),this.deleteRefetchQueries=[{query:Mw,variables:{schoolId:uw(),adminOnly:this.props.settings.adminOnlyRequests}},{query:TC,variables:{schoolId:uw()}},{query:wg,variables:{schoolId:uw()}},{query:me,variables:{adminOnly:this.props.settings.adminOnlyRequests,schoolId:uw()}},{query:gg,variables:{schoolId:uw()}}],this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error)},this.onAddRequestClick=e=>{this.setState({studentModal:!0,studentId:e})},this.toggle=()=>{this.setState({studentModal:!this.state.studentModal})},this.closeSuccessModal=()=>{this.setState({successModal:!1,studentModal:!0})},this.toggleAdd=()=>{this.setState({addModal:!this.state.addModal,errors:{}})},this.onSuccessfulAdd=e=>{this.setState({studentId:e,addModal:!1,successModal:!0,addStudentDetails:LC(this.props.currentSchoolGrades)})},this.onFilterChange=e=>{this.props.setFilterId(e.target.value),"all-grades"===e.target.value&&this.setState({allGradesRendering:!0})},this.onChange=e=>{const{addStudentDetails:t}=this.state;if("currentGrade"===e.target.name){const{currentSchoolGrades:n}=this.props,r=n.find((t=>t.code===e.target.value)),o=FC(r,t);this.setState({addStudentDetails:{...t,currentClass:"",newGrade:o?o.code:"",newClass:"",currentGrade:e.target.value}})}else this.setState({addStudentDetails:{...t,newClass:"newGrade"===e.target.name?"":t.newClass,[e.target.name]:e.target.value}})},this.onCurrentClassChange=e=>{const{addStudentDetails:t}=this.state;null===e||"N/A"===e.label?this.setState({addStudentDetails:{...t,currentClass:""}}):this.setState({addStudentDetails:{...t,currentClass:e.label}})},this.onGenderChange=e=>{this.setState({addStudentDetails:{...this.state.addStudentDetails,gender:e.target.value}})},this.onSearchChange=e=>{void 0===e?this.setState({searchValue:""}):this.setState({searchValue:e.target.value})},this.onRowClick=e=>{e?this.setState({studentId:e,studentModal:!0}):this.toggleAdd()},this.addStudent=()=>{const{createOrUpdateInactiveStudentMutation:e}=this.props,{addStudentDetails:t}=this.state,n=this.deleteRefetchQueries,r=uC(t);if(this.setState({errors:r}),0===Object.keys(r).length){this.setState({loading:!0});e({variables:{student:{...t,newClass:""===t.newClass?void 0:t.newClass,schoolId:uw()}},refetchQueries:n}).then((({data:e})=>{this.setState({loading:!1}),this.onSuccessfulAdd(e.createOrUpdateInactiveStudent.id)})).catch((e=>{aw(e),e.toString().includes(hC)?this.setState({loading:!1,errors:{studentId:pC}}):this.setState({loading:!1,errors:{mutation:"Network Error, Could Not Save Student"}})}))}},this.navToCharacteristics=()=>{const{navigate:e}=this.props;e("/Characteristics",{state:{navFrom:"/Students"}})},this.handleNavToStudentsClick=()=>{},this.csvExport=async e=>{const{settings:t,user:n}=this.props,r=await this.context.getTokenSilently(),o=uw(),i=n.role;if(!o||!i||!r)return;const s=e.join(","),a=`${_s()}/export_student_data/${o}?grade_ids=${s}&filter_sensitive=${t.adminOnlyRequests?"false":"true"}`,l=await $w(r,a);if(l.ok)this.setState({showExportStudentsByGrade:!1});else{const e=await l.text();aw({message:e}),this.setState({errors:{export:"Error exporting students"}})}},this.state={allGradesRendering:!1,studentModal:!1,successModal:!1,addModal:!1,studentId:"",searchValue:"",addStudentDetails:LC(this.props.currentSchoolGrades),errors:{},displayBulkUploadScreen:!1,displayPowerschoolSyncScreen:!1,showDeleteStudentCharacteristicResponses:!1,showDeleteAllConstraintsFriends:!1,showDeleteAllRequestConstraints:!1,showDeleteAllStudentNotes:!1,showRemoveStudentsByGrade:!1,showRemoveStudentsByClass:!1,showDownloadStudentHistories:!1,showRenameCurrentClass:!1,showUpdateNewGrade:!1,showExportStudentsByGrade:!1}}componentDidUpdate(){const{allGradesRendering:e}=this.state;e&&setTimeout((()=>{this.setState({allGradesRendering:!1})}),200)}render(){const{studentsData:e=[],schoolSettings:t={},settings:n,currentSchoolGrades:r,newSchoolGrades:o,selectedFilterId:i,currentClasses:s,newClasses:a,schoolCharacteristics:l,studentFlags:c,bulkUploadStudentsMutation:u,school:d,dashboard:h}=this.props,{loading:p,allGradesRendering:f,studentId:m,errors:g,addStudentDetails:v,studentModal:y,successModal:b,addModal:x,searchValue:w,displayBulkUploadScreen:S,displayPowerschoolSyncScreen:C,displaySftpSyncScreen:j,showDownloadStudentHistories:_,showRenameCurrentClass:k,showUpdateNewGrade:N,showDeleteStudentCharacteristicResponses:E,showDeleteAllConstraintsFriends:T,showDeleteAllRequestConstraints:O,showDeleteAllStudentNotes:I,showRemoveStudentsByGrade:R,showRemoveStudentsByClass:A,showExportStudentsByGrade:M}=this.state,P=this.deleteRefetchQueries.concat([{query:ve,variables:{id:m,adminOnly:n.adminOnlyRequests}}]),D=()=>this.setState((e=>({displayPowerschoolSyncScreen:!e.displayPowerschoolSyncScreen}))),F=()=>this.setState((e=>({displaySftpSyncScreen:!e.displaySftpSyncScreen}))),L=()=>{this.setState((({displayBulkUploadScreen:e})=>({displayBulkUploadScreen:!e})))},B=()=>{this.setState({displayBulkUploadScreen:!0})};if(C)return(0,pr.jsx)(SC,{school:d,toggleSync:D,refetchQueries:P});if(j)return(0,pr.jsx)(CC,{school:d,toggleSync:F,refetchQueries:P});const U=0===h.studentCount&&h.inactiveStudentCount>50,G=f?"cursor-wait":"";if(e.length<1||S)return(0,pr.jsxs)(pr.Fragment,{children:[U&&(0,pr.jsx)(o_,{}),(0,pr.jsx)(yk,{type:"Students",title:"Import Students",step1:"1. Download and complete the students template",backText:"< Back to Students page",file:dC,fileUploadMutation:u,knownWarnings:bC,nextStep:"/Students/Upload/Columns",toggleBulkUploadScreen:L,displayBulkUploadScreen:S,requiredHeaders:"Student ID,First Name,Surname,Gender,Current Grade,Current Class",videoUrl:"https://player.vimeo.com/video/881352047?h=ebbd13f070",videoUrl2:"https://player.vimeo.com/video/881352112?h=eb5be48b28",videoDescriptionText:"Importing students for the first time?",videoDescriptionText2:"Adding new enrolments or additional grades?",videoOpenText:"Watch Video",videoOpenText2:"Watch Video",children:(d.powerschoolSisConfig||d.sftpSisConfig)&&!S&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2",children:"...or Import from a Student Information System"}),(0,pr.jsxs)("div",{className:"d-flex",children:[d.powerschoolSisConfig&&(0,pr.jsx)(ld,{className:"mx-2",onClick:D,children:"Import from PowerSchool"}),d.sftpSisConfig&&(0,pr.jsx)(ld,{className:"mx-2",onClick:F,children:"Import from SFTP Server"})]})]})})]});const $=n.adminOnlyRequests,q=e=>`${e.firstName.toLowerCase()} ${e.lastName.toLowerCase()}`,z=e.reduce(((e,t)=>{const n=q(t),r=e[n];return e[n]=r?r+1:1,e}),{}),V=r.filter((e=>!PC(e))).flatMap((e=>[{id:`gradeId-${e.id}`,label:e.label,value:e.id,filterFunction:t=>t.currentGrade.id===e.id}])).concat([{id:"all-grades",label:"All Grades",filterFunction:()=>!0},{id:"new-students",label:"New Students",filterFunction:e=>null===e.currentClass||e.currentClass.label.startsWith("New_")||e.currentGrade.code===fC},{id:"unallocated-students",label:"Unallocated Students",filterFunction:e=>{const t=this.props.schoolGradesWithSolutions.map((({id:e})=>e));return!e.newClass&&t.includes(e.newGrade.id)}},{id:"missing-ids",label:"Students with no IDs",filterFunction:e=>OC(e.studentCode)},{id:"students-leaving",label:"Students Leaving",filterFunction:e=>"LEAVING"===e.newGrade.code},{id:"potential-duplicate-students",label:"Potential duplicate students",filterFunction:e=>{const t=q(e),n=z[t];return!!n&&n>1}}]),H=V.find((({id:e})=>e===i))||((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t.filter(r.filterFunction).length>0)return r}return e[0]})(V,e),W=(0,pr.jsx)(sN,{onChange:this.onFilterChange,value:H.id,options:V}),Y=((e,t)=>{if(""===t)return e;const n=t.toLowerCase();return e.filter((e=>[e.firstName,e.lastName,e.studentCode].join(" ").toLowerCase().includes(n)))})(e.filter(H.filterFunction),w).filter((e=>!(e=>c.deletedStudent===e.id)(e)));$S(Y);let Q=[],J=[],K=[];return Q.push({onClick:()=>{this.props.navigate("/Students/Characteristics/Upload")},text:"Bulk Import Characteristic",icon:"fa-upload"}),Q.push({onClick:()=>{this.props.navigate("/Students/FriendshipPreferences/Upload")},text:"Bulk Import Friendship Preferences",icon:"fa-upload"}),Q.push({onClick:()=>{this.props.navigate("/Students/StudentNotes/Upload")},text:"Bulk Import Student Notes",icon:"fa-upload"}),d.powerschoolSisConfig&&K.push({onClick:()=>this.setState({displayPowerschoolSyncScreen:!0}),text:"Sync from Powerschool",icon:"fa-refresh"}),d.sftpSisConfig&&K.push({onClick:()=>this.setState({displaySftpSyncScreen:!0}),text:"Sync from SFTP Server",icon:"fa-refresh"}),K.push({onClick:()=>this.setState({showExportStudentsByGrade:!0}),text:"Export Students",icon:"fa-download"}),K.push({onClick:()=>this.setState({showDownloadStudentHistories:!0}),text:"Download Student History",icon:"fa-download"}),K.push({onClick:()=>this.setState({showRenameCurrentClass:!0}),text:"Rename Current Class",icon:"fa-pencil"}),K.push({onClick:()=>this.setState({showUpdateNewGrade:!0}),text:`Update ${this.props.gettextObj.gettext("New Grade")}`,icon:"fa-refresh"}),J.push({onClick:()=>this.setState({showDeleteStudentCharacteristicResponses:!0}),text:"Remove Characteristic Responses",icon:"fa-trash"}),J.push({onClick:()=>this.setState({showDeleteAllConstraintsFriends:!0}),text:"Remove Friendship Preferences",icon:"fa-trash"}),J.push({onClick:()=>this.setState({showDeleteAllRequestConstraints:!0}),text:"Remove Requests",icon:"fa-trash"}),J.push({onClick:()=>this.setState({showDeleteAllStudentNotes:!0}),text:"Remove Student Notes",icon:"fa-trash"}),J.push({onClick:()=>this.setState({showRemoveStudentsByGrade:!0}),text:"Remove Students by Grade",icon:"fa-trash"}),J.push({onClick:()=>this.setState({showRemoveStudentsByClass:!0}),text:"Remove Students by Class",icon:"fa-trash"}),(0,pr.jsxs)("div",{className:`c-students-page u-row-fix ${G}`,children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fh,{type:"Students",addText:"Add Student",bulkImportText:"Bulk Import Students",onAddClick:this.toggleAdd,searchPlaceholder:"Search student...",onSearchChange:this.onSearchChange,searchValue:w,adminMode:$,filterComponent:W,onImportClick:B,additionalImportActions:Q,additionalRemoveActions:J,additionalActions:K}),f?(0,pr.jsx)("div",{className:"w-100 mt-5 d-flex justify-content-center align-items-center",children:"Loading all grade students, please wait..."}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)($C,{students:Y,schoolCharacteristics:l,teacherRequestsEditable:!0,studentRequestsEditable:!0,maxFriends:t.maxFriends,navToCharacteristics:this.navToCharacteristics,onAddRequestClick:this.onAddRequestClick,onRowClick:this.onRowClick}),"all-grades"!==H.id||""!==w?(0,pr.jsx)("div",{className:"u-total-text ml-2 my-2",children:`Total - ${Y.length}/${e.length} Students`}):(0,pr.jsx)("div",{className:"u-total-text ml-2 my-2",children:`Total - ${e.length} Students`})]})]}),(0,pr.jsx)(tC,{toggle:this.toggleAdd,isOpen:x,refetchQueries:this.refetchQueries,onSuccessfulAdd:this.onSuccessfulAdd,onChange:this.onChange,onCurrentClassChange:this.onCurrentClassChange,onGenderChange:this.onGenderChange,addStudent:this.addStudent,student:v,errors:g,loading:p,newClasses:a,currentSchoolGrades:r,newSchoolGrades:o,currentClasses:s,onBulkUploadClick:B}),(0,pr.jsx)(aN,{isOpen:b,toggle:this.closeSuccessModal,heading:"Add Student Success",text:"Student was successfully added"}),(0,pr.jsx)(uj,{isOpen:y,toggle:this.toggle,studentId:m,showTeacherRequests:!0,showStudentRequests:!0,teacherRequestsEditable:!0,studentRequestsEditable:!0,studentEditable:!0,showFriendships:!0,friendshipEditable:!0,showCharacteristics:!0,characteristicsEditable:!0,currentSchoolGrades:r,newSchoolGrades:o,currentClasses:s,refetchQueries:P,deleteRefetchQueries:this.deleteRefetchQueries}),E&&(0,pr.jsx)(i_,{schoolId:uw(),adminOnly:n.adminOnlyRequests,characteristics:l,deleteStudentCharacteristicResponsesByCurrentGradeMutation:Lw,refetchQueries:this.deleteRefetchQueries,toggle:()=>this.setState({showDeleteStudentCharacteristicResponses:!1})}),T&&(0,pr.jsx)(T_,{schoolId:uw(),toggle:()=>this.setState({showDeleteAllConstraintsFriends:!1}),title:"Remove Friendship Preferences",description:"This function removes the Friendship Preferences for students in the Current Grade/s you have selected.  Students in Current Grade/s not selected will not be affected.",cautionHeading:"Remove Friendship Preferences",cautionText:"You can not \u2018undo\u2019 the operation.  Friendship Nominations will be permanently deleted for students in selected Current Grade/s.",removeButtonText:"Remove Friends",cautionButtonText:"Yes, Proceed",successMessage:"Friendship Preferences by grade have been removed.",errorMessage:"Could not remove data",refetchQueries:this.deleteRefetchQueries,removeByGradesMutation:oC}),O&&(0,pr.jsx)(T_,{schoolId:uw(),toggle:()=>this.setState({showDeleteAllRequestConstraints:!1}),title:"Remove Requests",description:"This function removes the Requests for students in the Current Grade/s you have selected.  Students in Current Grade/s not selected will not be affected.",cautionHeading:"Remove Requests",cautionText:"You can not \u2018undo\u2019 the operation.  Requests will be permanently deleted for students in selected Current Grade/s.",removeButtonText:"Remove Requests",cautionButtonText:"Yes, Proceed",successMessage:"Requests by grade have been removed.",errorMessage:"Could not remove data",refetchQueries:this.deleteRefetchQueries,removeByGradesMutation:Rw}),I&&(0,pr.jsx)(T_,{schoolId:uw(),toggle:()=>this.setState({showDeleteAllStudentNotes:!1}),title:"Remove Student Notes",description:"This function removes the Student Notes for students in the Current Grade/s you have selected.  Students in Current Grade/s not selected will not be affected.  ",cautionHeading:"Remove Student Notes",removeButtonText:"Remove Notes",cautionText:"You can not \u2018undo\u2019 the operation.  Student Notes will be permanently deleted for students in selected Current Grade/s.",cautionButtonText:"Yes, Proceed",successMessage:"Students Notes by grade have been removed.",errorMessage:"Could not remove data",refetchQueries:this.deleteRefetchQueries,removeByGradesMutation:Ee}),R&&(0,pr.jsx)(T_,{schoolId:uw(),toggle:()=>this.setState({showRemoveStudentsByGrade:!1}),title:"Remove Students by Current Grade",description:"This function removes students based on the Current Grade or grades that you select below. Students in grade/s not selected will not be affected.",cautionHeading:"Remove Students",removeButtonText:"Remove Students",cautionText:"You can not 'undo' this operation. Are you sure you would like to permanently remove all students by grade?",cautionButtonText:"Yes, Proceed",successMessage:"Students by grade have been removed.",errorMessage:"Could not remove data",refetchQueries:this.deleteRefetchQueries,removeByGradesMutation:Ie}),M&&(0,pr.jsx)(u_,{schoolId:uw(),toggle:()=>this.setState({showExportStudentsByGrade:!1,errors:{export:null}}),title:"Export Students by Current Grade",description:"This function exports students based on the Current Grade/s that you select below.",primaryButtonText:"Export Students",exportFunction:this.csvExport,errorMessage:this.state.errors.export}),A&&(0,pr.jsx)(I_,{schoolId:uw(),toggle:()=>this.setState({showRemoveStudentsByClass:!1}),adminOnly:n.adminOnlyRequests}),_&&(0,pr.jsx)(s_,{toggle:()=>{this.setState({showDownloadStudentHistories:!1})}}),k&&(0,pr.jsx)(R_,{schoolId:uw(),toggle:()=>{this.setState({showRenameCurrentClass:!1})}}),N&&(0,pr.jsx)(H_,{schoolId:uw(),toggle:()=>{this.setState({showUpdateNewGrade:!1})},adminOnly:n.adminOnlyRequests})]})}}BC.contextType=tu;const UC=e=>{const t=o.useContext(Cw).gettextObj;return(0,pr.jsx)(BC,{gettextObj:t,...e})};var GC=n(1094);const $C=e=>{const{students:t,onRowClick:n,maxFriends:r,schoolCharacteristics:i,navToCharacteristics:s}=e,a=o.useContext(Cw).gettextObj,l=o.useCallback(((e,t,n)=>{const r=e.values[n],o=t.values[n];return r&&o&&r.studentTo&&o.studentTo?r.studentTo.lastName.localeCompare(o.studentTo.lastName):r?-1:1}),[]),c=o.useCallback(((e,t,n)=>{const r=e.values[n],o=t.values[n];if(r&&o){const n={grades:[e.values.currentGrade],...r},i={grades:[t.values.currentGrade],...o};return HS(e.values,n,t.values,i)}return 1}),[]),u=o.useCallback(((e,t,n)=>{const r=e.values[n],o=t.values[n],i=r?r.label:"",s=o?o.label:"";return i.localeCompare(s)}),[]),d=e=>`sc-${e.id}`,h=o.useMemo((()=>[{Header:"Student Details",headerClassName:"sticky-column-1",columns:[{Header:"First Name",accessor:"firstName",className:"first-name-cell sticky-column-1",headerClassName:"sticky-column-1"},{Header:"Last Name",accessor:"lastName",className:"last-name-cell sticky-column-2",headerClassName:"sticky-column-2"}]},{Header:" ",columns:[{Header:"ID",accessor:"studentCode",Cell:WC},{Header:"Gender",accessor:"gender",className:"gender-cell",headerClassName:"text-center"},{Header:"Current Grade",Cell:e=>e.value.label,accessor:"currentGrade",className:"current-grade-cell text-center",headerClassName:"text-center",disableSortBy:!0},{Header:"Current Class",Cell:qC,accessor:"currentClass",className:"current-class-cell",headerClassName:"text-center",sortType:c},{accessor:"newGrade",Header:`${a.gettext("New Grade")}`,Cell:e=>e.value.label,className:"new-grade-cell text-center",headerClassName:"text-center",sortType:c},{Header:`New ${a.gettext("Class")}`,Cell:qC,accessor:"newClass",className:"new-class-cell",headerClassName:"text-center",sortType:c},{Header:"Notes",accessor:"comments",className:"notes-cell"}]},{Header:"Requests",headerClassName:"total-column",columns:[{Header:"Total",Cell:VC,accessor:"constraintsCount",headerClassName:"total-column",className:"text-center"}]},{Header:()=>(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsx)("span",{children:"Characteristics"}),(0,pr.jsx)("span",{children:(0,pr.jsx)("i",{className:"fa fa-cog",onClick:s})})]}),id:"characteristics-header",headerClassName:"characteristic-column",columns:i.map((e=>({Header:zC,Cell:HC,id:d(e),accessor:d(e),className:"text-center",headerClassName:"characteristic-column",characteristic:e,sortType:u})))},{Header:"Friendships",headerClassName:"friendship-column",columns:Array(r).fill().map(((e,t)=>({Header:`Friend ${t+1}`,Cell:YC,accessor:`friends[${t}]`,headerClassName:"friendship-column",friendIndex:t,sortType:l})))}]),[s,r,c,l,i,u,a]),p=o.useMemo((()=>t.map((e=>i.reduce(((t,n)=>{const r=e.characteristicResponses.find((e=>e.characteristicId===n.id));return{...t,[d(n)]:r}}),e)))),[t,i]),f={...e,data:p,columns:h,autoResetSortBy:!1},{getTableProps:m,getTableBodyProps:g,headerGroups:v,rows:y,prepareRow:b}=(0,GC.useTable)(f,GC.useSortBy);return(0,pr.jsx)("div",{className:"students-sortable-table",children:(0,pr.jsxs)("table",{...m(),cellSpacing:"0",children:[(0,pr.jsx)("thead",{className:0===t.length?"no-data":"",children:v.map((e=>(0,pr.jsx)("tr",{...e.getHeaderGroupProps(),children:e.headers.map((e=>{const t={...e.getHeaderProps({...e.getSortByToggleProps(),className:e.headerClassName})};return(0,pr.jsxs)("th",{...t,title:"",children:[e.render("Header"),(0,pr.jsx)("span",{children:e.isSorted?e.isSortedDesc?" \u2193":" \u2191":""})]})}))})))}),0===t.length&&(0,pr.jsx)("tbody",{children:(0,pr.jsx)("tr",{className:"empty-row",children:(0,pr.jsx)("td",{className:"empty-data-cell",colSpan:"100",children:"There are no students matching this filter. Try selecting a different filter from the \u2018Filter\u2019 dropdown above."})})}),t.length>0&&(0,pr.jsx)("tbody",{...g(),children:y.map((e=>{b(e);return(0,pr.jsx)("tr",{onClick:()=>n(e.original.id),...e.getRowProps(),children:e.cells.map((e=>{const t=e.getCellProps({className:e.column.className});return(0,pr.jsx)("td",{...t,children:e.render("Cell")})}))})}))})]})})},qC=e=>e.value?(0,pr.jsx)(gm,{className:"mx-auto",label:e.value.label}):null,zC=e=>{const{column:{characteristic:t}}=e;return(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100 pr-1",children:[(0,pr.jsx)("span",{className:"font-bold",children:t.name}),(0,pr.jsx)("i",{className:"fa fa-info-circle font-size-14 u-opacity-50","data-tooltip-id":`characteristic-${t.id}`}),(0,pr.jsx)(Jf,{name:t.name,id:`characteristic-${t.id}`,place:"right",variant:"light",characteristicResponses:t.characteristicResponses})]})},VC=e=>{const{value:t,teacherRequestsEditable:n,studentRequestsEditable:r,onAddRequestClick:o,row:i}=e;if(n||r){const e=()=>o(i.values.studentCode);return(0,pr.jsxs)("span",{className:"add-button",onClick:e,children:[t,(0,pr.jsx)("i",{className:"ml-2 fa fa-plus"})]})}return t},HC=({value:e})=>e?e.label:"",WC=({value:e})=>(0,pr.jsx)("div",{className:e&&OC(e)?"generated":"",children:e}),YC=e=>{const{value:t}=e;return t?(0,pr.jsx)("div",{className:"friend-cell",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsxs)("span",{className:"friends-name",children:[t.studentTo.firstName," ",t.studentTo.lastName]}),t.studentTo.currentClass&&(0,pr.jsx)(gm,{label:t.studentTo.currentClass.label})]})}):null};var QC=n(5445);const JC=e=>e.length<1?[{firstName:"",lastName:"",gender:"",constraintsCount:0,characteristicResponses:[],friends:[]}]:e,KC=({students:e,teacherMode:t,maxFriends:n,schoolCharacteristics:r,teacherRequestsEditable:o,studentRequestsEditable:i,onAddRequestClick:s,onRowClick:a,navToCharacteristics:l})=>{const c=Array(n).fill().map(((e,t)=>({label:"Friend "+(t+1)}))),u=su(r)&&r.length>0;return(0,pr.jsxs)("div",{className:"c-students-table",children:[(0,pr.jsxs)(QC.StickyTable,{id:"student-table-id",stickyHeaderCount:1,leftStickyColumnCount:1,borderWidth:"inherit",children:[(0,pr.jsxs)(QC.Row,{className:"c-students-table__sections",children:[(0,pr.jsxs)(QC.Cell,{style:{zIndex:4},className:"section student-details fixed-column-1",children:[(0,pr.jsx)("span",{children:"STUDENT DETAILS"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details count",children:"\xa0"})]}),(0,pr.jsxs)(QC.Cell,{style:{zIndex:3},className:"section student-details fixed-column-2",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details first-name",children:"First Name"})]}),(0,pr.jsxs)(QC.Cell,{style:{zIndex:3},className:"section student-details-last-name fixed-column-3",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details last-name",children:"Last Name"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details id",children:"ID"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details gender",children:"Gender"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details current-grade",children:"Current Grade"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details current-class",children:"Current Class"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details new-grade",children:"New Grade"})]}),!t&&(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details new-class",children:"New Class"})]}),(0,pr.jsxs)(QC.Cell,{className:"section student-details",children:[(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsx)("div",{className:"c-students-table__headers header student-details notes",children:"Notes"})]}),(o||i)&&(0,pr.jsxs)(QC.Cell,{className:"section requests",children:[(0,pr.jsx)("span",{children:"REQUESTS"}),(0,pr.jsx)("div",{className:"c-students-table__headers header requests",children:"Total"})]}),u&&r.map(((e,t)=>{const n=t===r.length-1;let o;o=0===t?(0,pr.jsx)("span",{children:"CHARACTERISTICS"}):n?(0,pr.jsx)("span",{className:"characteristics-icon",children:(0,pr.jsx)("i",{className:"fa fa-gear pr-4 cursor-pointer",onClick:l})}):(0,pr.jsx)("span",{children:"\xa0"});const i=(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100 pr-1",children:[(0,pr.jsx)("span",{children:e.name}),(0,pr.jsx)("i",{className:"fa fa-info-circle font-size-14 u-opacity-50","data-tooltip-id":`characteristic-${t}`})]});return(0,pr.jsxs)(QC.Cell,{className:"section characteristics",children:[o,(0,pr.jsx)("div",{className:"c-students-table__headers header characteristics",children:i},t)]},t)})),c.length>0&&c.map(((e,t)=>{const n=0===t?(0,pr.jsx)("span",{children:"FRIENDSHIPS"}):(0,pr.jsx)("span",{children:"\xa0"});return(0,pr.jsxs)(QC.Cell,{className:"section friendships",children:[n,(0,pr.jsx)("div",{className:"c-students-table__headers header friendships",children:e.label},t)]},t)}))]}),JC(e).map(((e,l)=>(0,pr.jsx)(sj,{data:e,index:l,className:t&&"c-students-table__student-survey",maxFriends:n,teacherMode:t,teacherRequestsEditable:o,studentRequestsEditable:i,onAddRequestClick:s,schoolCharacteristics:r,onRowClick:a},l)))]}),u&&r.map(((e,t)=>(0,pr.jsx)(Jf,{style:{zIndex:"10"},name:e.name,id:`characteristic-${t}`,place:"right",variant:"light",characteristicResponses:e.characteristicResponses},t)))]})},XC=["#60c3e2","#1d2ed2","#7bf031","#ce3fd9","#fca613","#3b2584","#e7181c","#fbd90b"],ZC=["#60c3e28c","#1d2ed25e","#7bf0318c","#ce3fd975","#fca6138c","#3b258475","#e7181c75","#fbd90ba3","#60c3e23F","#1d2ed294","#7bf031e6","#ce3fd8c4","#fca613d0","#3b25849d","#e7181cb8","#fbd90bef","#60c3e2ff","#1d2ed2a3","#7bf031ff","#ce3fd9d1","#fca613e8","#3b2584ba","#e7181cd1","#fbd90bff"],ej=["ff","e8","d1","ba","a3","8c","75","5e","47","30","19","00"].reduce(((e,t)=>e.concat(XC.map((e=>e+t)))),[]),tj=(e,t)=>{const n=t.find((t=>t.characteristicId===e.id));if(n)return e.characteristicResponses.find((e=>e.value===n.value))},nj=e=>e.reduce(((e,t)=>Object.assign({[t.id]:t.characteristicResponses.map((e=>e.id))},e)),{}),rj=e=>e&&"-1"===e.id;function oj(e,t,n){const r=[],o=t.filter((t=>t.studentTo.id!==e));for(let i=0;i<n;i++)o[i]?r.push((0,pr.jsx)(QC.Cell,{className:"cell friends",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsx)("span",{className:"friends-name",children:o[i].studentTo.firstName+" "+o[i].studentTo.lastName}),(0,pr.jsx)(gm,{label:ou(o[i],"studentTo.currentClass.label")})]})},i)):r.push((0,pr.jsx)(QC.Cell,{className:"cell friends"},i));return r}function ij(e,t){if(su(e)&&e.length>0)return e.map(((e,n)=>{const r=tj(e,t);return(0,pr.jsx)(QC.Cell,{className:"cell characteristics",children:r?r.label:""},n)}))}const sj=({data:e,index:t,className:n,maxFriends:r,teacherRequestsEditable:o,studentRequestsEditable:i,onAddRequestClick:s,schoolCharacteristics:a,teacherMode:l,onRowClick:c})=>{const{id:u,firstName:d,lastName:h,studentCode:p,comments:f,gender:m,currentGrade:g,currentClass:v,newGrade:y,newClass:b,constraintsCount:x,characteristicResponses:w,friends:S}=e,C=p&&OC(p);return(0,pr.jsxs)(QC.Row,{className:"c-students-table__data u-data-row",onClick:()=>c(e.id),children:[(0,pr.jsx)(QC.Cell,{className:`cell u-table-edit-icon count ${n} fixed-column-1`,children:t+1}),(0,pr.jsx)(QC.Cell,{className:`cell first-name ${n} fixed-column-2`,children:d}),(0,pr.jsx)(QC.Cell,{className:`cell last-name ${n} fixed-column-3`,children:h}),(0,pr.jsx)(QC.Cell,{className:`cell id ${n} ${C&&"generated"}`,children:p}),(0,pr.jsx)(QC.Cell,{className:`cell gender ${n}`,children:m}),(0,pr.jsx)(QC.Cell,{className:`cell current-grade ${n}`,children:ou(g,"label")}),(0,pr.jsx)(QC.Cell,{className:`cell current-class ${n}`,children:(0,pr.jsx)(gm,{label:ou(v,"label")})}),(0,pr.jsx)(QC.Cell,{className:`cell new-grade ${n}`,children:ou(y,"label")}),!l&&(0,pr.jsx)(QC.Cell,{className:`cell new-class ${n}`,children:(0,pr.jsx)(gm,{label:ou(b,"label")})}),(0,pr.jsx)(QC.Cell,{className:"cell notes",children:f}),(o||i)&&(0,pr.jsx)(QC.Cell,{className:"cell requests-total",children:(0,pr.jsxs)("span",{className:"add-button",onClick:()=>{s(u)},children:[x,(0,pr.jsx)("i",{className:"ml-2"})]})}),ij(a,w),oj(u,S,r)]},t)};var aj=function(e){var t=p();return c.createElement(t.Consumer,null,(function(t){return(0,l.V1)(t&&t.client,44),e.children(t.client)}))};function lj(e,t){void 0===t&&(t={});var n="withApollo(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),r=function(r){function o(e){var t=r.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return(0,a.C6)(o,r),o.prototype.getWrappedInstance=function(){return(0,l.V1)(t.withRef,48),this.wrappedInstance},o.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},o.prototype.render=function(){var n=this;return c.createElement(aj,null,(function(r){var o=Object.assign({},n.props,{client:r,ref:t.withRef?n.setWrappedInstance:void 0});return c.createElement(e,(0,a.Cl)({},o))}))},o.displayName=n,o.WrappedComponent=e,o}(c.Component);return km(r,e,{})}class cj extends o.Component{constructor(e){super(e),this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error),aw(e.errorNewClasses)},this.onToggle=()=>{this.isEditing()?this.setState({cautionModal:!0}):this.props.toggle()},this.onIterateStudent=e=>()=>{this.isEditing()?this.setState({cautionModal:!0}):e()},this.toggleCautionModal=()=>{this.setState({cautionModal:!this.state.cautionModal})},this.resetEditing=()=>{this.setState({cautionModal:!1,studentDetailsEdit:!1,characteristicsEdit:!1,friendshipsEdit:!1,requestsEdit:!1})},this.isEditing=()=>this.state.studentDetailsEdit||this.state.characteristicsEdit||this.state.friendshipsEdit||this.state.requestsEdit,this.toggleEdit=e=>()=>this.setState((t=>({[e]:!t[e]}))),this.setEdit=e=>t=>{this.state[e]!==t&&this.setState({[e]:t})},this.state={studentDetailsEdit:!1,characteristicsEdit:!1,friendshipsEdit:!1,requestsEdit:!1,cautionModal:!1}}render(){const{isOpen:e,isTeacher:t,teacherRequestsEditable:n,studentRequestsEditable:r,studentEditable:i,friendshipEditable:s,characteristicsEditable:a,studentId:l,showTeacherRequests:c,showStudentRequests:u,showCharacteristics:d,showFriendships:h,nextStudent:p,prevStudent:f,currentClasses:m,newClasses:g,currentSchoolGrades:v,newSchoolGrades:y,students:b,teachers:x,schoolCharacteristics:w,schoolSettings:S,settings:C,myprofile:j,client:_,createOrUpdateStudentMutation:k,createOrUpdateConstraintsFriend:N,deleteStudentMutation:E,studentRequestMutation:T,teacherRequestMutation:O,deleteConstraintsStudent:I,deleteConstraintsTeacher:R,updateSelectedStudent:A,updateStudentEditFlag:M,updateStudentCharacteristicResponses:P,updateInsensitiveStudentCharacteristicResponses:D,refetchQueries:F,deleteRefetchQueries:L=[],loadingOne:B,loadingTwo:U,loadingThree:G,loadingFour:$,loadingSix:q,loadingSeven:z,loadingEight:V,loadingNine:H}=this.props;return(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsxs)(Yf,{isOpen:e,className:"c-student-modal modal-dialog-centered",children:[f?(0,pr.jsx)("i",{className:"c-student-modal__icon c-student-modal__icon--prev fa fa-chevron-left",onClick:this.onIterateStudent(f)}):null,p?(0,pr.jsx)("i",{className:"c-student-modal__icon c-student-modal__icon--next fa fa-chevron-right",onClick:this.onIterateStudent(p)}):null,(0,pr.jsx)(Vm,{client:_,query:ve,variables:{id:l,adminOnly:C.adminOnlyRequests},children:({loading:e,error:o,data:p,refetch:f})=>{if(e||B||U||G||$||q||z||V||H)return(0,pr.jsx)(qk,{});if(o)return(0,pr.jsx)(eN,{error:o,refetch:f});const{id:_,characteristicResponses:W,friends:Y,teacherConstraints:Q,studentConstraints:J}=p.student,K=Q&&Q.concat(J);return(0,pr.jsxs)("div",{className:"c-student-modal__modal",children:[(0,pr.jsx)(Rj,{toggle:this.onToggle,student:p.student,refetchQueries:F,deleteRefetchQueries:L,currentSchoolGrades:v,newSchoolGrades:y,currentClasses:m,newClasses:g,createOrUpdateStudentMutation:k,deleteStudentMutation:E,updateSelectedStudent:A,updateStudentEditFlag:M,toggleEdit:this.toggleEdit("studentDetailsEdit"),editable:i,isTeacher:t}),(0,pr.jsxs)("div",{className:"c-student-modal__modal__body",children:[d&&(0,pr.jsx)(hj,{schoolCharacteristics:w,updateStudentCharacteristicResponses:t?D:P,studentResponses:W,studentId:_,refetchQueries:F,updateStudentEditFlag:M,toggleEdit:this.toggleEdit("characteristicsEdit"),editable:a}),h&&(0,pr.jsx)(mj,{studentId:l,friends:Y,students:b,createOrUpdateConstraintsFriend:N,refetchQueries:F,maxFriends:S.maxFriends,updateStudentEditFlag:M,toggleEdit:this.toggleEdit("friendshipsEdit"),editable:s}),(u||c)&&(0,pr.jsx)(Ij,{studentId:_,requests:K,teacherRequestsEditable:n,studentRequestsEditable:r,students:b,teachers:x,inputByName:Uh(j),refetchQueries:F.concat([{query:Nw,variables:{adminOnly:C.adminOnlyRequests,schoolId:uw()}}]),studentRequestMutation:T,teacherRequestMutation:O,deleteConstraintsStudent:I,deleteConstraintsTeacher:R,updateStudentEditFlag:M,adminOnlySetting:C.adminOnlyRequests,toggleEdit:this.toggleEdit("requestsEdit"),setEdit:this.setEdit("requestsEdit")})]})]})}},l)]}),this.state.cautionModal&&(0,pr.jsx)(mN,{isOpen:!0,toggle:this.toggleCautionModal,heading:"Unsaved Changes",text:"Your changes have not been saved, are you sure you want to leave?",onDontSaveButtonClick:()=>{this.resetEditing(),this.props.toggle()}})]})}}const uj=ng()(eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Se,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,students:t,error:n}})=>({loadingOne:e,students:t,error:n})}),eg(og,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,teachers:t}})=>({loadingTwo:e,teachers:t})}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolSettings:t}})=>({loadingFour:e,schoolSettings:t})}),eg(mg,{skip:({showTeacherRequests:e,showStudentRequests:t})=>!(e||t),options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,error:t,newClasses:n}})=>({loadingSix:e,errorNewClasses:t,newClasses:n})}),eg(Dw,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loadingSeven:e,schoolCharacteristics:t})}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!1}}),props:({data:{loading:e,currentSchoolGrades:t}})=>({loadingEight:e,currentSchoolGrades:t})}),eg(vg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0}}),props:({data:{loading:e,newSchoolGrades:t}})=>({loadingNine:e,newSchoolGrades:t})}),eg(O,{props:({data:{myprofile:e}})=>({myprofile:e})}),eg(be,{name:"createOrUpdateStudentMutation"}),eg(Tw,{name:"teacherRequestMutation"}),eg(Ew,{name:"studentRequestMutation"}),eg(Ow,{name:"deleteConstraintsStudent"}),eg(Iw,{name:"deleteConstraintsTeacher"}),eg(rC,{name:"createOrUpdateConstraintsFriend"}),eg(Ce,{name:"updateStudentCharacteristicResponses"}),eg(je,{name:"updateInsensitiveStudentCharacteristicResponses"}),eg(ye,{name:"deleteStudentMutation"}),eg(te,{name:"updateSelectedStudent"}),eg(Ne,{name:"updateStudentEditFlag"}))(lj(cj)),dj=({style:e,label:t})=>(0,pr.jsx)("div",{style:e,className:"c-student-modal-characteristics__label",children:t});class hj extends o.Component{constructor(e){super(e),this.toggleEdit=()=>{this.props.toggleEdit(),this.setState({edit:!this.state.edit})},this.onCancelClick=()=>{const{studentResponses:e}=this.props;this.toggleEdit(),this.setState({studentResponses:e})},this.onSaveClick=()=>{const{updateStudentCharacteristicResponses:e,updateStudentEditFlag:t,studentId:n,refetchQueries:r}=this.props,{studentResponses:o}=this.state;this.setState({loading:!0});let i=[];o.length>0&&o.forEach((e=>{i.push(parseInt(e.id,10))}));e({variables:{studentId:n,characteristicResponseIds:i},refetchQueries:r}).then((()=>{this.toggleEdit(),this.setState({loading:!1}),t({variables:{type:Gt,value:!0}})})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could Not Update Responses"}})}))},this.onChange=(e,t)=>{const{studentResponses:n}=this.state,r=Array.from(n),o=t.characteristicResponses.find((t=>t.value===parseInt(e.target.value,10))),i=r.findIndex((e=>e.characteristicId===t.id));i>-1&&r.splice(i,1),o&&r.push(o),this.setState({studentResponses:r})},this.state={loading:!1,edit:!1,errors:{},studentResponses:this.props.studentResponses}}render(){const{queryLoading:e,schoolCharacteristics:t,editable:n}=this.props,{loading:r,errors:o,studentResponses:i}=this.state,s=(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})});if(e)return s;let a;return a=this.state.edit?(0,pr.jsxs)("div",{className:"c-student-modal-characteristics__edit px-2rem",children:[(0,pr.jsx)("div",{className:"c-student-modal-characteristics__header",children:"CHARACTERISTICS"}),r?s:(0,pr.jsx)("div",{className:"mt-3",children:t.map(((e,t)=>{const n=tj(e,i),r=n?n.value:"";return(0,pr.jsxs)("div",{className:"row mb-3",children:[(0,pr.jsxs)("div",{className:"col-6",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle ml-3 icon","data-tooltip-id":`description${t}`}),(0,pr.jsx)(dj,{label:e.name}),(0,pr.jsx)(Jf,{id:`description${t}`,name:e.name,place:"right",variant:"light",characteristicResponses:e.characteristicResponses})]}),(0,pr.jsx)("div",{className:"col-6",children:(0,pr.jsxs)(Zg,{type:"select",value:r,onChange:t=>{this.onChange(t,e)},children:[""===r&&(0,pr.jsx)("option",{value:""}),e.characteristicResponses.map((e=>(0,pr.jsx)("option",{value:e.value,children:e.label},e.id))),(0,pr.jsx)("option",{value:null},null)]})})]},t)}))}),(0,pr.jsx)(Ef,{onCancelClick:this.onCancelClick,buttonText:"Save Characteristics",onButtonClick:this.onSaveClick}),(0,pr.jsx)($k,{text:o.mutation})]}):(0,pr.jsxs)("div",{className:"c-student-modal-characteristics px-2rem",children:[(0,pr.jsxs)("div",{className:"c-student-modal-characteristics__header-container",children:[(0,pr.jsx)("span",{className:"c-student-modal-characteristics__header",children:"CHARACTERISTICS"}),n&&(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:this.toggleEdit,children:"Edit"})]}),(0,pr.jsx)("div",{className:"mt-3",children:t.map(((e,t)=>{const n=tj(e,i),r=n?{borderLeft:`4px solid ${n.colour}`}:{};return(0,pr.jsxs)("div",{className:"row p-0",children:[(0,pr.jsx)("div",{className:"col-6",children:(0,pr.jsx)(dj,{label:e.name,style:r})}),(0,pr.jsx)("div",{className:"col-6 c-student-modal-characteristics__response",children:n&&(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{children:n.label}),n.description&&(0,pr.jsxs)("span",{children:[(0,pr.jsx)("i",{className:"fa fa-info-circle ml-3","data-tooltip-id":`description${t}`}),(0,pr.jsx)(kf,{id:`description${t}`,place:"right",border:"1px solid #dce1e8",opacity:1,variant:"light",children:n.description})]})]})})]},t)}))})]}),a}}const pj=({name:e,studentClass:t})=>(0,pr.jsxs)("div",{className:"c-friendships__friend-badge",children:[(0,pr.jsx)("span",{className:"pr-2",children:e}),(0,pr.jsx)(gm,{label:t})]}),fj=e=>{const t=Uh(e);return e.currentClass?`${t} (${e.currentClass.label})`:t};class mj extends o.Component{constructor(e){super(e),this.toggleEdit=()=>{this.props.toggleEdit(),this.setState({edit:!this.state.edit})},this.onChange=(e,t)=>{const{friends:n}=this.state;n[t].name=e.target.value,this.setState({friends:n})},this.onSelectPersonTo=(e,t)=>{const{friends:n}=this.state;e?n.splice(t,1,{...e,name:fj(e)}):n.splice(t,1,{name:""}),this.setState({friends:n})},this.saveFriendships=()=>{const{createOrUpdateConstraintsFriend:e,studentId:t,refetchQueries:n,updateStudentEditFlag:r}=this.props,{friends:o}=this.state,i=[];o.forEach((e=>{e.id&&i.push(e.id)}));const s={constraintsFriend:{schoolId:sessionStorage.getItem(Ht),studentFromId:t,studentToIds:i}};this.setState({loading:!0,errors:{}}),e({variables:s,refetchQueries:n}).then((()=>{this.toggleEdit(),this.setState({loading:!1}),r({variables:{type:Gt,value:!0}})})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could not update friends, please contact your School Administrator"}})}))};const t=[];this.props.friends.forEach((e=>{e&&e.studentTo.id!==this.props.studentId&&t.push({...e.studentTo,name:fj(e.studentTo)})}));for(let n=0;n<this.props.maxFriends;n++)su(t[n])||t.push({firstName:"",lastName:"",name:""});this.state={errors:{},loading:!1,edit:!1,friends:t}}renderEditStudents(e){const{maxFriends:t,students:n}=this.props,{friends:r}=this.state;return r.slice(0,t).map(((t,r)=>(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100 mb-3",children:[(0,pr.jsxs)("span",{className:"c-friendships__friend-label",children:["Friend ",r+1]}),(0,pr.jsx)(rv,{className:"w-50",children:(0,pr.jsx)(Lk,{containerClass:"flex-grow-1",nameVal:r,index:r,selectedValue:t.name,changeHandler:this.onChange,selectFunction:this.onSelectPersonTo,placeholder:"Type to select a student...",studentsToExclude:e,students:n,filteredData:n})})]},r)))}render(){const{studentId:e,editable:t}=this.props,{friends:n,loading:r,errors:o}=this.state,i=n.map((e=>e.id));return i.push(e),this.state.edit?(0,pr.jsxs)("div",{className:"c-friendships__edit px-2rem",children:[(0,pr.jsx)("div",{className:"c-friendships__header mb-4",children:"FRIENDSHIPS"}),r?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"d-flex flex-column justify-content-between align-items-center",children:this.renderEditStudents(i)}),(0,pr.jsx)(Ef,{onButtonClick:this.saveFriendships,onCancelClick:this.toggleEdit,buttonText:"Save Friendships"}),(0,pr.jsx)($k,{text:o.mutation})]})]}):(0,pr.jsxs)("div",{className:"c-friendships px-2rem",children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)("span",{className:"c-friendships__header",children:"FRIENDSHIPS"}),t&&(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:this.toggleEdit,children:"Edit"})]}),(0,pr.jsx)("div",{className:"c-friendships__friends-container",children:n.map(((e,t)=>e.firstName?(0,pr.jsx)(pj,{name:`${e.firstName} ${e.lastName}`,studentClass:ou(e,"currentClass.label")},t):""))})]})}}const gj="duplicate-friendship",vj="This student has already been nominated as a friend.",yj="duplicate-student-request",bj="A request already exists for these two students to be paired or separated.",xj="duplicate-teacher-request",wj="A request already exists for this student to be paired or separated from this teacher.",Sj="outside-grade-group",Cj="Outside Grade Group: The students/teacher are not in grades that enable them to be paired or separated.",jj="teacher-not-assigned-class",_j="Teacher Unassigned: The teacher has not yet been assigned to a class to enable the pairing or separation to be assessed.",kj=e=>{if(su(e)){if(e.includes(gj))return vj;if(e.includes(yj))return bj;if(e.includes(xj))return wj}return"Network Error, Could not save Request"},Nj=e=>{if(su(e)){if(e.reason.includes(Sj))return Cj;if(e.reason.includes(jj))return _j}},Ej=(e,t)=>(e?e.trim():"")!==(t?t.trim():""),Tj=({onClick:e})=>(0,pr.jsxs)("div",{onClick:e,className:"cursor-pointer",children:[(0,pr.jsx)("i",{className:"fa fa-plus mr-2 text-primary font-size-16"}),(0,pr.jsx)("span",{className:"text-primary u-font-weight-medium font-size-16",children:"New Request"})]}),Oj=e=>{const t=Uh(e);return e.currentClass?`${t} (${e.currentClass.label})`:t};class Ij extends o.Component{constructor(e){super(e),this.onChange=e=>{this.setState({...this.state,[e.target.name]:"adminOnly"===e.target.name?!this.state.adminOnly:e.target.value})},this.onSelectPersonTo=e=>{e?(this.props.setEdit(!0),this.setState({personToName:Oj(e),personTo:{isTeacher:"Teacher"===e.__typename,id:e.id},saveDisabled:!1})):(this.props.setEdit(!1),this.setState({personToName:"",personTo:{isTeacher:!1,id:""},saveDisabled:!0}))},this.onCheckboxChange=e=>{this.setState({...this.state,[e.target.name]:!this.state[e.target.name]})},this.onEditClick=e=>{const{studentId:t}=this.props,{studentTo:n,studentFrom:r,teacherTo:o}=e;let i="",s="";o?(i={id:o.id,isTeacher:!0},s=Oj(o)):n.id===t?(i={id:r.id,isTeacher:!1},s=Oj(r)):(i={id:n.id,isTeacher:!1},s=Oj(n)),this.toggleEdit(),this.setState({adminOnly:e.adminOnly,mandatory:e.mandatory,pair:e.pair,description:e.description||"",personToName:s,personTo:i,constraintId:e.constraintId,constraintToDelete:e})},this.toggleDeleteModal=e=>{this.setState({deleteModal:!this.state.deleteModal,constraintToDelete:e})},this.toggleEdit=()=>{this.props.toggleEdit(),this.setState({edit:!this.state.edit,errors:{},saveDisabled:!1})},this.cancelAdd=()=>{this.props.toggleEdit(),this.setState({add:!1,pair:!0,mandatory:!1,personToName:"",personTo:{id:""},description:"",constraintId:void 0,adminOnly:!1,errors:{},saveDisabled:!0})},this.toggleAdd=()=>{this.setState({add:!this.state.add,pair:!0,mandatory:!1,personToName:"",personTo:{id:""},description:"",constraintId:void 0,adminOnly:!1,errors:{},saveDisabled:!0})},this.onSuccessfulSave=()=>{const{updateStudentEditFlag:e}=this.props,{constraintId:t}=this.state;t?this.toggleEdit():this.cancelAdd(),e({variables:{type:Gt,value:!0}}),this.setState({loading:!1})},this.onErrorSave=e=>{aw(e),this.setState({loading:!1,errors:{mutation:kj(e.message)}})},this.onAddEditRequestClick=()=>{const{studentId:e,inputByName:t,adminOnlySetting:n,refetchQueries:r,teacherRequestMutation:o,studentRequestMutation:i}=this.props,{pair:s,mandatory:a,personTo:l,description:c,constraintId:u,adminOnly:d}=this.state;this.setState({loading:!0});let h={schoolId:sessionStorage.getItem(Ht),studentFromId:e,inputByName:t,pair:s,mandatory:a,constraintId:u,adminOnly:d};const p=l.isTeacher?"ConstraintsTeacher":"ConstraintsStudent",f=this.props.requests.find((e=>e.__typename===p&&e.id===u));f&&!Ej(f.description,c)||(h={...h,description:c}),r.push({query:ve,variables:{id:e,adminOnly:n}}),l.isTeacher?(h={...h,teacherToId:l.id},o({variables:h,refetchQueries:r}).then((()=>{this.onSuccessfulSave()})).catch((e=>{this.onErrorSave(e)}))):(h={...h,studentToId:l.id},i({variables:h,refetchQueries:r}).then((()=>{this.onSuccessfulSave()})).catch((e=>{this.onErrorSave(e)})))},this.onSuccessfulDelete=()=>{this.props.updateStudentEditFlag({variables:{type:Gt,value:!0}}),this.state.edit&&this.toggleEdit(),this.setState({loading:!1,deleteModal:!1,constraintToDelete:void 0})},this.onErrorDelete=e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could not delete constraint"},constraintToDelete:void 0})},this.deleteRequest=()=>{const{deleteConstraintsStudent:e,deleteConstraintsTeacher:t,adminOnlySetting:n,refetchQueries:r}=this.props,{constraintToDelete:o}=this.state;this.setState({loading:!0});const i={constraintId:o.id};r.push({query:ve,variables:{id:o.studentFrom.id,adminOnly:n}}),o.teacherTo?t({variables:i,refetchQueries:r,awaitRefetchQueries:!0}).then((()=>{this.onSuccessfulDelete()})).catch((e=>{this.onErrorDelete(e)})):(r.push({query:ve,variables:{id:o.studentTo.id,adminOnly:n}}),e({variables:i,refetchQueries:r,awaitRefetchQueries:!0}).then((()=>{this.onSuccessfulDelete()})).catch((e=>{this.onErrorDelete(e)})))},this.renderInputs=()=>{const{students:e,teachers:t,studentId:n,adminOnlySetting:r,teacherRequestsEditable:o,studentRequestsEditable:i}=this.props,{pair:s,mandatory:a,personToName:l,description:c,adminOnly:u}=this.state,d=i?e:[],h=o?t:[];let p,f;return o&&i?(p="Student/Teacher",f="Type to select a student/teacher..."):o?(p="Teacher",f="Type to select a teacher..."):i&&(p="Student",f="Type to select a student..."),(0,pr.jsxs)("div",{className:"modal-content",children:[r&&(0,pr.jsxs)("div",{className:"ml-3 mt-4",children:[(0,pr.jsx)(Zg,{type:"checkbox",className:"ml-0",name:"adminOnly",id:"adminOnly",checked:u,onChange:this.onChange}),(0,pr.jsx)(Qg,{htmlFor:"adminOnly",className:"ml-4",children:"Admin only Request"})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mt-4",children:[(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-between col",children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{children:"Pair/Separate"}),(0,pr.jsxs)("div",{className:"c-toggle ml-0 w-100",children:[(0,pr.jsx)("input",{type:"checkbox",className:"c-toggle__checkbox",name:"pair",id:"pair",checked:s,onChange:this.onCheckboxChange}),(0,pr.jsxs)("label",{className:"c-toggle__label",htmlFor:"pair",children:[(0,pr.jsx)("div",{className:"c-toggle__on",children:"Pair"}),(0,pr.jsx)("div",{className:"c-toggle__off",children:"Separate"})]})]})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{children:p}),(0,pr.jsx)(Lk,{containerClass:"flex-grow-1",nameVal:"personToName",selectedValue:l,changeHandler:this.onChange,selectFunction:this.onSelectPersonTo,placeholder:f,students:d,studentsToExclude:[n],teachers:h})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{children:"Importance"}),(0,pr.jsxs)("div",{className:"c-toggle ml-0 w-100",children:[(0,pr.jsx)("input",{type:"checkbox",className:"c-toggle__checkbox",name:"mandatory",id:"mandatory",checked:a,onChange:this.onCheckboxChange}),(0,pr.jsxs)("label",{className:"c-toggle__label",htmlFor:"mandatory",children:[(0,pr.jsx)("div",{className:"c-toggle__on",children:"Mandatory"}),(0,pr.jsx)("div",{className:"c-toggle__off",children:"Important"})]})]})]})]}),(0,pr.jsxs)(Gg,{className:"ml-3 col",children:[(0,pr.jsx)(Qg,{children:"Comment (optional - max 255 characters)"}),(0,pr.jsx)(Zg,{type:"textarea",className:"h-75",placeholder:"Comment...",name:"description",value:c||"",onChange:this.onChange,maxLength:255})]})]})]})},this.state={loading:!1,edit:!1,add:!1,deleteModal:!1,pair:!0,mandatory:!1,personToName:"",personTo:{id:""},description:"",constraintId:void 0,adminOnly:!1,errors:{},saveDisabled:!0,constraintToDelete:void 0}}renderRequestRow(e,t,n){const{mandatory:r,pair:o,studentTo:i,studentFrom:s,teacherTo:a,description:l,adminOnly:c}=t;let u,d;if(void 0===i)u=Uh(a),d="Teacher";else{const t=i.id===e?s:i;u=Uh(t),d=(0,pr.jsx)(gm,{label:ou(t,"currentClass.label")})}const h=c?"bg-admin":"",{teacherRequestsEditable:p,studentRequestsEditable:f}=this.props;return(0,pr.jsxs)("div",{className:`row c-student-modal-requests__table-row ${h}`,children:[(0,pr.jsx)("div",{className:"col-1",children:(0,pr.jsx)(xk,{mandatory:r,pair:o})}),(0,pr.jsx)("div",{className:"col-3",children:u}),(0,pr.jsx)("div",{className:"col-2 u-bold d-flex justify-content-center",children:d}),(0,pr.jsx)("div",{className:"col-4",children:l}),(p||f)&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"col-1 text-primary cursor-pointer font-size-14",onClick:()=>{this.onEditClick(t)},children:"Edit"}),(0,pr.jsx)("div",{className:"col-1 text-primary cursor-pointer font-size-14",onClick:()=>this.toggleDeleteModal(t),children:"Delete"})]})]},n)}render(){const{requests:e,studentId:t,teacherRequestsEditable:n,studentRequestsEditable:r}=this.props,{loading:o,add:i,edit:s,errors:a,deleteModal:l,saveDisabled:c,constraintToDelete:u}=this.state;let d;d=s?(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-student-modal-requests__header",children:"EDIT REQUEST"}),this.renderInputs(),(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsx)("span",{className:"text-primary pl-3 pr-3 cursor-pointer",onClick:()=>this.toggleDeleteModal(u),children:"Delete Request"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"text-primary pl-5 pr-5 cursor-pointer",onClick:this.toggleEdit,children:"Cancel"}),(0,pr.jsx)(ld,{color:"primary",onClick:this.onAddEditRequestClick,disabled:c,children:"Save Request"})]})]}),(0,pr.jsx)("div",{className:"d-flex justify-content-end w-100",children:(0,pr.jsx)($k,{text:a.mutation})})]}):i?(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-student-modal-requests__header",children:"NEW REQUEST"}),this.renderInputs(),(0,pr.jsx)(Ef,{onCancelClick:this.cancelAdd,buttonText:"Save Request",onButtonClick:this.onAddEditRequestClick,disabled:c}),(0,pr.jsx)("div",{className:"d-flex justify-content-end w-100",children:(0,pr.jsx)($k,{text:a.mutation})})]}):e&&e.length>0?(0,pr.jsxs)("div",{className:"d-flex flex-column",children:[(0,pr.jsx)("div",{className:"c-student-modal-requests__header",children:"REQUESTS"}),(0,pr.jsxs)("div",{className:"m-3",children:[(0,pr.jsxs)("div",{className:"row c-student-modal-requests__table-header",children:[(0,pr.jsx)("div",{className:"col-6 u-bold",children:"Pair/Separate"}),(0,pr.jsx)("div",{className:"col-6 u-bold",children:"Comment"})]}),e.map(((e,n)=>this.renderRequestRow(t,e,n)))]}),(n||r)&&(0,pr.jsx)(Tj,{onClick:this.toggleAdd})]}):(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"c-student-modal-requests__header-container",children:[(0,pr.jsx)("div",{className:"c-student-modal-requests__header",children:"REQUESTS"}),(n||r)&&(0,pr.jsx)(Tj,{onClick:this.toggleAdd})]}),(0,pr.jsx)("div",{className:"c-student-modal-requests__no-requests",children:"No requests recorded"})]});const h=s||i?"c-student-modal-requests-edit":"c-student-modal-requests";return(0,pr.jsxs)("div",{className:`${h} px-2rem`,children:[o?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):d,(0,pr.jsx)(Ck,{isOpen:l,toggle:()=>this.toggleDeleteModal(u),loading:o,heading:"Delete Request?",text:"Deleting the request will remove any pairing/separating information for the student.",buttonText:"Yes, delete",onButtonClick:this.deleteRequest,error:a.mutation})]})}}class Rj extends o.Component{constructor(e){super(e),this.onChange=e=>{const{student:t}=this.state;if("currentGrade"===e.target.name){const{currentSchoolGrades:n}=this.props,r=n.find((t=>t.code===e.target.value)),o=FC(r,t);this.setState({student:{...t,currentClass:"",newGrade:o?o.code:"",newClass:"",[e.target.name]:e.target.value}})}else this.setState({student:{...t,newClass:"newGrade"===e.target.name?"":t.newClass,[e.target.name]:e.target.value}})},this.onCurrentClassChange=e=>{const{student:t}=this.state;null===e||"N/A"===e.label?this.setState({student:{...t,currentClass:""}}):this.setState({student:{...t,currentClass:e.label}})},this.onGenderChange=e=>{this.setState({student:{...this.state.student,gender:e.target.value}})},this.toggleEdit=()=>{this.props.toggleEdit(),this.setState({edit:!this.state.edit})},this.onCancelEdit=()=>{const{student:e}=this.props,{firstName:t,lastName:n,id:r,studentCode:o,gender:i,comments:s}=e;this.toggleEdit(),this.setState({student:{schoolId:sessionStorage.getItem(Ht),id:r,studentCode:o,firstName:t,lastName:n,currentClass:ou(e,"currentClass.label"),currentGrade:ou(e,"currentGrade.code"),newGrade:ou(e,"newGrade.code"),newClass:ou(e,"newClass.label"),comments:s,gender:i}})},this.toggleDeleteModal=()=>{this.setState({deleteModal:!this.state.deleteModal})},this.saveStudentClick=()=>{const{createOrUpdateStudentMutation:e,refetchQueries:t,updateStudentEditFlag:n}=this.props,r=this.props.student,{student:o}=this.state,i=uC(o);this.setState({errors:i});const s={student:{...Object.fromEntries(Object.entries(o).filter((([e,t])=>!this.props.student||!["firstName","lastName","comments","studentCode"].includes(e)||this.props.student[e]!==t))),newClass:""===o.newClass?"":o.newClass}};0===Object.keys(i).length&&(this.setState({loading:!0}),this.setState({student:{...o,studentCode:r.studentCode}}),e({variables:s,refetchQueries:t}).then((()=>{this.toggleEdit(),this.setState({loading:!1}),o.newGrade!==ou(this.props,"student.newGrade.code")?n({variables:{type:Ut,value:!0}}):n({variables:{type:Gt,value:!0}})})).catch((n=>{if(aw(n),n.toString().includes(hC)){const n={student:{active:!0,schoolId:o.schoolId,studentCode:o.studentCode}};e({variables:n,refetchQueries:t}),this.setState({loading:!1,errors:{studentId:pC}})}else this.setState({loading:!1,errors:{mutation:"Network Error, Could Not Save Student"}})})))},this.onDeleteClick=()=>{const{toggle:e,deleteStudentMutation:t,updateSelectedStudent:n,updateStudentEditFlag:r,deleteRefetchQueries:o}=this.props,{student:{id:i}}=this.state;this.setState({deleteLoading:!0,errors:{}}),t({variables:{id:i},refetchQueries:o}).then((()=>{this.setState({deleteLoading:!1,deleteModal:!1}),r({variables:{type:$t,value:i}}),n({variables:{id:"",firstName:"",lastName:"",friends:[],teacherConstraints:[],studentConstraints:[]}}).then((()=>{e()}))})).catch((e=>{aw(e),this.setState({deleteLoading:!1,errors:{delete:"Network Error, Could not delete Student"}})}))},this.state={edit:!1,deleteModal:!1,deleteLoading:!1,student:{schoolId:sessionStorage.getItem(Ht),id:this.props.student.id,studentCode:this.props.student.studentCode,firstName:this.props.student.firstName,lastName:this.props.student.lastName,currentClass:ou(this.props,"student.currentClass.label")||"",currentGrade:ou(this.props,"student.currentGrade.code"),newGrade:ou(this.props,"student.newGrade.code"),newClass:ou(this.props,"student.newClass.label"),gender:this.props.student.gender,comments:this.props.student.comments},errors:{}}}render(){const{toggle:e,newSchoolGrades:t,currentSchoolGrades:n,currentClasses:r,newClasses:o,editable:i,isTeacher:s,student:{firstName:a,lastName:l,gender:c,studentCode:u,currentClass:d,comments:h}}=this.props,{loading:p,edit:f,student:m,errors:g,deleteLoading:v}=this.state;if(f)return(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Kk,{title:"Edit Student",toggle:e,className:"px-2rem py-3"}),p?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-2rem",children:[(0,pr.jsx)(Uj,{isTeacher:s,student:m,onChange:this.onChange,onGenderChange:this.onGenderChange,onCurrentClassChange:this.onCurrentClassChange,errors:this.state.errors,currentSchoolGrades:n,newSchoolGrades:t,currentClasses:r,newClasses:o}),(0,pr.jsx)(Ef,{onCancelClick:this.onCancelEdit,buttonText:"Save Student",onButtonClick:this.saveStudentClick}),(0,pr.jsx)($k,{text:g.mutation})]})]});const y=this.context.gettextObj;return(0,pr.jsxs)("div",{className:"c-student-modal-details px-2rem",children:[(0,pr.jsxs)("div",{className:"mb-4",children:[(0,pr.jsx)("div",{className:"container-fluid mt-4 mb-3",children:(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsx)("h1",{className:"mr-a",children:a+" "+l}),(0,pr.jsx)("i",{className:"u-modal__close-icon fa fa-close cursor-pointer",onClick:e})]})}),(0,pr.jsxs)("div",{className:"w-100 d-flex justify-content-between",children:[(0,pr.jsxs)("span",{className:"c-student-modal-details__student-id",children:["STUDENT ID - ",u]}),i&&(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"text-primary font-size-14 mr-4 cursor-pointer",onClick:this.toggleEdit,children:"Edit"}),!s&&(0,pr.jsx)("span",{className:"text-primary font-size-14 cursor-pointer",onClick:this.toggleDeleteModal,children:"Delete Student"})]})]}),(0,pr.jsx)("div",{className:`w-100 mt-2 ${IC(c)}`,children:RC(c)}),(0,pr.jsxs)("div",{className:"w-100 d-flex justify-content-start align-items-center my-2",children:[(0,pr.jsxs)("span",{className:"pr-3",children:["Current Grade:"," ",ou(this.props,"student.currentGrade.label")]}),(0,pr.jsx)(gm,{label:d?d.label:""}),(0,pr.jsxs)("span",{className:"pl-5",children:[y.gettext("New Grade"),":"," ",ou(this.props,"student.newGrade.label")]})]}),(0,pr.jsxs)("div",{className:"",children:["Placement Notes: ",h]})]}),(0,pr.jsx)(Ck,{isOpen:this.state.deleteModal,toggle:this.toggleDeleteModal,loading:v,heading:"Delete Student?",text:"This will delete ALL information associated with this student, such as Requests, Characteristics and Friendship Preferences.",onButtonClick:this.onDeleteClick,error:g.delete})]})}}Rj.contextType=Cw;var Aj=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Mj=function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),r=String(t.getOptionValue(e)).toLowerCase(),o=String(t.getOptionLabel(e)).toLowerCase();return r===n||o===n},Pj={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some((function(t){return Mj(e,t,r)}))||n.some((function(t){return Mj(e,t,r)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};var Dj=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.allowCreateWhileLoading,n=void 0!==t&&t,r=e.createOptionPosition,i=void 0===r?"last":r,s=e.formatCreateLabel,a=void 0===s?Pj.formatCreateLabel:s,l=e.isValidNewOption,c=void 0===l?Pj.isValidNewOption:l,u=e.getNewOptionData,d=void 0===u?Pj.getNewOptionData:u,h=e.onCreateOption,p=e.options,f=void 0===p?[]:p,m=e.onChange,g=pv(e,Aj),v=g.getOptionValue,y=void 0===v?Mx:v,b=g.getOptionLabel,x=void 0===b?Ax:b,w=g.inputValue,S=g.isLoading,C=g.isMulti,j=g.value,_=g.name,k=(0,o.useMemo)((function(){return c(w,Zy(j),f,{getOptionValue:y,getOptionLabel:x})?d(w,a(w)):void 0}),[a,d,x,y,w,c,f,j]),N=(0,o.useMemo)((function(){return!n&&S||!k?f:"first"===i?[k].concat(xv(f)):[].concat(xv(f),[k])}),[n,i,S,k,f]),E=(0,o.useCallback)((function(e,t){if("select-option"!==t.action)return m(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==k)m(e,t);else if(h)h(w);else{var r=d(w,w),o={action:"create-option",name:_,option:r};m(pb(C,[].concat(xv(Zy(j)),[r]),r),o)}}),[d,w,C,_,k,h,m,j]);return cv(cv({},g),{},{options:N,onChange:E})}(mv(e));return o.createElement(Kx,au({ref:t},n))})),Fj=Dj;const Lj=(e,t,n)=>e?e.filter((e=>ou(e,n).some((e=>e.code===t)))):[],Bj=e=>({label:e,value:e}),Uj=({errors:e,student:{firstName:t,lastName:n,studentCode:r,currentGrade:i,currentClass:s,newGrade:a,newClass:l,gender:c,comments:u},onChange:d,onCurrentClassChange:h,onGenderChange:p,currentSchoolGrades:f,newSchoolGrades:m,currentClasses:g,newClasses:v,addStudent:y,isTeacher:b})=>{var x;const w=o.useContext(Cw).gettextObj,S=null===(x=m.find((e=>e.code===a)))||void 0===x?void 0:x.id,C={gradeId:S,schoolId:uw()},{data:j}=Gm(q,{variables:{solution:C},fetchPolicy:"network-only",skip:b}),_=!((e,t)=>e&&e.activeGrade.id===t&&e.classes.some((e=>e.students.length>0)))(ou(j,"solution"),S),k=!_&&!l,N=Lj(g,i,"grades");N.unshift({label:"N/A",value:"N/A"});const E=Lj(v,a,"schoolGrades");let T=f?f.filter((e=>!PC(e))).map(((e,t)=>(0,pr.jsx)("option",{value:e.code,children:e.label},t))):null;if(i===fC){const e=T.length,t=f.find(AC);T.push((0,pr.jsx)("option",{value:t.code,disabled:!0,children:t.code},e))}const O=m?m.filter((e=>!AC(e))).map(((e,t)=>MC(e)&&y?null:(0,pr.jsx)("option",{value:e.code,children:e.label},t))):null,I=i===fC,R=b||a===mC||!aC(a)||_,A=r&&OC(r),M=s?Bj(s):null,P=N.map((e=>Bj(e.label)));return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"First Name"}),(0,pr.jsx)(Zg,{name:"firstName",onChange:d,value:t,maxLength:255,disabled:b}),e.firstName&&(0,pr.jsx)($k,{text:e.firstName})]}),(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Student ID"}),(0,pr.jsx)(Zg,{className:A&&!y?"":"c-student-modal-details__student-id-generated",name:"studentCode",onChange:d,value:r,maxLength:255,disabled:b}),(0,pr.jsx)("span",{className:"u-text-12 u-grey-mid",children:r.length<=0?"If you don't yet have a student ID, please update this later.":A&&"[System-generated ID] - Please update with the correct ID when available"}),e.studentId&&(0,pr.jsx)("div",{children:(0,pr.jsx)($k,{text:e.studentId})})]})]}),(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Last Name"}),(0,pr.jsx)(Zg,{name:"lastName",onChange:d,value:n,maxLength:255,disabled:b}),e.lastName&&(0,pr.jsx)($k,{text:e.lastName})]}),(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Gender"}),(0,pr.jsx)("div",{className:"c-toggle ml-0 w-100",children:(0,pr.jsxs)(Zg,{type:"select",name:"gender",id:"gender",value:c,onChange:p,disabled:b,children:[(0,pr.jsx)("option",{disabled:!0,value:""}),(0,pr.jsx)("option",{value:"M",children:"Male"}),(0,pr.jsx)("option",{value:"F",children:"Female"}),(0,pr.jsx)("option",{value:"X",children:"Non-Binary"})]})}),e.gender&&(0,pr.jsx)($k,{text:e.gender})]})]}),(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)(Qg,{children:"Current Grade"}),(0,pr.jsx)("i",{className:"fa fa-info-circle color-blue-mid m-2","data-tooltip-id":"optional-info"}),(0,pr.jsxs)(kf,{className:"c-badge-tooltip",id:"optional-info",variant:"light",style:{zIndex:100},opacity:1,children:[(0,pr.jsx)("p",{children:"This drop-down is based off your School Grade Settings."}),(0,pr.jsx)("p",{children:"If you would like to add another grade: click on the Settings, scroll down to School Grade Settings and add the desired grade (e.g. Pre-kinder, Pre-primary).\xa0"}),(0,pr.jsx)("p",{children:"Please make sure they are in the correct order by using the arrows."})]})]}),(0,pr.jsx)(Zg,{name:"currentGrade",type:"select",onChange:d,value:i,disabled:b,children:T})]}),(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Current Class"}),(0,pr.jsx)(Fj,{className:"react-select-container",name:"currentClass",onChange:e=>h(e),isDisabled:I||b,options:P,placeholder:"Select or Type Current Class",value:M})]})]}),(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:w.gettext("New Grade")}),(0,pr.jsxs)(Zg,{name:"newGrade",type:"select",onChange:d,value:a,disabled:b,children:[!aC(a)&&(0,pr.jsx)("option",{value:""}),O]}),(0,pr.jsx)($k,{text:e.newGrade})]}),b||(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsxs)(Qg,{children:["New ",w.gettext("Class")]}),(0,pr.jsxs)(Zg,{type:"select",name:"newClass",onChange:d,value:l||"",disabled:R,children:[(0,pr.jsx)("option",{}),E.length>0&&E.map(((e,t)=>(0,pr.jsx)("option",{value:e.label,children:e.label},t)))]}),_&&(0,pr.jsxs)("span",{className:"u-text-12 u-grey-mid",children:["Please run Solver first to assign new"," ",w.gettext("classes")]}),k&&(0,pr.jsxs)("span",{className:"u-text-12 text-danger",children:["Please manually assign this student into a"," ",w.gettext("class")]})]})]}),(0,pr.jsx)("div",{className:"row justify-content-end",children:(0,pr.jsxs)(Gg,{className:"col-12",children:[(0,pr.jsx)(Qg,{children:"Placement Notes (optional)"}),(0,pr.jsx)(Zg,{name:"comments",onChange:d,type:"textarea",value:u||"",maxLength:5e3})]})})]})};var Gj=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","charCode","close"],$j={tag:Pu,wrapTag:Pu,toggle:pu().func,className:pu().string,cssModule:pu().object,children:pu().node,closeAriaLabel:pu().string,charCode:pu().oneOfType([pu().string,pu().number]),close:pu().object},qj=function(e){var t,n=e.className,r=e.cssModule,i=e.children,s=e.toggle,a=e.tag,l=e.wrapTag,c=e.closeAriaLabel,u=e.charCode,d=e.close,h=lu(e,Gj),p=Eu(ju()(n,"modal-header"),r);if(!d&&s){var f="number"===typeof u?String.fromCharCode(u):u;t=o.createElement("button",{type:"button",onClick:s,className:Eu("close",r),"aria-label":c},o.createElement("span",{"aria-hidden":"true"},f))}return o.createElement(l,au({},h,{className:p}),o.createElement(a,{className:Eu("modal-title",r)},i),d||t)};qj.propTypes=$j,qj.defaultProps={tag:"h5",wrapTag:"div",closeAriaLabel:"Close",charCode:215};const zj=qj;var Vj=["className","cssModule","tag"],Hj={tag:Pu,className:pu().string,cssModule:pu().object},Wj=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=lu(e,Vj),s=Eu(ju()(t,"modal-footer"),n);return o.createElement(r,au({},i,{className:s}))};Wj.propTypes=Hj,Wj.defaultProps={tag:"div"};const Yj=Wj,Qj=({color:e,onClick:t,disabled:n,text:r},o)=>(0,pr.jsx)(ld,{color:e,onClick:t,disabled:n,children:r},o),Jj=({isOpen:e=!1,toggle:t,title:n="Oops, something went wrong",children:r,actions:i=[],jobId:s,type:a=""})=>{const[l,c]=(0,o.useState)(!1);return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-35rem",children:[(0,pr.jsxs)(zj,{tag:"h2",toggle:t,children:[(0,pr.jsx)("span",{children:n}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",style:{fontSize:"0.7rem"},color:"link",onClick:()=>c(!0),children:"Need help importing?"})]}),(0,pr.jsx)(Ig,{className:"px-4 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-4",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsx)("div",{children:r||"Something went wrong."})]})}),(0,pr.jsx)(Yj,{className:"px-4 pb-4",children:i.map(Qj)})]}),l&&(0,pr.jsx)(Kj,{isOpen:!0,toggle:()=>c(!1),jobId:s,onSentNotification:()=>{c(!1),t()},type:a})]})},Kj=({isOpen:e,toggle:t,onSentNotification:n,jobId:r,type:i=""})=>{const[s,a]=(0,o.useState)(""),[l,{error:c,loading:u}]=Km(EC,{onError:()=>{},onCompleted:n}),d={notificationType:"UPLOAD_ERROR",uploadJobId:r,message:`File upload type: ${i}\n${s}`};return(0,pr.jsxs)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(zj,{tag:"h2",toggle:t,children:(0,pr.jsx)("span",{children:"Help Me Import"})}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:"Would you like us to import the file you have uploaded? We will notify you by email when this is completed (normally within 24hrs)."}),(0,pr.jsx)("br",{}),(0,pr.jsx)("div",{children:"Message (Optional)"}),(0,pr.jsx)(Zg,{type:"textarea",name:"message",value:s,rows:3,onChange:e=>{a(e.target.value)}})]})]})}),(0,pr.jsxs)(Yj,{children:[(0,pr.jsx)(ld,{color:"link",onClick:t,children:"Cancel"}),(0,pr.jsx)(ld,{color:"primary",disabled:u,onClick:()=>l({variables:d}),children:"Help me import"})]}),(0,pr.jsx)($k,{text:c})]})},Xj=e=>{const{grades:t,handleGradeSelect:n,handleNextGradeSelect:r,mappedGrade:i,isNextGrade:s=!1,isDisabled:a=!1}=e,l=o.useMemo((()=>t.map((e=>"LEAVING"===e.code?s?(0,pr.jsx)("option",{value:"LEAVING",children:"Leaving"},"LEAVING"):null:(0,pr.jsx)("option",{value:e.code,children:e.label},e.id)))),[t,s]),c=o.useMemo((()=>s?i.nextGrade?i.nextGrade.code:"":i.matchedGrade?i.matchedGrade.code:""),[i,s]),u=o.useCallback((e=>{s?r(e.target.value):n(e.target.value)}),[s,n,r]);return(0,pr.jsx)("div",{className:"d-flex",children:(0,pr.jsxs)("select",{className:"form-control",onChange:u,value:c||"select",disabled:a,children:[(0,pr.jsx)("option",{value:"select",disabled:!0},"select"),l]})})},Zj=e=>{const{grades:t,gradeLabel:n,handleGradeMappingSelected:r,handleNextGradeSelect:i,handleGradeIgnore:s,allowNewGradeMapping:a}=e,l=o.useCallback((e=>{const o=t.find((t=>t.code===e));return r(n,o)}),[t,n,r]),c=o.useCallback((e=>{const r=t.find((t=>t.code===e));return i(n,r)}),[t,n,i]),u=o.useCallback((e=>{s(n,e.target.checked)}),[n,s]),d=o.useMemo((()=>n.ignored),[n]);return(0,pr.jsxs)("div",{className:"row mt-3",children:[(0,pr.jsxs)("div",{className:"col-lg pt-1",children:[(0,pr.jsx)("div",{className:"text-center c-grade-label-mapping__gradeLabel",children:n.name}),(0,pr.jsx)("div",{className:"text-center align-center font-italic color-grey-default c-grade-label-mapping__records",children:Bh(n.studentCount,"student","students")})]}),(0,pr.jsx)("div",{className:"col-md",children:(0,pr.jsx)(Xj,{grades:t,mappedGrade:n,handleGradeSelect:l,isDisabled:d})}),a&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"col-1 pt-1",children:(0,pr.jsx)("em",{children:"goes to"})}),(0,pr.jsx)("div",{className:"col-md",children:(0,pr.jsx)(Xj,{grades:t,mappedGrade:n,handleNextGradeSelect:c,isDisabled:d,isNextGrade:!0})})]}),(0,pr.jsx)("div",{className:"col-sm text-center",children:(0,pr.jsx)("input",{type:"checkbox",onChange:u,checked:!0===n.ignored})})]},n.name)};class e_ extends o.Component{constructor(e){super(e),this.exactlyMatch=(e,t)=>e.find((e=>e.code.trim()===t||e.label.trim()===t)),this.probablyMatches=(e,t)=>e.find((e=>this.maybeMatches(e.code,t)||this.maybeMatches(e.label,t))),this.extractNumber=e=>{const t=e.match(/\d+[^\d]*$/);if(t)return parseInt(t)},this.maybeMatches=(e,t)=>{const n=e.toLowerCase(),r=t.toLowerCase();if(n===r)return!0;if(({p:["py"]}[n]||[]).includes(r))return!0;const o=this.extractNumber(r);return!!o&&this.extractNumber(n)===o},this.toggleHelpModal=()=>{this.setState({helpModal:!this.state.helpModal})},this.back=()=>{this.props.navigate("/Students/Upload/Grades")},this.transformGradesNameMapForRemote=e=>e.map((e=>({gradeNameInFile:e.name,gradeCode:e.matchedGrade?e.matchedGrade.code:null,newGradeCode:e.nextGrade?e.nextGrade.code:null,ignored:!0===e.ignored}))),this.importData=e=>{const{updateStudentImportMatchers:t,importUploadedFileFromJob:n,currentUploadJob:r}=this.props;if(pw(e.grades)){const o=[...e.columns],i={jobId:r.id,columnMappings:o,classNameMappings:[],gradeNameMappings:this.transformGradesNameMapForRemote(e.grades)},s=[{query:gg,variables:{schoolId:uw()}}];this.setState({loading:!0}),n({variables:i,refetchQueries:s}).then((()=>{t({variables:{newMatchers:{grades:[],columns:[]}}}),this.props.navigate("/Students/Upload/Success",{state:{redirectTo:"/Students"}})}),(e=>{this.setState({warningModal:!0,warningCode:e.graphQLErrors[0].message,warningDetails:e.graphQLErrors.length?e.graphQLErrors[0].details:"",loading:!1})}))}else this.setState({warningModal:!0})},this.save=()=>{const e=this.state.gradeLabels.map((e=>({...e,matchedGrade:e.matchedGrade||null})));this.props.updateStudentImportMatchers({variables:{newMatchers:{grades:e}}}).then((({data:{updateStudentImportMatchers:{studentsImport:e}}})=>this.importData(e)))},this.cancel=()=>{const{currentUploadJob:e,updateBulkUploadJob:t,navigate:n}=this.props;t({variables:{jobParams:{id:e.id,type:e.type,status:"CANCELLED"}}}).then((()=>{this.props.updateStudentImportMatchers({variables:{newMatchers:{grades:[],columns:[]}}}).then((()=>{n("/Students")}))}))},this.findNextGrade=e=>DC(e)?null:e.defaultNewGrade,this.handleGradeMappingSelected=(e,t)=>{this.setState((n=>({gradeLabels:n.gradeLabels.map((n=>n.name===e.name?{...n,matchedGrade:t,nextGrade:this.findNextGrade(t)}:n))})))},this.handleNextGradeSelect=(e,t)=>{this.setState((n=>({gradeLabels:n.gradeLabels.map((n=>n.name===e.name?{...n,nextGrade:t}:n))})))},this.handleGradeIgnore=(e,t)=>{this.setState((n=>({gradeLabels:n.gradeLabels.map((n=>n.name===e.name?{...n,ignored:t}:n))})))},this.hasKnownWarning=(e,t)=>e&&t&&t[e],this.toggleWarningModal=()=>{this.setState((e=>({warningModal:!e.warningModal})))},this.resetWarningCode=()=>{this.setState({warningCode:null,warningDetails:null})};const{matchingGrades:t}=e;this.state={gradeLabels:t,helpModal:!1,warningModal:!1,warningCode:null,warningDetails:null,loading:!1}}componentDidMount(){this.setState((e=>{const{gradeLabels:t}=e;return{gradeLabels:[...t.map((e=>{const t=e.name.trim(),n=this.props.schoolGrades.filter((e=>!PC(e))),r=this.exactlyMatch(n,t)||this.probablyMatches(n,t);return r?{...e,matchedGrade:r,nextGrade:this.findNextGrade(r)}:e}))].sort(((e,t)=>e.matchedGrade&&t.matchedGrade?e.matchedGrade.order-t.matchedGrade.order:e.matchedGrade?-1:t.matchedGrade?1:0))}}))}render(){const{gradeLabels:e,helpModal:t,warningModal:n,warningCode:r,warningDetails:o,loading:i}=this.state,{knownWarnings:s,currentUploadJob:a,schoolGrades:l}=this.props,c=!DC(l[0]);return(0,pr.jsxs)("div",{className:"container mt-5 pt-5 w-lg-75",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Match Your Grade Labels"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:this.toggleHelpModal,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:t,toggle:this.toggleHelpModal,onSentNotification:this.cancel,jobId:a.id,type:"Students"})]}),(0,pr.jsx)("div",{className:"pt-3 pb-4",children:"Please match the Grades found in your file to the Current Grade in Class Solver and check the students are then \u201cgoing to\u201d the right New Grade for the next academic year. For example, Current Grade 1\u2019s are \u201cgoing to\u201d Grade 2 next year."}),(0,pr.jsx)("div",{className:"container",children:(0,pr.jsxs)("div",{className:"row pb-2 mb-3 u-content-border-bottom",children:[(0,pr.jsx)("div",{className:"col-lg font-weight-bold",children:"Grades in Your File"}),(0,pr.jsx)("div",{className:"col-md font-weight-bold",children:"Current Grade"}),c&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"col-1",children:"\xa0"}),(0,pr.jsx)("div",{className:"col-md font-weight-bold",children:"New Grade"})]}),(0,pr.jsx)("div",{className:"col-sm font-weight-bold text-center",children:"Don't Import"})]})}),e.map(((e,t)=>(0,pr.jsx)(Zj,{gradeLabel:e,grades:l,handleGradeMappingSelected:this.handleGradeMappingSelected,handleNextGradeSelect:this.handleNextGradeSelect,handleGradeIgnore:this.handleGradeIgnore,allowNewGradeMapping:c},t))),(0,pr.jsx)("div",{className:"u-content-border-bottom",children:"\xa0"}),(0,pr.jsxs)("div",{className:"mt-3 d-flex align-items-center",children:[(0,pr.jsxs)("span",{className:"text-primary mr-a cursor-pointer",onClick:this.back,children:[(0,pr.jsx)("i",{className:"fa fa-chevron-left mr-2"})," Back to Grade System"]}),(0,pr.jsx)(Ef,{className:"p-3",buttonText:"Save & Continue",cancelText:"Cancel Import",onButtonClick:this.save,onCancelClick:this.cancel,disabled:e.some((e=>!e.ignored&&(c?!e.matchedGrade||!e.nextGrade:!e.matchedGrade)))||i})]}),this.hasKnownWarning(r,s)?(0,pr.jsx)(Jj,{title:s[r].title,isOpen:n,jobId:a.id,type:"Students",toggle:ng()(this.resetWarningCode,this.toggleWarningModal),actions:s[r].actions(this.props),children:s[r].body("Students",o)}):(0,pr.jsx)(Jj,{toggle:this.toggleWarningModal,type:"Students",jobId:a.id,isOpen:n,children:"Something went wrong with the upload. Please review the classes and grades."})]})}}const t_=({currentUploadJob:e,currentSchoolGrades:{currentSchoolGrades:t},updateBulkUploadJob:n,updateStudentImportMatchers:r})=>{const i=vl(),[s,a]=(0,o.useState)(!1),l=()=>{a(!s)},c=()=>{const t={jobParams:{id:e.id,status:"CANCELLED",type:e.type}};n({variables:t}).then((()=>{r({variables:{newMatchers:{grades:[],columns:[]}}}).then((()=>{i("/Students")}))}))};return(0,pr.jsxs)("div",{className:"container",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Create Your Grade System"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:l,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:s,toggle:l,onSentNotification:c,jobId:e.id,type:"Students"})]}),(0,pr.jsx)("div",{className:"mt-3",children:"Here\u2019s a default Grade System. If your school uses the same Grade System, just click Continue. Or, you can modify the Grades according to your school."}),(0,pr.jsx)(Uk,{onContinue:()=>{i("/Students/Upload/GradeLabels")},className:"mt-5",schoolGrades:t,cancel:c})]})},n_=({currentUploadJob:e,handleCancel:t,handleContinue:n})=>{const[r,i]=(0,o.useState)(!1),s=()=>i((e=>!e));return(0,pr.jsxs)("div",{className:"container mt-5 pt-5 w-lg-75",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Possible Student ID format change"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:s,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:r,toggle:s,jobId:e.id,onSentNotification:()=>{s(),t()},type:"No student code matches"})]}),(0,pr.jsxs)("div",{className:"pt-3 pb-4",children:["Looks like you may have used a different Student ID format to last time or haven\u2019t included a Student ID in your file. As a result, we did not find any matching student history (e.g. requests, friendships, characteristics). If you are unsure how to proceed, please click on \u201cNeed Help Importing\u201d and we will contact you.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Would you still like to continue importing students with a different Student ID format (or no Student ID)?"]}),(0,pr.jsx)("div",{className:"u-content-border-bottom",children:"\xa0"}),(0,pr.jsx)("div",{className:"mt-3 d-flex justify-content-end align-items-center",children:(0,pr.jsx)(Ef,{buttonText:"Yes",cancelText:"No",className:"p-3",onButtonClick:n,onCancelClick:t})})]})},r_=({toggle:e})=>{const t=(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"Your account has been rolled over for the new year."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"What\u2019s next?"})}),(0,pr.jsx)("p",{children:"Please upload a new list of your current students. Need help? Watch the Step 1 video on the Dashboard."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"Why do I need to re-upload my student list?"})}),(0,pr.jsx)("p",{children:"Re-importing your student list ensures that you don\u2019t have to manually track who has left or joined the school since last year."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"Will last year\u2019s data be retained?"})}),(0,pr.jsx)("p",{children:"Yes, absolutely! All your Requests, Friendship Preferences, Characteristic responses, and Notes will automatically merge with the new student list. Just make sure to use the same Student ID format as last year."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"How do I check the Student ID format I used?"})}),(0,pr.jsxs)("p",{children:["You can download last year\u2019s student data file from ",(0,pr.jsx)("b",{children:"Settings"})," ","under Download Student History."]})]});return(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:e,toggle:e,heading:"Where are my students?",text:t,buttonText:"OK, I've got it",showCancel:!1,showNotice:!1,showCautionIcon:!1})},o_=()=>{const[e,t]=(0,o.useState)(!1);(0,o.useEffect)((()=>{"true"!==sessionStorage.getItem("ROLLOVER_INFO_ACK")&&setTimeout((()=>{t(!0)}),3e3)}),[]);const n=()=>{sessionStorage.setItem("ROLLOVER_INFO_ACK",!0),t((e=>!e))};return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"c-modal-note text-center",children:["Your account has been rolled over. Please re-import a new list of your current students using the template below."," ",(0,pr.jsx)("span",{className:"cursor-pointer text-primary",onClick:n,children:"Learn more"})]}),e&&(0,pr.jsx)(r_,{toggle:n})]})},i_=({schoolId:e,toggle:t,adminOnly:n,deleteStudentCharacteristicResponsesByCurrentGradeMutation:r,characteristics:i})=>{const[s,a]=(0,o.useState)(!0),l={};for(let o=0;o<i.length;o++)l[i[o].id]=!1;const[c,u]=(0,o.useState)(l),{data:d,loading:h}=Gm(bg,{variables:{schoolId:e}}),[p,{error:f,loading:m}]=Km(r,{onError:()=>{}}),[g,v]=(0,o.useState)([]),y=h||m,b=y?[]:d.activeSchoolGrades.map((e=>({label:e.label,value:e.id}))),x=e=>{u({...c,[e.target.id]:!c[e.target.id]})},w=()=>{const r=Object.entries(c).filter((([e,t])=>!0===t)).map((([e,t])=>e));return p({variables:{schoolId:e,characteristicIds:r,currentGradeIds:g.map((e=>e.value))},refetchQueries:[{query:me,variables:{adminOnly:n,schoolId:e}},{query:bg,variables:{schoolId:e}}],onCompleted:t})};return s?(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-45rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Remove Characteristic Responses",toggle:t}),y?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Xk,{text:"This function removes the Characteristic Responses for students in the Current Grade/s you have selected.  Students in the Current Grade/s not selected will not be affected.  "}),(0,pr.jsxs)(Ig,{className:"pb-4",children:[(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select Characteristic Responses to remove:"}),(0,pr.jsxs)("div",{className:"row u-heading-separator-border-bottom align-items-center py-2 mx-2",children:[(0,pr.jsx)("p",{className:"col-10 font-weight-bold my-1 p-0",children:"Characteristic"}),(0,pr.jsx)("p",{className:"col-2 font-weight-bold text-center my-0",children:"Remove"})]}),i.map((e=>(0,pr.jsxs)("div",{className:"row u-separator-border-bottom align-items-center py-2 mx-2",children:[(0,pr.jsx)("p",{className:"col-10 p-0 my-0",children:e.name}),(0,pr.jsx)("div",{className:"col-2 font-weight-bold text-center",children:(0,pr.jsx)(Zg,{className:"mx-0 c-checkbox-lg",type:"checkbox",id:e.id,name:e.name,checked:c[e.id],onChange:x})})]},e.id)))]}),(0,pr.jsxs)("div",{className:"my-3 px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select Current Grade/s to apply to:"}),(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:b,value:g,onChange:e=>{v(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsx)(Ef,{className:"mt-5 px-4",buttonText:"Remove Responses",onButtonClick:()=>a(!1),onCancelClick:t,disabled:0===g.length||!Object.values(c).includes(!0)}),f&&(0,pr.jsx)($k,{className:"mt-5 px-4",text:f.message})]})]})]}):(0,pr.jsx)(DS,{dangerousMutation:w,cautionHeading:"Remove Characteristic Responses",cautionText:"You can not \u2018undo\u2019 the operation.  Responses for the selected Characteristics will be permanently deleted for students in selected Current Grade/s.",cautionButtonText:"Yes, Proceed",successMessage:"Characteristic Responses by grade have been removed.",errorMessage:"Could not remove data",toggleComponent:t})},s_=({toggle:e})=>{const t=uw(),{data:n,loading:r,error:i}=Gm(Me,{variables:{schoolId:t},fetchPolicy:"network-only"}),[s,a]=(0,o.useState)();if(r)return null;if(i)return(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:e,toggle:e,buttonText:"Dismiss",showCancel:!1,heading:"Download Student History",text:"There was an error fetching the Student History. Please try again later."});const l=n.studentHistories.map((({file:e})=>({label:Hh(e.timestamp),value:e.link})));const c=0===l.length;return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Download Student History",toggle:e,className:"px-4 py-3"}),(0,pr.jsxs)(Ig,{className:"px-4",children:[(0,pr.jsx)("p",{children:"Please select from the drop down list below and click Download."}),(0,pr.jsxs)("div",{className:"d-flex mb-3",children:[(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:"Select history",options:l,value:s,onChange:e=>{a(e)},closeMenuOnSelect:!0,isDisabled:c}),(0,pr.jsx)(ld,{className:"ml-3",color:"primary",onClick:()=>{var e;e=s.value,(0,Gw.saveAs)(e)},disabled:!s,type:"button",children:"Download"})]}),c&&(0,pr.jsx)($k,{text:"There are no Student History files available"})]})]})};class a_ extends o.Component{constructor(...e){super(...e),this.state={showDownloadStudentHistories:!1},this.toggleDownloadModal=()=>{this.setState({showDownloadStudentHistories:!0})}}render(){const e=this.context.gettextObj;return(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Download Student History"}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{className:"c-misc-upload__description",children:["Every year an extract of your account is archived into an Excel file (e.g. Students, Friendship Preferences, Requests, Characteristics, Notes, and ",e.gettext("Classes"),"). Click on Download to view and access the available files."]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:this.toggleDownloadModal,children:"Download"})]}),this.state.showDownloadStudentHistories&&(0,pr.jsx)(s_,{toggle:()=>{this.setState({showDownloadStudentHistories:!1})}})]})}}a_.contextType=Cw;class l_ extends o.Component{constructor(e){super(e),this.transformToSelectOptions=e=>e?e.map((e=>({label:`${e.firstName} ${e.lastName}`,value:e.id}))):[],this.onManagerChange=e=>{this.setState({data:{...this.state.data,managers:e}})},this.onChange=e=>{this.setState((t=>({data:{...t.data,[e.target.name]:e.target.value},errors:{...t.errors,[e.target.name]:null}})))},this.saveSchool=()=>{const{createOrUpdateSchoolMutation:e,toggle:t,refetchQueries:n,isSuper:r}=this.props,{data:o}=this.state,{addressLine1:i,accountType:s,schoolName:a,managers:l,...c}=o,u=cC(o,!1);if(this.setState({errors:u}),0===Object.keys(u).length){this.setState({loading:!0});const u={...c,name:a,accountType:s,address:i,numberOfStudents:parseInt(o.numberOfStudents,10),id:sessionStorage.getItem(Ht),managers:l.map((e=>e.value))};r||delete u.accountType;e({variables:{school:u},refetchQueries:n}).then((()=>{this.setState({loading:!1}),t()})).catch((()=>{this.setState({loading:!1,errors:{mutation:"There was an error with updating. Please try again"}})}))}},this.state={data:{schoolName:this.props.data.name,addressLine1:this.props.data.address,suburb:this.props.data.suburb,countryCode:this.props.data.countryCode,stateCode:this.props.data.stateCode,postcode:this.props.data.postcode,contactNumber:this.props.data.contactNumber,numberOfStudents:this.props.data.numberOfStudents,crmAccountName:this.props.data.crmAccountName,managers:this.transformToSelectOptions(this.props.data.managers),crmStatus:this.props.data.crmStatus,accountType:this.props.data.accountType,accountName:this.props.data.accountName},errors:{},loading:!1}}render(){const{toggle:e,client:t,isSuper:n,supportAdmins:r,superAdmins:o}=this.props,{data:i,errors:s,loading:a}=this.state,l=(r||[]).concat(o||[]);return(0,pr.jsxs)(Yf,{isOpen:!0,children:[(0,pr.jsx)(Kk,{title:"Edit School",toggle:e,className:"px-4 py-4"}),(0,pr.jsx)(Ig,{className:"p-4",children:a?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)(nN,{isSuper:n,client:t,data:i,errors:s,edit:!0,onChange:this.onChange,availableManagers:this.transformToSelectOptions(l),onManagerChange:this.onManagerChange}),(0,pr.jsx)(Ef,{onCancelClick:e,buttonText:"Save",onButtonClick:this.saveSchool}),(0,pr.jsx)($k,{text:s.mutation})]})})]})}}const c_=ng()(eg($e,{options:()=>({variables:{filterRole:aS}}),props:({data:{users:e,loading:t}})=>({loadingSupportAdmins:t,supportAdmins:e})}),eg($e,{options:()=>({variables:{filterRole:sS}}),props:({data:{users:e,loading:t}})=>({loadingSuperAdmins:t,superAdmins:e})}),eg(Qe,{name:"createOrUpdateSchoolMutation"}))(lj(l_)),u_=e=>{const{data:t,loading:n}=Gm(bg,{variables:{schoolId:e.schoolId}});return n?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)(d_,{grades:t.activeSchoolGrades,...e})},d_=({toggle:e,title:t,description:n,primaryButtonText:r,errorMessage:i,exportFunction:s,grades:a})=>{const l=a.map((e=>({label:e.label,value:e.id}))),[c,u]=(0,o.useState)(l);return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-45rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:t,toggle:e}),(0,pr.jsx)(Xk,{text:n}),(0,pr.jsxs)(Ig,{className:"pb-4",children:[(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select Current Grade/s"}),(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:l,value:c,onChange:e=>{u(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsx)(Ef,{className:"mt-5 px-4",buttonText:r,onButtonClick:()=>{const e=c.map((({value:e})=>e));s(e)},onCancelClick:e,disabled:0===c.length}),i&&(0,pr.jsx)($k,{className:"mt-5 px-4",text:i})]})]})},h_=({schoolId:e,type:t,description:n,filterSensitive:r=!0})=>{const i=nu(),[s,a]=(0,o.useState)();return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(B_,{onButtonClick:async()=>{a(null);const[n,o]=await zw(t,e,i,r);o&&a(`Error: ${n.status} - ${o}`)},buttonText:"Export",children:n}),s&&(0,pr.jsx)($k,{className:"mx-3",text:s})]})},p_=({schoolId:e,isSuper:t})=>(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Export CSV files"}),t&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(h_,{description:"Export Active Students CSV",type:"students",schoolId:e}),(0,pr.jsx)(h_,{description:"Export All Students CSV",type:"all_students",schoolId:e}),(0,pr.jsx)(h_,{description:"Export Teachers CSV",type:"teachers",schoolId:e}),(0,pr.jsx)(h_,{description:"Export Teacher Requests CSV",type:"teacher_requests",schoolId:e,filterSensitive:!1}),(0,pr.jsx)(h_,{description:"Export Student Requests CSV",type:"student_requests",schoolId:e,filterSensitive:!1}),(0,pr.jsx)(h_,{description:"Export Characteristic Responses CSV",type:"characteristic_responses",schoolId:e}),(0,pr.jsx)(h_,{description:"Export Friendships CSV",type:"friendships",schoolId:e}),(0,pr.jsx)(h_,{description:"Export Solutions CSV",type:"solutions",schoolId:e})]}),(0,pr.jsx)(h_,{description:"Export SC Settings CSV",type:"school_characteristics",schoolId:e}),(0,pr.jsx)(h_,{description:"Export Classes CSV",type:"new_classes",schoolId:e})]});class f_ extends o.Component{render(){const{isOpen:e,schoolGrades:t,toggle:n}=this.props;return(0,pr.jsxs)(Yf,{isOpen:e,className:"c-grade-modal modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Grade Settings",className:"p-4",toggle:n}),(0,pr.jsx)(Ig,{children:(0,pr.jsx)(Uk,{schoolGrades:t,toggle:n,fromSettings:!0})})]})}}class m_ extends o.Component{constructor(){super(),this.toggleGradeModal=()=>{this.setState({isOpen:!this.state.isOpen})},this.state={isOpen:!1}}render(){const{currentSchoolGrades:e,loadingSchoolGrades:t}=this.props,{isOpen:n}=this.state;return(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"School Grades"}),t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsx)("div",{className:"",children:"Edit & set school grades"}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:this.toggleGradeModal,children:"School Grades Settings"}),(0,pr.jsx)(f_,{isOpen:n,toggle:this.toggleGradeModal,schoolGrades:e})]})]})}}var g_=["className","cssModule","inline","tag","innerRef"],v_={children:pu().node,inline:pu().bool,tag:Pu,innerRef:pu().oneOfType([pu().object,pu().func,pu().string]),className:pu().string,cssModule:pu().object},y_=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(cu(n)),n.submit=n.submit.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.submit=function(){this.ref&&this.ref.submit()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,r=e.inline,i=e.tag,s=e.innerRef,a=lu(e,g_),l=Eu(ju()(t,!!r&&"form-inline"),n);return o.createElement(i,au({},a,{ref:s,className:l}))},t}(o.Component);y_.propTypes=v_,y_.defaultProps={tag:"form"};const b_=y_,x_=({title:e,description:t,mutation:n,schoolId:r,refetchQuery:i,additionalRetryVariables:s})=>{const[a,l]=(0,o.useState)(Date.now()),c=()=>l(Date.now()),u=o.createRef(),[d,h]=(0,o.useState)(!1),[p,{data:f,error:m}]=Km(n,{onError:()=>{s||c()},onCompleted:()=>{c()},refetchQueries:[{query:i,variables:{schoolId:r}}]}),g=()=>{const e=u.current.files[0],t={schoolId:r,file:e},n=s?{...t,...s}:t;e&&p({variables:n,onError:()=>{c()}})};return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:e}),(0,pr.jsx)("div",{className:"cursor-pointer",onClick:()=>h(!d),children:d?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-minus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"Less details"})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-plus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"More details"})]})}),d&&(0,pr.jsx)("div",{className:"border",children:t})]}),(0,pr.jsxs)(b_,{onSubmit:e=>{e.preventDefault();const t=u.current.files[0];t&&p({variables:{schoolId:r,file:t}})},children:[(0,pr.jsx)(Gg,{className:"mb-1",children:(0,pr.jsx)("input",{style:{width:"15rem"},type:"file",name:"file",ref:u},a)}),(0,pr.jsx)(ld,{className:"c-button--secondary ",children:"Upload"})]})]}),m&&(0,pr.jsx)($k,{className:"mx-3",text:(e=>(0,pr.jsxs)(pr.Fragment,{children:[s&&(0,pr.jsx)(ld,{color:"link",className:"c-button--secondary mb-3",onClick:g,children:"Ignore error and retry"}),(0,pr.jsx)("div",{children:e.message}),(0,pr.jsx)("div",{children:"Details:"}),(0,pr.jsx)("pre",{children:JSON.stringify(e.graphQLErrors[0].details,null,2)})]}))(m)}),f&&(0,pr.jsx)("span",{className:"text-success mx-3",children:"Success!"})]})},w_=({schoolId:e})=>{const{data:t,loading:n}=Gm(Pt),[r,i]=(0,o.useState)(!1),s=()=>i(!r),[a,l]=(0,o.useState)(!0),[c,u]=(0,o.useState)(!0),[d,h]=(0,o.useState)(!1),[p,f]=(0,o.useState)(Date.now()),m=()=>f(Date.now()),[g,v]=(0,o.useState)(!1),y=o.createRef(),[b,{data:x,error:w}]=Km(Mt,{onError:()=>{s(),m()},onCompleted:()=>{s(),m()}});if(n)return null;const S=e=>{e.target.name===ES?l(e.target.checked):e.target.name===TS?u(e.target.checked):e.target.name===OS&&h(e.target.checked)},C=Es(t,"syncStudentsFromFile");return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:"Sync Students from file"}),(0,pr.jsx)("div",{className:"cursor-pointer",onClick:()=>v(!g),children:g?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-minus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"Less details"})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-plus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"More details"})]})}),g&&(0,pr.jsx)("div",{className:"border",children:C})]}),(0,pr.jsxs)(b_,{onSubmit:e=>{e.preventDefault();y.current.files[0]&&i(!0)},children:[(0,pr.jsx)(Gg,{className:"mb-1",children:(0,pr.jsx)("input",{style:{width:"15rem"},type:"file",name:"file",ref:y},p)}),(0,pr.jsx)(ld,{className:"c-button--secondary ",children:"Upload"})]})]}),w&&(0,pr.jsx)($k,{className:"mx-3",text:(e=>(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{children:e.message}),(0,pr.jsx)("div",{children:"Details:"}),(0,pr.jsx)("pre",{children:JSON.stringify(e.graphQLErrors[0].details,null,2)})]}))(w)}),x&&(0,pr.jsx)("span",{className:"text-success mx-3",children:"Success!"})]}),r&&(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Sync students from CSV file",toggle:s}),(0,pr.jsxs)(Ig,{className:"px-4 d-flex flex-column align-items-center",children:[(0,pr.jsx)("h2",{className:"mb-3",children:"Please select the options for this sync:"}),(0,pr.jsxs)("div",{className:"px-5",children:[(0,pr.jsxs)(Qg,{className:"m-3",children:[(0,pr.jsx)(Zg,{type:"checkbox",id:ES,name:ES,checked:a,onChange:S}),(0,pr.jsx)("div",{children:"Add students"}),(0,pr.jsx)("div",{children:"Students which are in the file but not in the system will be added"})]},ES),(0,pr.jsxs)(Qg,{className:"m-3",children:[(0,pr.jsx)(Zg,{type:"checkbox",id:TS,name:TS,checked:c,onChange:S}),(0,pr.jsx)("div",{children:"Deactivate students"}),(0,pr.jsx)("div",{children:"Students which are in the system but not in the file will be deactivated"})]},TS),(0,pr.jsxs)(Qg,{className:"m-3",children:[(0,pr.jsx)(Zg,{type:"checkbox",id:OS,name:OS,checked:d,onChange:S}),(0,pr.jsx)("div",{children:"Update students"}),(0,pr.jsx)("div",{children:"Students which are in both the file and system"}),"will be updated"]},OS)]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:()=>{let t=[];a&&t.push(ES),c&&t.push(TS),d&&t.push(OS);const n={schoolId:e,file:y.current.files[0],syncActions:t};b({variables:n})},children:"Sync Students"}),(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:s,children:"Cancel"})]})]})]})},S_=({schoolId:e})=>{const{data:t,loading:n}=Gm(Pt);return n?null:(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Import CSV files"}),(0,pr.jsx)(w_,{schoolId:e}),(0,pr.jsx)(x_,{schoolId:e,mutation:St,title:"Import Student",description:Es(t,"directlyImportStudentFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:Ct,title:"Import Teacher CSV",description:Es(t,"directlyImportTeacherFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:jt,title:"Import Teacher Requests CSV",description:Es(t,"directlyImportTeacherRequestsFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:_t,title:"Import Student Requests CSV",description:Es(t,"directlyImportStudentRequestsFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:kt,title:"Import Characteristic Responses CSV",description:Es(t,"directlyImportCharacteristicResponsesFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:Nt,title:"Import Friendship CSV",description:Es(t,"directlyImportFriendshipFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:Et,title:"Import Solution CSV",description:Es(t,"directlyImportSolutionFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:Ot,title:"Import Classes CSV",description:Es(t,"directlyImportNewClassesFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:It,title:"Import Change Student Codes CSV",description:Es(t,"importChangeStudentCodesFile"),additionalRetryVariables:{validateStudentCodes:!1}}),(0,pr.jsx)(x_,{schoolId:e,mutation:Rt,title:"Import Change Teacher Emails CSV",description:Es(t,"importChangeTeacherEmailsFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:At,title:"Import Delete Students CSV",description:Es(t,"importDeleteStudentsFile")}),(0,pr.jsx)(x_,{schoolId:e,mutation:Tt,title:"Import SC Settings CSV",description:Es(t,"directlyImportSchoolCharacteristicsFile"),refetchQuery:Dw})]})},C_=({toggle:e,school:t,refetchQueries:n})=>{const[r,i]=(0,o.useState)(!1),[s,a]=(0,o.useState)([""]),[l,{error:c,loading:u}]=Km(pt,{onError:()=>{},refetchQueries:n}),d=$h(s),h=0===d.length||!d.every((e=>lC(e)));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(bN,{toggle:e,loading:u,inputs:s,setInput:a,onSave:()=>{const e={emails:d,schoolId:t.id};l({variables:e}).then((()=>{i(!0)}))},saveDisabled:h,saveButtonText:"Add",saveErrors:c,title:"Add Administrator",description:" Enter the email address or email addresses of the user or users you would like to invite.",addButtonText:"Add another email",note:"Note: All administrators will be able to see the details for administrator view only requests (i.e. highly confidential requests that have been added to the system)."}),r&&(0,pr.jsx)(aN,{isOpen:!0,toggle:()=>{i(!1),e()},heading:"New Admin created",text:"An invitation has been sent to the new administrator's email address."})]})},j_=({mutation:e,schoolId:t,fileSelect:n,uploadFile:r,isLoading:i,loadingFile:s})=>{const[a,l]=(0,o.useState)(Date.now()),[c,{data:u,error:d}]=Km(e,{onError:()=>{s(!1)},onCompleted:()=>{s(!1),l(Date.now())}});return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{children:(0,pr.jsxs)(b_,{onSubmit:e=>{e.preventDefault(),s(!0),r&&c({variables:{schoolId:t,file:r}})},children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)("input",{type:"file",name:"fileUpload",id:"fileUpload",hidden:!0,onChange:n},a),(0,pr.jsx)(Qg,{for:"fileUpload",className:"c-button--secondary",children:r?"Choose Another File":"Upload File"})]}),r?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"pb-4 text-center c-misc-upload__success",children:["File to upload: ",(0,pr.jsx)("b",{children:r.name})]}),(0,pr.jsx)("div",{className:"pb-4",children:(0,pr.jsx)(ld,{className:"c-button--secondary",children:"Confirm & Upload File"})})]}):null]})}),i?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):null,d&&(0,pr.jsx)($k,{className:"text-center c-misc-upload__success",text:"Upload unsuccessful. Please try again or contact support"}),u&&(0,pr.jsxs)("div",{className:"text-success text-center c-misc-upload__success",children:[(0,pr.jsx)("p",{className:"font-weight-bold",children:"File successfully uploaded!"}),(0,pr.jsx)("p",{children:"We will be in touch within 24 hours regarding next steps"})]})]})};class __ extends o.Component{constructor(...e){super(...e),this.state={uploadFile:null,isLoading:!1,showDownloadStudentHistories:!1},this.fileSelect=e=>{this.setState({uploadFile:e.target.files[0]})},this.loadingFile=e=>{this.setState({isLoading:e})},this.toggleDownloadModal=()=>{this.setState({showDownloadStudentHistories:!0})}}render(){const{school:e}=this.props;return(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Safe File Drop"}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)("div",{className:"c-misc-upload__description",children:"Safely transfer a file to the ClassSolver Support Team."}),(0,pr.jsx)("div",{children:(0,pr.jsx)(j_,{schoolId:e.id,mutation:ut,fileSelect:this.fileSelect,uploadFile:this.state.uploadFile,isLoading:this.state.isLoading,loadingFile:this.loadingFile})})]})]})}}const k_=e=>{const{id:t,name:n,title:r,description:o,checked:i=!0,onChangeHandler:s}=e;return(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,pr.jsxs)("div",{className:"u-w-55",children:[(0,pr.jsx)("div",{className:"mb-2",children:r}),(0,pr.jsx)("p",{children:o})]}),(0,pr.jsx)("div",{className:"u-w-45",children:(0,pr.jsxs)("div",{className:"c-toggle",children:[(0,pr.jsx)("input",{type:"checkbox",className:"c-toggle__checkbox",id:t,name:n,checked:i,onChange:s}),(0,pr.jsxs)("label",{className:"c-toggle__label",htmlFor:t,children:[(0,pr.jsx)("div",{className:"c-toggle__on",children:"Yes"}),(0,pr.jsx)("div",{className:"c-toggle__off",children:"No"})]})]})})]})},N_=({adminOnlyRequests:e,updateAdminOnly:t,showTeachersInSolver:n,updateShowTeachersInSolver:r})=>{const i=o.useContext(Cw).gettextObj;return(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-4",id:"mode",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Modes"}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,pr.jsxs)("div",{className:"u-w-55",children:[(0,pr.jsx)("div",{className:"mb-2",children:"Turn On \u2018Admin Only Request Mode\u2019"}),(0,pr.jsx)("p",{children:"Enables all Administrators to create and view sensitive Requests that are only visible when this mode is turned on."})]}),(0,pr.jsx)("div",{className:"u-w-45",children:(0,pr.jsxs)("div",{className:"c-toggle--admin",children:[(0,pr.jsx)("input",{type:"checkbox",className:"c-toggle__checkbox",id:"adminOnlyRequests",name:"adminOnlyRequests",checked:e,onChange:t}),(0,pr.jsxs)("label",{className:"c-toggle__label",htmlFor:"adminOnlyRequests",children:[(0,pr.jsx)("div",{className:"c-toggle__on",children:"Yes"}),(0,pr.jsx)("div",{className:"c-toggle__off",children:"No"})]})]})})]}),(0,pr.jsx)(k_,{id:"showTeachersInSolver",name:"showTeachersInSolver",title:"Hide assigned teachers on the Solver page",description:`This is a useful mode if you would like to show teachers the Solver page but don\u2019t want them to see the teachers that have been assigned to ${i.gettext("classes")}.`,checked:!n,onChangeHandler:r})]})},E_=({avoidSameTeacher:e,loading:t,includeStudentsWithNoValidFriends:n,onChange:r})=>(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-4",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Preferences"}),t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)(k_,{id:"avoidSameTeacher",name:"avoidSameTeacher",title:"Employ \u2018Avoid Same Teacher\u2019",description:"\u2018Avoid Same Teacher' tries to avoid placing a student with the same teacher for two consecutive years.",checked:e,onChangeHandler:t=>r(t,e)}),(0,pr.jsx)(k_,{id:"includeStudentsWithNoValidFriends",name:"includeStudentsWithNoValidFriends",title:"Flag Students without friendship nominations",description:"The green friendship warning flag will be displayed on the Solver page for students who have not nominated any friends or where the friendship nomination is not possible (e.g. the friend is in another grade)",checked:n,onChangeHandler:e=>r(e,n)})]})]}),T_=({toggle:e,schoolId:t,title:n,description:r,cautionHeading:i,removeButtonText:s,cautionText:a,cautionButtonText:l,successMessage:c,errorMessage:u,refetchQueries:d,removeByGradesMutation:h})=>{const[p,f]=(0,o.useState)(!0),{data:m,loading:g}=Gm(bg,{variables:{schoolId:t}}),[v,{error:y,loading:b}]=Km(h,{onError:()=>{}}),[x,w]=(0,o.useState)([]),S=g||b,C=S?[]:m.activeSchoolGrades.map((e=>({label:e.label,value:e.id})));return p?(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-45rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:n,toggle:e}),S?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Xk,{text:r}),(0,pr.jsxs)(Ig,{className:"pb-4",children:[(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select Current Grade/s to apply to:"}),(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:C,value:x,onChange:e=>{w(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsx)(Ef,{className:"mt-5 px-4",buttonText:s,onButtonClick:()=>f(!1),onCancelClick:e,disabled:0===x.length}),y&&(0,pr.jsx)($k,{className:"mt-5 px-4",text:y.message})]})]})]}):(0,pr.jsx)(DS,{dangerousMutation:()=>v({variables:{schoolId:t,currentGradeIds:x.map((e=>e.value))},refetchQueries:d,onCompleted:e}),cautionHeading:i,cautionText:a,cautionButtonText:l,successMessage:c,errorMessage:u,toggleComponent:e})},O_=({toggle:e,schoolId:t,title:n,description:r,cautionHeading:i,removeButtonText:s,cautionText:a,cautionButtonText:l,successMessage:c,errorMessage:u,refetchQueries:d,removeByGradesMutation:h})=>{const[p,f]=(0,o.useState)(!0),[m,g]=(0,o.useState)(!0),[v,y]=(0,o.useState)(!0),{data:b,loading:x}=Gm(bg,{variables:{schoolId:t}}),[w,{error:S,loading:C}]=Km(h,{onError:()=>{}}),[j,_]=(0,o.useState)([]),k=x||C,N=k?[]:b.activeSchoolGrades.map((e=>({label:e.label,value:e.id})));return p?(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-45rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:n,toggle:e}),k?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Xk,{text:r}),(0,pr.jsxs)(Ig,{className:"pb-4",children:[(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Select Current Grade/s to apply to:"}),(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:N,value:j,onChange:e=>{_(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{className:"pt-2",children:"Select the Request Type/s to apply to:"}),(0,pr.jsxs)(av,{className:"pt-2",children:[(0,pr.jsx)(ld,{className:"btn-mid-150-width",active:m&&!v,onClick:()=>{g(!0),y(!1)},children:"Pairings Only"}),(0,pr.jsx)(ld,{className:"btn-mid-150-width",active:!m&&v,onClick:()=>{g(!1),y(!0)},children:"Separations Only"}),(0,pr.jsx)(ld,{className:"btn-mid-150-width",active:m&&v,onClick:()=>{g(!0),y(!0)},children:"Both"})]})]}),(0,pr.jsx)(Ef,{className:"mt-5 px-4",buttonText:s,onButtonClick:()=>f(!1),onCancelClick:e,disabled:0===j.length}),S&&(0,pr.jsx)($k,{className:"mt-5 px-4",text:S.message})]})]})]}):(0,pr.jsx)(DS,{dangerousMutation:()=>w({variables:{schoolId:t,currentGradeIds:j.map((e=>e.value)),deletePairRequests:m,deleteSeparateRequests:v},refetchQueries:d,onCompleted:e}),cautionHeading:i,cautionText:a,cautionButtonText:l,successMessage:c,errorMessage:u,toggleComponent:e})},I_=({toggle:e,schoolId:t,adminOnly:n})=>{const[r,i]=(0,o.useState)(!0),{data:s,loading:a}=Gm(gg,{variables:{schoolId:t}}),[l,{error:c,loading:u}]=Km(Re,{onError:()=>{}}),[d,h]=(0,o.useState)([]),p=a||u,f=p?[]:YS(s.activeCurrentClasses).map((e=>({label:e.label,value:e.id})));return r?(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-45rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Remove Students by Current Class",toggle:e}),p?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Xk,{text:"This function removes students based on the Current Class or classes that you select below. Students in class/s not selected will not be affected."}),(0,pr.jsxs)(Ig,{className:"pb-4",children:[(0,pr.jsxs)("div",{className:"px-4 pt-4",children:[(0,pr.jsx)(Qg,{children:"Current Class/s"}),(0,pr.jsx)(Xx,{name:"current_classes",className:"c-input__multiselect",placeholder:"Select Current Classes",options:f,value:d,onChange:e=>{h(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsx)(Ef,{className:"mt-5 px-4",buttonText:"Remove Students",onButtonClick:()=>i(!1),onCancelClick:e,disabled:0===d.length}),c&&(0,pr.jsx)($k,{className:"mt-5 px-4",text:c.message})]})]})]}):(0,pr.jsx)(DS,{dangerousMutation:()=>l({variables:{schoolId:t,currentClassIds:d.map((e=>e.value))},refetchQueries:[{query:me,variables:{adminOnly:n,schoolId:t}},{query:gg,variables:{schoolId:t}}],onCompleted:e}),cautionHeading:"Remove Students",cautionText:"You can not 'undo' this operation. Are you sure you would like to permanently remove all students by class?",cautionButtonText:"Yes, Proceed",successMessage:"Students by class have been removed.",errorMessage:"Could not remove data",toggleComponent:e})},R_=({toggle:e,schoolId:t})=>{const[n,r]=(0,o.useState)(""),[i,s]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[c,u]=(0,o.useState)(!1),{data:d,loading:h}=Gm(gg,{variables:{schoolId:t}}),[p,{loading:f}]=Km(jg,{refetchQueries:[{query:gg,variables:{schoolId:t}}]});let m=[];if(d){let e=[...d.activeCurrentClasses].sort(((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0})));m=e.map((e=>({label:e.label,value:e.id})))}const g=e=>m.find((t=>t.value===e)),v=h||f;return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Rename Current Class",toggle:e}),v?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Xk,{text:"This feature will replace an existing Current Class label with the new label.  To rename a Current Class Label, select the existing label from the drop-down on the left, then type the desired new label on the right.  Then click Rename.  Repeat if you would like to rename multiple labels."}),(0,pr.jsxs)(Ig,{className:"py-4 px-5",children:[(0,pr.jsxs)("div",{className:"d-flex py-2 justify-content-between",children:[(0,pr.jsxs)("div",{className:"d-flex-col w-40 h-24",children:[(0,pr.jsx)(Qg,{children:"Existing Label"}),(0,pr.jsx)(Xx,{id:"current classes",className:"c-input__multiselect",placeholder:"Select Current Class...",options:m,value:g(i),onChange:e=>{s(e.value)},closeMenuOnSelect:!0,isSingle:!0,styles:fN})]}),(0,pr.jsx)("div",{className:"px-3 pt-3 mt-4",children:"change to"}),(0,pr.jsxs)("div",{className:"w-40",children:[(0,pr.jsx)(Qg,{children:"New Label"}),(0,pr.jsx)(Zg,{type:"text",name:"label",onChange:e=>{r(e.target.value)},maxLength:10,placeholder:"Type new label",value:n})]})]}),(0,pr.jsx)(Ef,{className:"mt-4",buttonText:"Rename",onButtonClick:()=>{const e=g(i),o={schoolId:t,id:e.value,label:n};p({variables:{currentClassParams:o}}).then((()=>{r(""),s(""),u(!1),l(!0)})).catch((()=>{l(!1),u(!0)}))},onCancelClick:e,disabled:""===i||""===n}),c&&(0,pr.jsx)($k,{className:"pr-4",text:"Error - could not update class label. Another class with that label may already exist"}),a&&(0,pr.jsx)("p",{className:"text-success text-right pt-2",children:"Success! The label has been updated."})]})]})]})},A_=({toggle:e})=>{const t=uw(),{data:n,loading:r,error:i}=Gm(ct,{variables:{schoolId:t},fetchPolicy:"network-only"}),[s,a]=(0,o.useState)(),[l,{loading:c}]=Km(at,{variables:{schoolId:uw(),fileName:null===s||void 0===s?void 0:s.value}}),[u,d]=(0,o.useState)(!1);if(r)return null;if(i)return(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:e,toggle:e,buttonText:"Dismiss",showCancel:!1,heading:"Restore Backup",text:"There was an error fetching the available backups. Please try again later."});const h=n.availableSchoolBackups.map((({file:e})=>({label:Hh(e.timestamp),value:e.fileName})));const p=0===h.length;return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Restore backup",toggle:e,className:"px-4 py-3"}),(0,pr.jsxs)(Ig,{className:"px-4",children:[(0,pr.jsx)("p",{children:"Please select from the drop down list below and click Restore"}),(0,pr.jsxs)("div",{className:"d-flex mb-3",children:[(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:"Select Backup",options:h,value:s,onChange:e=>{a(e)},closeMenuOnSelect:!0,isDisabled:p}),(0,pr.jsx)(ld,{className:"ml-3",color:"primary",onClick:()=>{d(!0)},disabled:!s,type:"button",children:"Restore"})]}),p&&(0,pr.jsx)($k,{text:"There are no backup files available"})]})]}),u&&(0,pr.jsx)(DS,{dangerousMutation:l,mutationLoading:c,cautionHeading:"Restore backup for this school",cautionText:`Are you sure you want to restore backup from ${s.label}? This will replace all current data with the backup for this school.`,cautionButtonText:"Yes, Proceed",successMessage:"Backup has been restored",errorMessage:"Could not restore backup",toggleComponent:()=>{d(!1),e()}})]})},M_=e=>{const{children:t,buttonText:n,onButtonClick:r}=e;return(0,pr.jsxs)("div",{className:"d-flex mb-2 justify-content-between align-items-center",children:[(0,pr.jsx)("div",{style:{flex:1},children:t}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:r,children:n})]})},P_=({rollOverDataMutation:e,deactivateAllStudentsMutation:t,isSuper:n})=>{const[r,i]=(0,o.useState)(!1),[s,a]=(0,o.useState)(!1);return(0,pr.jsxs)("div",{className:"py-5 u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-5 u-blue-primary",children:"Rollover Options"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)(M_,{buttonText:"Roll over",onButtonClick:()=>i(!0),children:"Roll school over"}),n&&(0,pr.jsx)(M_,{buttonText:"Deactivate All Students",onButtonClick:()=>a(!0),children:"Deactivate All Students"})]}),r&&(0,pr.jsx)(DS,{dangerousMutation:e,cautionHeading:"Remove Previous Students & Teachers",cautionText:"You can not 'undo' this operation. Are you sure you would like to permanently remove your previous students and teachers?",cautionButtonText:"Yes, Proceed",successMessage:"All previous students and teachers have been removed.",errorMessage:"Could not remove data",toggleComponent:()=>i(!1)}),s&&(0,pr.jsx)(DS,{dangerousMutation:t,cautionHeading:"Deactivate All Students",cautionText:"You can not 'undo' this operation. Are you sure you would like to deactivate all students for this school?",cautionButtonText:"Yes, Proceed",successMessage:"All students have been deactivated.",errorMessage:"Could not deactivate students",toggleComponent:()=>a(!1)})]})},D_=({onDeleteButtonClick:e,onRemoveDataButtonClick:t,toggleDeleteSchoolModal:n,loading:r,deleteSchoolModal:i,error:s,isSuper:a})=>{const[l,c]=(0,o.useState)(!1),u=()=>{c(!l)},[d,h]=(0,o.useState)(!1),p=()=>{h(!d)};return(0,pr.jsxs)("div",{className:"py-5 u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-5 u-blue-primary",children:"Delete School Data"}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:e,buttonText:"Delete",children:"Delete the School and everything associated with the school"})}),a&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:t,buttonText:"Remove Data",children:"Delete the School's Data"})}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)(B_,{onButtonClick:u,buttonText:"Delete Students by Grade",children:"Delete Students by Current Grade"})}),(0,pr.jsx)("div",{children:(0,pr.jsx)(B_,{onButtonClick:p,buttonText:"Delete Students by Class",children:"Delete Students by Current Class"})})]}),i.text&&(0,pr.jsx)(F_,{toggle:n,loading:r,onButtonClick:i.onClick,heading:i.heading,text:i.text,error:s}),l&&(0,pr.jsx)(KS,{schoolId:uw(),toggle:u}),d&&(0,pr.jsx)(JS,{schoolId:uw(),toggle:p})]})},F_=({toggle:e,heading:t,text:n,error:r,loading:i,onButtonClick:s})=>{const[a,l]=(0,o.useState)(""),c="yes"!==a.toLowerCase();return(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:t,toggle:e}),i?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{className:"u-white-space-pre-wrap",children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),"This action cannot be undone. ",n]})]})}),(0,pr.jsxs)("div",{className:"mt-3",children:[(0,pr.jsx)(Qg,{children:"Please type 'yes' to confirm"}),(0,pr.jsx)(Zg,{type:"text",value:a,onChange:e=>l(e.target.value)}),(0,pr.jsx)(ld,{color:"primary",className:"w-100 mt-4",onClick:s,disabled:c,children:"Yes, Delete"}),(0,pr.jsx)("div",{onClick:e,className:"w-100 mt-3 text-center text-primary cursor-pointer py-2",children:"Cancel"}),(0,pr.jsx)($k,{text:r})]})]})]})})},L_=({toggle:e,heading:t})=>{const[n,r]=(0,o.useState)(),[i,{loading:s}]=Km(lt,{variables:{schoolId:uw()},onError:e=>{r(`Error - Unable to send emails - ${e}`)},onCompleted:()=>{e()}}),[a,l]=(0,o.useState)(""),c="yes"!==a.toLowerCase();return(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:t,toggle:e}),s?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:"mt-3",children:[(0,pr.jsx)(Qg,{children:"Please type 'yes' to confirm"}),(0,pr.jsx)(Zg,{type:"text",value:a,onChange:e=>l(e.target.value)}),(0,pr.jsx)(ld,{color:"primary",className:"w-100 mt-4",onClick:i,disabled:c,children:"Yes, Send Emails"}),(0,pr.jsx)("div",{onClick:e,className:"w-100 mt-3 text-center text-primary cursor-pointer py-2",children:"Cancel"}),(0,pr.jsx)($k,{text:n})]})})]})})},B_=({children:e,buttonText:t,onButtonClick:n,description:r})=>{const[i,s]=(0,o.useState)(!1);return(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-2",children:[(0,pr.jsxs)("div",{children:[e,r&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"cursor-pointer",onClick:()=>s(!i),children:i?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-minus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"Less details"})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-plus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"More details"})]})}),i&&(0,pr.jsx)("div",{className:"border px-3 pt-3",children:r})]})]}),(0,pr.jsx)("div",{className:"c-button--secondary",onClick:n,children:t})]})},U_=({isSuper:e,myprofile:t})=>{const[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1),[a,l]=(0,o.useState)({}),{data:c,loading:u}=Gm($e,{variables:{filterRole:aS}}),{data:d,loading:h}=Gm($e,{variables:{filterRole:sS}}),p=[{query:$e,variables:{filterRole:aS}},{query:$e,variables:{filterRole:sS}}];if(u||h)return(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})});const f=c.users.concat(d.users);return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h1",{className:"mb-5 mt-5 u-blue-primary",children:"Support Administrators"}),(0,pr.jsx)("div",{className:"u-content-border-bottom pb-4",children:(0,pr.jsx)(Zh,{users:f,onAddAdminClick:()=>{r(!0),l({firstName:"",lastName:"",positionTitle:"",email:"",schools:[],accounts:[],mfa:!1}),s(!0)},onEditAdminClick:e=>{r(!0),l({...e}),s(!1)},allowAdd:e,allowEdit:e})}),n&&(0,pr.jsx)(cN,{toggle:()=>r(!1),refetchQueries:p,addAdmin:i,canDelete:a.id!==t.id,adminData:a,roleType:aS})]})},G_=({onChange:e,value:t})=>(0,pr.jsx)("div",{className:"c-friendship-radio",children:(0,j.times)(9,(n=>(0,pr.jsxs)("div",{className:"c-friendship-radio__option",children:[(0,pr.jsx)("input",{className:"c-friendship-radio__input",type:"radio",onChange:e,checked:t===n,id:`friendship-${n}`,name:"friendship",value:n.toString()}),(0,pr.jsx)("label",{className:"c-friendship-radio__label",htmlFor:`friendship-${n}`,children:n.toString()})]},n)))}),$_=()=>{const e=uw(),[t,n]=(0,o.useState)(),[r,i]=(0,o.useState)(!1),{data:s,loading:a}=Gm(nC,{variables:{schoolId:e}}),{data:l,loading:c}=Gm(sC,{variables:{schoolId:e,adminOnly:!0}}),[u]=Km(iC,{onError:()=>{}}),[d,{error:h}]=Km(qe,{onCompleted:()=>u({variables:{schoolId:e}}),onError:()=>{}});if(a||c)return(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})});const{schoolSettings:{maxFriends:p}}=s,f=t=>d({variables:{schoolSettingParams:{maxFriends:t,schoolId:e}}});return(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsxs)("div",{className:"w-25",children:[(0,pr.jsx)("div",{className:"mb-2",children:"Friendship Preferences"}),(0,pr.jsx)("p",{children:"Maximum number of friends each student can nominate."})]}),(0,pr.jsxs)("div",{className:"d-flex flex-column",children:[(0,pr.jsx)("div",{className:"mt-4 mb-1",children:(0,pr.jsx)(G_,{onChange:e=>{const t=parseInt(e.currentTarget.value,10),r=Object.values((0,j.countBy)(l.constraints.constraintsFriend,"studentFromId")).some((e=>e>t));r?(n(t),i(!0)):f(t)},value:p})}),h&&(0,pr.jsx)($k,{text:"Error changing friendship preference, please refresh and try again"})]}),r&&(0,pr.jsx)(DS,{dangerousMutation:()=>f(t),cautionHeading:"Reducing maximum friends",cautionText:(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{children:"Are you sure you would like to decrease the number of friends?"}),(0,pr.jsx)("br",{}),(0,pr.jsx)("div",{children:"If teachers have already added student friendship information, you will be deleting any additional friends entered over this number."})]}),cautionButtonText:"Yes, Proceed",errorMessage:"Error changing friendship preference, please refresh and try again",toggleComponent:()=>i(!1),showSuccess:!1})]})},q_=({teachersToAddTeacherRequests:e,teachersToAddStudentRequests:t,feederSchool:n,onChange:r})=>{const i=o.useContext(Cw).gettextObj,{pathname:s}=ml();return(0,pr.jsxs)("div",{className:"c-survey-settings",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Survey Settings"}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between mb-4 align-items-center",children:[(0,pr.jsxs)("div",{className:"u-w-55",children:[(0,pr.jsx)("div",{className:"mb-2",children:"Characteristics"}),(0,pr.jsxs)("p",{children:["Set up the characteristics for balancing"," ",i.gettext("classes")," at your school."]})]}),(0,pr.jsx)(nc,{className:"c-button--secondary c-survey-settings__right",to:{pathname:"/Characteristics",state:{navFrom:s}},children:"Characteristic Settings"})]}),(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)($_,{})}),(0,pr.jsx)(k_,{id:"teachersToAddStudentRequests",name:"teachersToAddStudentRequests",title:"Allow Teachers to add Student Requests",description:"Allow teachers to be able to add and view requests to pair and separate students from other students.",checked:t,onChangeHandler:e=>r(e,t)}),(0,pr.jsx)(k_,{id:"teachersToAddTeacherRequests",name:"teachersToAddTeacherRequests",title:"Allow Teachers to add Teacher Requests",description:"Allow teachers to be able to add and view requests to pair and separate students from teachers.",checked:e,onChangeHandler:t=>r(t,e)}),(0,pr.jsx)(k_,{id:"feederSchool",name:"feederSchool",title:"Enable Feeder School Survey Option",description:"If you plan to send surveys external to your school (e.g. feeder schools) enable this feature.",checked:n,onChangeHandler:e=>r(e,n)})]})},z_=({toggle:e,schoolId:t,classes:n})=>{const[r,i]=(0,o.useState)(),[s,a]=(0,o.useState)(),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!1),h=n.map((e=>({label:e.label,value:e.id}))),[p,{loading:f}]=Km(_g,{refetchQueries:[{query:mg,variables:{schoolId:t}}]}),m=o.useContext(Cw).gettextObj;return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{className:"px-5 py-4",title:`Swap ${m.gettext("Class")} Labels`,toggle:e}),f?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"p-0 u-modal__h-14rem",children:[(0,pr.jsx)("div",{className:"d-flex p-4 justify-content-between",children:(0,pr.jsxs)("div",{className:"d-flex p-3 w-100",children:[(0,pr.jsxs)("div",{className:"d-flex-col w-40",children:[(0,pr.jsxs)(Qg,{children:[m.gettext("Class")," 1"]}),(0,pr.jsx)(Xx,{id:"currentClasseOne",className:"c-input__multiselect",placeholder:`Select ${m.gettext("Class")}...`,options:h,value:r,onChange:e=>{i(e),s&&e.value===s.value&&a(null)},closeMenuOnSelect:!0,isSingle:!0,styles:fN})]}),(0,pr.jsx)("div",{className:"d-flex px-3 pt-3 mt-4",children:"swap with"}),(0,pr.jsxs)("div",{className:"d-flex-col w-40",children:[(0,pr.jsxs)(Qg,{children:[m.gettext("Class")," 2"]}),(0,pr.jsx)(Xx,{id:"currentClasseTwo",className:"c-input__multiselect",placeholder:`Select ${m.gettext("Class")}...`,options:h,value:s,onChange:e=>{a(e),r&&e.value===r.value&&i(null)},closeMenuOnSelect:!0,isSingle:!0,styles:fN})]})]})}),(0,pr.jsx)("div",{className:"px-4 d-flex justify-content-end",children:(0,pr.jsx)(Ef,{className:"px-4",buttonText:"Swap",onButtonClick:()=>{const e={schoolId:t,classOneId:r&&r.value,classTwoId:s&&s.value};p({variables:{swapClassesParams:e}}).then((()=>{i(null),a(null),d(!1),c(!0)})).catch((()=>{c(!1),d(!0)}))},onCancelClick:e,disabled:null===r||null===s})}),u&&(0,pr.jsx)($k,{className:"pr-4",text:"Error - could not update class label. Another class with that label may already exist"}),l&&(0,pr.jsx)("div",{className:"px-4",children:(0,pr.jsx)("p",{className:"text-success text-right px-4 pt-2",children:"Success! The label has been updated."})})]})]})},V_=({toggle:e,schoolId:t})=>{const{data:n,loading:r}=Gm(yg,{variables:{schoolId:t}}),[i,{error:s,loading:a}]=Km(Pe,{onError:()=>{}}),[l,c]=(0,o.useState)([]),u=r||a,d=u?[]:n.currentSchoolGrades.map((e=>({label:e.label,value:e.id})));return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-35rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:"Switch Student Names by Current Grade",toggle:e}),u?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{className:"u-white-space-pre-wrap",children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),"This action cannot be undone."]})]})}),(0,pr.jsxs)("div",{className:"my-3",children:[(0,pr.jsx)(Xx,{name:"current_grades",className:"c-input__multiselect",placeholder:"Select Current Grades",options:d,value:l,onChange:e=>{c(e)},closeMenuOnSelect:!1,isMulti:!0,styles:fN}),s&&(0,pr.jsx)($k,{text:s.message})]}),(0,pr.jsx)(Ef,{className:"mt-5",buttonText:"Yes, switch",onButtonClick:()=>{i({variables:{schoolId:t,currentGradeIds:l.map((e=>e.value))},onCompleted:e})},onCancelClick:e,disabled:0===l.length})]})]})},H_=({toggle:e,schoolId:t,adminOnly:n})=>{const[r,i]=(0,o.useState)(""),[s,a]=(0,o.useState)(""),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!1),{data:h,loading:p}=Gm(yg,{variables:{schoolId:t}}),{data:f,loading:m}=Gm(vg,{variables:{schoolId:t}}),[g,{loading:v}]=Km(we,{refetchQueries:[{query:me,variables:{adminOnly:n,schoolId:t},fetchPolicy:"network-only"}]}),y=e=>({label:e.label,value:e.id}),b=h?h.currentSchoolGrades.map(y):[],x=f?f.newSchoolGrades.map(y):[],w=(e,t)=>e.find((e=>e.value===t)),S=p||m||v,C=o.useContext(Cw).gettextObj;return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:`Update ${C.gettext("New Grade")}`,toggle:e}),S?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Xk,{text:`This feature enables you to change the ${C.gettext("New Grade")} for students in a Current Grade. To update the ${C.gettext("New Grade")}, select the Current Grade from the drop-down on the left, then select the ${C.gettext("New Grade")} on the right.  Then click Update.  Repeat if you would like to make multiple updates.`}),(0,pr.jsxs)(Ig,{className:"py-4 px-5",children:[(0,pr.jsxs)("div",{className:"d-flex py-2 justify-content-between",children:[(0,pr.jsxs)("div",{className:"d-flex-col w-40 h-24",children:[(0,pr.jsx)(Qg,{children:"Current Grade"}),(0,pr.jsx)(Xx,{id:"current grades",className:"c-input__multiselect",placeholder:"Select Current Grade...",options:b,value:w(b,r),onChange:e=>{i(e.value)},closeMenuOnSelect:!0,isSingle:!0,styles:fN})]}),(0,pr.jsx)("div",{className:"px-3 pt-3 mt-4",children:"goes to"}),(0,pr.jsxs)("div",{className:"w-40",children:[(0,pr.jsx)(Qg,{children:C.gettext("New Grade")}),(0,pr.jsx)(Xx,{id:"new grades",className:"c-input__multiselect",placeholder:`Select ${C.gettext("New Grade")}...`,options:x,value:w(x,s),onChange:e=>{a(e.value)},closeMenuOnSelect:!0,isSingle:!0,styles:fN})]})]}),(0,pr.jsx)(Ef,{className:"mt-4",buttonText:"Update",onButtonClick:()=>{const e=w(b,r),n=w(x,s),o={schoolId:t,currentSchoolGradeId:e.value,newSchoolGradeId:n.value};g({variables:{updateNewGradeParams:o}}).then((()=>{i(""),a(""),d(!1),c(!0)})).catch((()=>{c(!1),d(!0)}))},onCancelClick:e,disabled:""===r||""===s}),u&&(0,pr.jsx)($k,{className:"pr-4",text:"Error - could not update grade."}),l&&(0,pr.jsx)("p",{className:"text-success text-right pt-2",children:"Success! The label has been updated."})]})]})]})},W_=e=>"gender"===e.id||"current_class"===e.id,Y_=e=>!W_(e),Q_=e=>e.selectedOptions.map((({id:t})=>({attribute:e.id,value:t}))),J_=e=>e.selectedOptions.flatMap((({id:e})=>e?[{characteristicResponseId:e}]:[])),K_=(e,t)=>{const n=e.map((({id:e,name:t,characteristicResponses:n})=>({id:e,name:t,options:n.map((e=>({id:e.id,name:e.label}))).concat({id:null,name:"Unanswered"})})));return[...n,{id:"gender",name:"Gender",options:[{id:"M",name:"Male"},{id:"F",name:"Female"},{id:"X",name:"Non-Binary"}]},{id:"current_class",name:"Current Class",options:t.map((e=>({id:e.label,name:e.label})))}]},X_=(e,t,n,r)=>{if(!(e&&t&&n))return[];const o=e.map((({characteristicResponse:e})=>{const t=r.find((({id:t})=>t===e.characteristic.id)),n=t&&t.options.find((({id:t})=>t===e.id));return{criterion:t,selectedOption:n}})),i=n.map((({characteristic:e})=>{const t=r.find((({id:t})=>t===e.id)),n=t&&t.options.find((({id:e})=>null===e));return{criterion:t,selectedOption:n}})),s=t.map((({attribute:e,value:t})=>{const n=r.find((({id:t})=>t===e)),o=n&&n.options.find((({id:e})=>e===t));return{criterion:n,selectedOption:o}}));return Object.values(o.concat(s,i).reduce(((e,{criterion:t,selectedOption:n})=>{if(!t||!n)return e;const r=e[t.id];if(r){const o=[...r.selectedOptions,n];return e[t.id]={...r,selectedOptions:o},e}return{...e,[t.id]:{...t,selectedOptions:[n]}}}),{}))},Z_={teachers:[],label:"",schoolGrades:[]};function ek(e,t,n,r){let o=nk(e,t,"classEntryCriteria");o=nk(o,n,"classSizeSummary");return o.map((e=>{const t={...e,name:e.name.replace("Class",r.gettext("Class"))};return{...t,name:t.name.replace("New Grade/s",r.gettext("New Grade/s"))}})).map((e=>{if("classEntryCriteria"!==e.id||n)return e;{const t=e.dataClass;return{...e,dataClass:`${t} c-classes__table-data-border-left-2`}}}))}function tk(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]={name:e[r].name.replace("CLASSES",t.gettext("CLASSES"))});return n}function nk(e,t,n){return t?e:e.filter((e=>e.id!==n))}const rk=e=>{const t=[];for(const n of e){const e=n.name,r=n.selectedOptions,o=[];for(const t of r){const e=t.name;o.push(e)}const i=`${e} (${o.join(", ")})`;t.push(i)}return t.join(", ")};class ok extends o.Component{constructor(e){super(e),this.toggleModal=()=>{this.setState({modal:!this.state.modal,showAddAnotherButton:!0,edit:!1,canDelete:!1,newClass:Z_})},this.rowClick=e=>{const{id:t,label:n,teachers:r,schoolGrades:o,solution:i,maxClassSize:s,maxSizePerGrade:a,entryCriteriaStudentAttribute:l,entryCriteriaCharacteristicResponse:c,entryCriteriaNullResponse:u}=e;this.setState({edit:!0,canDelete:!0,showAddAnotherButton:!1,modal:!0,newClass:{label:n,teachers:r,schoolGrades:o,id:t,solution:i,maxClassSize:s,maxSizePerGrade:a,entryCriteriaStudentAttribute:l,entryCriteriaCharacteristicResponse:c,entryCriteriaNullResponse:u}})},this.state={modal:!1,edit:!1,showAddAnotherButton:!0,canDelete:!1,newClass:Z_,showDeleteAllNewClasses:!1,showSwapClassLabels:!1}}render(){const{loading:e,newClasses:t,refetchQueries:n,settings:r,schoolCharacteristics:o,currentClasses:i,deleteAllNewClasses:s}=this.props,{modal:a,newClass:l,edit:c,showDeleteAllNewClasses:u,showSwapClassLabels:d,canDelete:h,showAddAnotherButton:p}=this.state;if(e)return(0,pr.jsx)(qk,{});const f=t.map((e=>{let t;if(e.studentCount&&e.studentCount.total&&Number.isInteger(e.maxClassSize)){const n=e.studentCount.total>e.maxClassSize,r=(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("span",{className:n?"text-danger":void 0,"data-tooltip-id":e.id,children:`${e.maxClassSize} (${e.studentCount.total} allocated)`}),n&&(0,pr.jsx)(kf,{className:"c-class-summary-tooltip",border:"1px solid #bfbfbf",id:e.id,variant:"light",opacity:1,float:!0,positionStrategy:"fixed",children:(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:"c-class-summary-tooltip__body",children:[(0,pr.jsx)("b",{children:"WARNING:"})," There are more students allocated than the maximum entered for this class"]})})})]});t={...e,classSizeSummary:r}}else if(pw(e.maxSizePerGrade)){const n=(0,pr.jsx)("span",{children:e.maxSizePerGrade.map((({grade:t,max:n})=>{const r=e.studentCount&&e.studentCount.studentCountPerGrade.find((({grade:{id:e}})=>t.id===e)),o=r?r.count:null,i=o>n;return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:i?"text-danger":void 0,"data-tooltip-id":t.id,children:[t.label,": ",n,Number.isInteger(o)&&`  (${o} allocated)`]}),i&&(0,pr.jsx)(kf,{className:"c-class-summary-tooltip",border:"1px solid #bfbfbf",id:t.id,variant:"light",opacity:1,float:!0,positionStrategy:"fixed",children:(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:"c-class-summary-tooltip__body",children:[(0,pr.jsx)("b",{children:"WARNING:"})," There are more students allocated than the maximum entered for this grade"]})})})]},t.id)}))});t={...e,classSizeSummary:n}}else t={...e,classSizeSummary:e.maxClassSize};const n=((e,t,n)=>{const r=K_(t,n);return X_(e.entryCriteriaCharacteristicResponse,e.entryCriteriaStudentAttribute,e.entryCriteriaNullResponse,r)})(e,o,i);return{...t,classEntryCriteria:rk(n)}})),m=f.some((e=>""!==e.classEntryCriteria)),g=f.some((e=>null!==e.maxClassSize||pw(e.maxSizePerGrade))),v=r.adminOnlyRequests,y=this.context.gettextObj,b=[{onClick:()=>this.setState({showDeleteAllNewClasses:!0}),text:`Remove all ${y.gettext("Classes")}`,icon:"fa-trash"},{onClick:()=>this.setState({showSwapClassLabels:!0}),text:`Swap ${y.gettext("Class")} Labels`,icon:"fa-trash"}];return(0,pr.jsxs)(pr.Fragment,{children:[pw(t)?(0,pr.jsx)("div",{className:"c-classes",children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fh,{onAddClick:this.toggleModal,addText:`Add ${y.gettext("Class")}`,adminMode:v,additionalActions:b}),(0,pr.jsx)("div",{className:"c-classes__table-container",children:(0,pr.jsx)(uN,{tableName:"c-classes__table",adjustAdvancedSettingsSection:!0,sections:tk(tw,y),headers:ek(nw,m,g,y),data:f,rowCount:!0,stickyHeaderCount:1,leftStickyColumnCount:0,borderWidth:"inherit",rowClick:this.props.newClasses.length>0&&this.rowClick})}),(0,pr.jsxs)("div",{className:"c-classes__total",children:["Total - ",this.props.newClasses.length," ",y.gettext("Classes")]})]})}):(0,pr.jsx)(sk,{onClick:this.toggleModal}),a&&(0,pr.jsx)(fk,{...l,currentClasses:i,newClasses:this.props.newClasses,refetchQueries:n,isOpen:a,canDelete:h,showAddAnotherButton:p,toggle:this.toggleModal,heading:c?`Edit ${y.gettext("Class")}`:`Add ${y.gettext("Class")}`,buttonText:c?"Save Class":"Add Class",edit:c,characteristics:o}),u&&(0,pr.jsx)(DS,{dangerousMutation:s,cautionHeading:`Remove all ${y.gettext("Classes")}`,cautionText:`You can not 'undo' this operation. Are you sure you would like to remove all the ${y.gettext("classes")}?`,cautionButtonText:"Yes, Proceed",successMessage:"All classes have been removed.",errorMessage:"Could not remove data",toggleComponent:()=>this.setState({showDeleteAllNewClasses:!1})}),d&&(0,pr.jsx)(z_,{schoolId:uw(),toggle:()=>{this.setState({showSwapClassLabels:!1})},classes:f})]})}}ok.contextType=Cw;const ik=n.p+"static/media/add-icon.0df473aad9a5b1bff5339ce1d3d8e1b6.svg";class sk extends o.Component{constructor(e){super(e),this.openVideo=()=>{this.setState({showVideo:!0})},this.closeVideo=()=>{this.setState({showVideo:!1})},this.state={showVideo:!1}}render(){const{onClick:e}=this.props,{showVideo:t}=this.state,n=this.context.gettextObj;return(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid",children:(0,pr.jsxs)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:[(0,pr.jsxs)("div",{className:"flex-column text-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("h1",{className:"mt-3",children:["Set up a list of your ",n.gettext("classes")," to be solved"]}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:this.openVideo,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Watch Video"]})]}),(0,pr.jsx)("div",{children:(0,pr.jsx)("img",{height:"150px",className:"mt-4",src:ik,alt:"Add Icon"})}),(0,pr.jsxs)(ld,{className:"mt-3",color:"primary px-5",onClick:e,children:["Add ",n.gettext("Class")]})]}),t&&(0,pr.jsx)(vN,{toggle:this.closeVideo,videoUrl:eC,title:"Instruction Step 1"})]})})})}}sk.contextType=Cw;const ak=e=>{if(e.name)return{label:e.name,value:e.id}},lk=({availableCriteria:e,selectedCriterion:t,onChange:n,readOnly:r=!1})=>{const o=r?{...fN,multiValue:(e,{theme:{colors:t}})=>({...e,backgroundColor:t.neutral10,border:`0.5px solid ${t.neutral20}`,color:t.neutral40}),multiValueLabel:(e,{theme:{colors:t}})=>({...e,color:t.neutral40})}:fN;return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"criterion col-4",children:(0,pr.jsx)(Xx,{options:e.map(ak),onChange:r=>{if(t.id!==r.value){const t=e.find((({id:e})=>e===r.value));n({...t,selectedOptions:t.options})}},value:ak(t),isDisabled:r})}),(0,pr.jsx)("div",{className:"criterionValue col-7",children:(0,pr.jsx)(Xx,{options:t.options.map(ak),onChange:e=>{const r=e?e.map((({value:e})=>t.options.find((({id:t})=>t===e)))):[];n({...t,selectedOptions:r})},value:t.selectedOptions.map(ak),isMulti:!0,styles:o,isDisabled:r})})]})},ck={id:null,options:[],selectedOptions:[]},uk=({currentCriteria:e=[],availableCriteria:t,onChange:n,readOnly:r})=>{const i=o.useContext(Cw).gettextObj,s=0===e.length,a=t.filter((t=>!e.some((({id:e})=>t.id===e)))),l=Object.entries(e).sort().map((([t,o])=>(0,pr.jsxs)("div",{className:"c-classes__entry-criterion row",children:[r||(0,pr.jsx)("div",{className:"col-1",children:(0,pr.jsx)("i",{className:"fa fa-trash c-classes__delete-icon",onClick:()=>n(((e,t)=>{const n=e.findIndex((({id:e})=>e===t.id)),r=[...e];return r.splice(n,1),r})(e,o))})}),(0,pr.jsx)(lk,{selectedCriterion:o,availableCriteria:a,onChange:t=>{n(((e,t,n)=>{const r=e.findIndex((({id:e})=>e===t.id)),o=[...e];return o.splice(r,1,n),o})(e,o,t))},readOnly:r})]},t))),c=`Click on \`+ Add ${i.gettext("Class")} Entry Criteria\` if you would like only certain students to be placed in this ${i.gettext("class")}.`,u=r?(0,pr.jsx)("div",{className:"c-modal-note--sub-note mb-1",children:"Class Entry Criteria"}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"c-modal-note--sub-note mb-1",children:c}),(0,pr.jsx)(Lh,{text:`Add ${i.gettext("Class")} Entry Criteria`,onClick:()=>{n(((e,t)=>t&&!e.some((({id:e})=>e===t.id))?[...e,t]:e)(e,ck))}})]});return(0,pr.jsxs)("div",{className:"c-classes__entry-criteria",children:[u,s?(0,pr.jsx)("div",{className:"m-3",children:r&&"There are no Class Entry Criteria rules applied to this class."}):(0,pr.jsxs)("div",{className:"m-3",children:[(0,pr.jsxs)("div",{className:"row",children:[r||(0,pr.jsx)("div",{className:"heading col-1"}),(0,pr.jsx)("div",{className:"heading col-4",children:"Characteristic"}),(0,pr.jsx)("div",{className:"heading col-7",children:"Response Options"})]}),l]})]})},dk="BY_CLASS",hk="BY_GRADE";class pk extends o.Component{constructor(e){super(e),this.onChange=e=>{this.setState({[e.target.name]:e.target.value})},this.toggleDeleteModal=()=>{this.setState({deleteModal:!this.state.deleteModal})},this.toggleCautionModal=()=>{this.setState({cautionModal:!this.state.cautionModal})},this.toggleLoadingModal=()=>{this.setState({loadingModal:!this.state.loadingModal})},this.toggleAdvancedSettings=()=>{this.setState({advancedSettings:!this.state.advancedSettings})},this.openVideo=()=>{this.setState({showVideo:!0})},this.closeVideo=()=>{this.setState({showVideo:!1})},this.onMultiSelectChange=e=>{const t=e||[],n=t.length<=1?dk:this.state.maxClassSizeMode;this.setState({schoolGrades:t,maxClassSizeMode:n})},this.onMultiTeacherSelectChange=e=>{const t=e||[];this.setState({teachers:t})},this.gradesHaveChanged=()=>{const{id:e,schoolGrades:t}=this.state,{newClasses:n}=this.props,r=n.find((t=>t.id===e));if(!r)return!1;const o=t.map((e=>e.value)).sort(),i=r.schoolGrades.map((e=>e.id)).sort();return!gw(i,o)},this.onSaveClassClick=e=>{const{newClasses:t}=this.props;if(su(t)){const t=this.validateInputs(this.state);this.setState({errors:t,isDeleteClass:!1}),0===Object.keys(t).length&&this.saveClass(!1,e)}else this.saveClass(!1)},this.saveClass=(e,t)=>{const{createOrUpdateNewClass:n,toggle:r,refetchQueries:o,refetch:i}=this.props,{id:s,label:a,schoolGrades:l,teachers:c,maxClassSize:u,currentCriteria:d,maxClassSizeMode:h}=this.state,p=this.validateInputs(this.state);if(0===Object.keys(p).length){this.setState({loading:!0});const p=c.map((e=>e.value)),f=l.map((e=>e.value)),m=parseInt(u),g=d.filter(W_).flatMap(Q_),v=(e=>e.filter(Y_).flatMap(J_))(d),y=(e=>e.filter(Y_).flatMap((e=>{const t=(e=>{if(e.selectedOptions.find((({id:e})=>null===e)))return{characteristicId:e.id}})(e);return t?[t]:[]})))(d);let b;if(h===dk)b={maxClassSize:m,maxSizePerGrade:[]};else if(h===hk){const e=l.map((e=>({gradeId:e.value,max:e.max})));b={maxClassSize:null,maxSizePerGrade:e.every((({max:e})=>!e))?[]:e}}n({variables:{newClassParams:{schoolId:uw(),id:s,label:a,teachers:p,grades:f,entryCriteriaStudentAttribute:g,entryCriteriaCharacteristicResponse:v,entryCriteriaNullResponse:y,...b}},refetchQueries:o}).then((()=>{if(!0===e){this.onSolverRerun();const e=this.getSaveSolverVariables(f);this.rerunSolver(e)}else this.setState({loading:!1}),t?this.setState({label:"",maxClassSize:"",currentCriteria:[]}):r(),i&&i()})).catch((e=>{aw(e);let t="Error, please try again.";h===hk&&b.maxSizePerGrade.some((({max:e})=>!e))&&(t="Maximums must be given for all grades"),this.setState({loading:!1,errors:{mutation:t}})}))}else this.setState({errors:p})},this.deleteClass=e=>{const{deleteNewClassMutation:t,refetchQueries:n,toggle:r,id:o}=this.props;this.setState({loading:!0}),t({variables:{id:o},refetchQueries:n}).then((()=>{if(!0===e){const{newSchoolGradesData:e}=this.props;this.onSolverRerun();const t=this.getDeleteSolverVariables(e);this.rerunSolver(t)}else this.setState({deleteModal:!1,loading:!1}),r()})).catch((e=>{aw(e),this.setState({loading:!1,errors:{delete:"There was an error deleting. Try again."}})}))},this.onSolverRerun=()=>{this.setState({loading:!1,deleteModal:!1,cautionModal:!1,solverLoading:!0,loadingModal:!0})},this.canRerun=e=>{const{newClasses:t}=this.props,{isDeleteClass:n}=this.state,r=t.filter((t=>su(t.solution)&&t.schoolGrades.some((t=>t.id===e))));return n?r.length>1:r.length>0},this.rerunSolver=e=>{const{solveActiveGradeMutation:t}=this.props,n=[{query:me,variables:{schoolId:uw()}}];if(su(e[0])){const r=1===e.length?n:void 0;t({variables:e[0],refetchQueries:r}).then((()=>{if(su(e[1])){const r=2===e.length?n:void 0;t({variables:e[1],refetchQueries:r}).then((()=>{if(su(e[2])){const r=3===e.length?n:void 0;t({variables:e[2],refetchQueries:r}).then((()=>{this.onSuccessfulRerun()}))}else this.onSuccessfulRerun()}))}else this.onSuccessfulRerun()})).catch((()=>{this.onErrorRerun()}))}else this.onSuccessfulRerun()},this.onSuccessfulRerun=()=>{this.setState({solverLoading:!1,loadingModal:!1}),this.props.toggle()},this.onErrorRerun=()=>{this.setState({solverLoading:!1,errors:{solver:"Network Error"}})},this.convertToEntryCriterionStudentAttributes=e=>e.selectedOptions.map((({id:t})=>({attribute:e.id,value:t}))),this.convertToEntryCriterionCharacteristicResponses=e=>e.selectedOptions.map((({id:e})=>({characteristicResponseId:e}))),this.toggleAdvancedClassSettingsVideo=()=>{this.setState((e=>({...e,showAdvancedClassSettingsVideo:!e.showAdvancedClassSettingsVideo})))},this.maxSizeForGrade=e=>{const t=this.props.maxSizePerGrade&&this.props.maxSizePerGrade.find((({grade:{id:t}})=>t===e.id));return t?t.max:null};const t=this.props.schoolGrades?this.props.schoolGrades.map((e=>({value:e.id,label:e.label,order:e.order,max:this.maxSizeForGrade(e)}))):[],n=this.props.teachers?this.props.teachers.map((e=>({value:e.id,label:Uh(e)}))):[],r=Number.isInteger(this.props.maxClassSize)?this.props.maxClassSize:"",o=[...this.props.currentClasses].sort(((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0}))),i=K_(this.props.characteristics,o),s=X_(this.props.entryCriteriaCharacteristicResponse,this.props.entryCriteriaStudentAttribute,this.props.entryCriteriaNullResponse,i),a=pw(this.props.maxSizePerGrade)?hk:dk;this.state={loading:!1,loadingModal:!1,solverLoading:!1,isDeleteClass:!1,deleteModal:!1,cautionModal:!1,showVideo:!1,id:this.props.id,label:this.props.label,maxClassSize:r,schoolGrades:t,teachers:n,errors:{},currentCriteria:s,availableCriteria:i,advancedSettings:s.length>0||r>0||pw(this.props.maxSizePerGrade),showAdvancedClassSettingsVideo:!1,maxClassSizeMode:a}}getSchoolGradesLabel(e){return e&&e.length>0?e.map((e=>e.label)).join(", "):""}duplicateClassLabel({id:e,label:t}){const{newClasses:n}=this.props;if(n)return n.filter((({id:t})=>!e||t!==e)).some((({label:e})=>e===t))}validateInputs(e){const t={};return aC(e.label)||(t.label="Required Field"),1===e.label.length&&(t.classLabelTooShort="Class Label needs to be more than one character e.g. 1A"),this.duplicateClassLabel(e)&&(t.duplicateClassLabel="Please select a unique label. If you would like to swap class labels, create a temporary label (e.g. Class X)."),e.schoolGrades.length<1&&(t.schoolGrades="Must select at least one"),t}getDeleteSolverVariables(e){let t=[];return e.forEach((e=>{this.canRerun(e.id)&&t.push({solution:{schoolId:uw(),gradeId:e.id}})})),t}getSaveSolverVariables(e){let t=[];return e.forEach((e=>{this.canRerun(e)&&t.push({solution:{schoolId:uw(),gradeId:e}})})),t}render(){const{loadingOne:e,loadingTwo:t,newSchoolGradesData:n=[],teachersData:r=[],isOpen:i,toggle:s,disableInput:a,heading:l,canDelete:c,showAddAnotherButton:u}=this.props,{loading:d,loadingModal:h,solverLoading:p,deleteModal:f,teachers:m,label:g,schoolGrades:v,errors:y,maxClassSize:b,currentCriteria:x,availableCriteria:w,advancedSettings:S,showAdvancedClassSettingsVideo:C,showVideo:j,maxClassSizeMode:_}=this.state,k=v.length>1,N=n.map((e=>({label:e.label,value:e.id,order:e.order,max:this.maxSizeForGrade(e)}))),E=r.map((e=>({label:Uh(e),value:e.id}))),T=this.context.gettextObj;return(0,pr.jsxs)(Yf,{isOpen:i,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:l,toggle:s,toggle2:this.openVideo,className:"px-4 py-3"}),d||e||t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-4",children:[(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsxs)(Qg,{children:[T.gettext("Class")," Label"]}),(0,pr.jsx)(Zg,{type:"text",name:"label",onChange:this.onChange,value:g,maxLength:10}),y.duplicateClassLabel&&(0,pr.jsx)($k,{text:y.duplicateClassLabel}),y.classLabelTooShort&&(0,pr.jsx)($k,{text:y.classLabelTooShort})]}),(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)(Qg,{children:"Assigned Teacher/s"}),(0,pr.jsx)(rv,{children:(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:"Select teachers",options:E,value:m,onChange:this.onMultiTeacherSelectChange,closeMenuOnSelect:!1,isMulti:!0,styles:fN}),y.schoolGrades&&(0,pr.jsx)($k,{text:y.schoolGrades})]})})]})]}),(0,pr.jsx)(Fg,{children:(0,pr.jsxs)(Gg,{className:"col col-6",children:[(0,pr.jsxs)("div",{style:{justifyContent:"space-between",display:"flex"},children:[(0,pr.jsxs)(Qg,{children:[T.gettext("New Grade"),"/s"]}),(0,pr.jsx)("i",{className:"fa fa-info-circle color-blue-mid m-2","data-tooltip-id":"optional-info"}),(0,pr.jsxs)(kf,{className:"c-badge-tooltip",id:"optional-info",variant:"light",opacity:1,children:[(0,pr.jsxs)("p",{children:["This drop-down list is automatically created off the students listed on the Students page (based on their"," ",T.gettext("New Grade"),").\xa0"]}),(0,pr.jsxs)("p",{children:["If you don\u2019t see the ",T.gettext("grade")," for students you are trying to place, then you may need to import these students.\xa0"]}),(0,pr.jsx)("p",{children:"To do this, go to Students, Import, then Bulk Import Students."})]})]}),(0,pr.jsx)(rv,{children:a?(0,pr.jsx)(Zg,{type:"text",value:this.getSchoolGradesLabel(v),disabled:!0}):(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:`Select ${T.gettext("grade(s)")}`,options:N,value:v,onChange:this.onMultiSelectChange,closeMenuOnSelect:!1,isMulti:!0,styles:fN}),y.schoolGrades&&(0,pr.jsx)($k,{text:y.schoolGrades})]})})]})}),(0,pr.jsx)(Fg,{children:(0,pr.jsx)("div",{className:"col-12 cursor-pointer mt-2 mb-4",onClick:this.toggleAdvancedSettings,children:S?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-minus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"Close Advanced Settings"})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-plus text-primary mr-2"}),(0,pr.jsx)("span",{className:"text-primary",children:"Open Advanced Settings"})]})})}),S&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Fg,{className:"ml-0 mb-1 font-size-14",children:["To learn more about Advanced ",T.gettext("Class")," ","Settings",(0,pr.jsxs)("a",{className:"d-block mb-3 color-blue-mid",onClick:this.toggleAdvancedClassSettingsVideo,children:[(0,pr.jsx)("i",{className:"fa fa-play ml-2 mr-1 color-blue-mid"}),"Watch Video"]})]}),(0,pr.jsx)(Fg,{className:"mb-1",children:(0,pr.jsxs)(Gg,{className:"col-12 sm-6",children:[(0,pr.jsxs)("div",{className:"d-flex flex-row justify-content-between align-items-center mb-3",children:[(0,pr.jsxs)(Qg,{className:"d-flex align-items-center mb-0",children:["Set a maximum ",T.gettext("class")," size (optional)"]}),k&&(0,pr.jsxs)(av,{children:[(0,pr.jsxs)(ld,{className:"btn-mid",active:_===dk,onClick:()=>this.setState({maxClassSizeMode:dk}),children:["By ",T.gettext("Class")]}),(0,pr.jsxs)(ld,{className:"btn-mid",active:_===hk,onClick:()=>this.setState({maxClassSizeMode:hk}),children:["By ",T.gettext("Grade")]})]})]}),_===dk&&(0,pr.jsxs)("div",{className:"col-6 d-flex justify-content-between align-items-center",children:[(0,pr.jsxs)(Qg,{className:"d-flex align-items-center mb-0",children:["Overall ",T.gettext("class")," maximum:"]}),(0,pr.jsx)(Zg,{className:"text-right",style:{width:"5em"},type:"number",name:"maxClassSize",onChange:this.onChange,value:b,min:0,max:999})]}),_===hk&&k&&v.map(((e,t)=>(0,pr.jsxs)("div",{className:"mb-1 col-6 d-flex justify-content-between",children:[(0,pr.jsxs)(Qg,{className:"d-flex align-items-center mb-0",children:[e.label," maximum:"]}),(0,pr.jsx)(Zg,{className:"text-right",style:{width:"5em"},type:"number",onChange:e=>{const n=this.state.schoolGrades,r=[...this.state.schoolGrades];r.splice(t,1,{...n[t],max:e.target.valueAsNumber}),this.setState({schoolGrades:r})},value:e.max||"",min:0,max:999})]},e.value))),y.label&&(0,pr.jsx)($k,{text:y.label})]})}),(0,pr.jsx)(uk,{currentCriteria:x,availableCriteria:w,onChange:e=>{this.setState({currentCriteria:e})}})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[c?(0,pr.jsxs)("span",{className:"text-primary col-3 cursor-pointer",onClick:this.toggleDeleteModal,children:["Delete ",T.gettext("Class")]}):(0,pr.jsx)("span",{}),(0,pr.jsxs)("div",{className:"col-9 d-flex justify-content-end align-items-center",children:[(0,pr.jsx)("span",{className:"text-primary px-4 cursor-pointer",onClick:s,children:"Cancel"}),(0,pr.jsxs)(ld,{className:"ml-2",onClick:()=>{this.onSaveClassClick(!1)},color:"primary",children:["Save ",T.gettext("Class")]}),u?(0,pr.jsxs)(ld,{className:"ml-2",onClick:()=>{this.onSaveClassClick(!0)},color:"primary",children:["Save & Add Another ",T.gettext("Class")]}):null]})]}),y.mutation&&(0,pr.jsx)($k,{text:y.mutation})]}),(0,pr.jsx)(Ck,{isOpen:f,toggle:this.toggleDeleteModal,loading:d,heading:`Delete ${T.gettext("Class")}?`,text:`If students have already been placed in this ${T.gettext("class")}, this will leave any students placed in this ${T.gettext("class")} without an assigned ${T.gettext("class")}. You will need to 're-run' the ${T.gettext("class")} lists on the Solver page to assign these students back into a ${T.gettext("class")}. This will result in entirely new ${T.gettext("class")} lists for the affected ${T.gettext("grade")}(s).`,onButtonClick:this.deleteClass,error:y.delete}),(0,pr.jsx)(zk,{isOpen:h,toggle:this.toggleLoadingModal,heading:"Running Solver, please wait...",loading:p,error:y.solver}),C&&(0,pr.jsx)(vN,{toggle:this.toggleAdvancedClassSettingsVideo,videoUrl:"https://player.vimeo.com/video/601490518?h=4bd107fb0e",title:"Advanced Class Settings"}),j&&(0,pr.jsx)(vN,{toggle:this.closeVideo,videoUrl:eC,title:"Advanced Class Settings"})]})}}pk.contextType=Cw;const fk=ng()(eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(rg,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,teachers:t}})=>({loadingOne:e,teachersData:t})}),eg(xg,{skip:e=>e.disableInput,options:()=>({variables:{schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{loading:e,activeNewSchoolGrades:t}})=>({loadingTwo:e,newSchoolGradesData:t})}),eg(Cg,{name:"createOrUpdateNewClass"}),eg(kg,{name:"deleteNewClassMutation"}),eg(V,{name:"solveActiveGradeMutation"}))(pk);const mk=n.p+"static/media/excel-icon.e0e8ddb41c3d66d0f9df822422686206.svg",gk={uploadFile:void 0,successModal:!1,warningModal:!1,warningCode:null,warningDetails:null,error:null,showStepVideo:!1,showStepVideo2:!1};class vk extends o.Component{constructor(...e){super(...e),this.state=gk,this.openStepVideo=()=>{this.setState({showStepVideo:!0})},this.openStepVideo2=()=>{this.setState({showStepVideo2:!0})},this.closeStepVideo=()=>{this.setState({showStepVideo:!1})},this.closeStepVideo2=()=>{this.setState({showStepVideo2:!1})},this.fileSelect=e=>{this.setState({uploadFile:e.target.files[0]})},this.fileUpload=()=>{const{fileUploadMutation:e}=this.props,{uploadFile:t}=this.state;this.setState({loading:!0});e({variables:{file:t,schoolId:uw()}}).then((e=>{e?this.setState({loading:!1,successModal:!0,uploadFile:void 0}):this.setState({loading:!1,successModal:!0})})).catch((e=>{this.setState({loading:!1,warningModal:!0,error:e.graphQLErrors&&e.graphQLErrors[0],warningCode:e.graphQLErrors.length>0?e.graphQLErrors[0].message:"generic",warningDetails:e.graphQLErrors.length?e.graphQLErrors[0].details:"",uploadFile:void 0})}))},this.toggle=e=>()=>{this.setState((t=>({[e]:!t[e]})))},this.reset=e=>()=>{this.setState({[e]:gk[e]})},this.hasKnownWarning=(e,t)=>su(e)&&su(t)&&t[e]}render(){const{type:e,file:t,title:n,step1:r,backText:o,knownWarnings:i,uploadsDisabled:s=!1,toggleBulkUploadScreen:a=(()=>{}),toggleTeacherModal:l,displayBulkUploadScreen:c,requiredHeaders:u,videoUrl:d,videoUrl2:h,videoDescriptionText:p,videoDescriptionText2:f,videoOpenText:m,videoOpenText2:g}=this.props,{loading:v,successModal:y,warningModal:b,uploadFile:x,warningCode:w,warningDetails:S,error:C}=this.state;if(v)return(0,pr.jsx)(pN,{type:e});let j;return j=x?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-100 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:x.name}),(0,pr.jsx)("div",{className:"btn btn-primary m-2",onClick:this.fileUpload,children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",hidden:!0,onChange:this.fileSelect}),(0,pr.jsx)(Qg,{for:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),c?(0,pr.jsx)(ld,{color:"link",onClick:a,children:o}):"Teachers"===e?(0,pr.jsxs)("span",{className:"m-2",children:["\xa0 Alternatively, you can also\xa0",(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:l,children:"Add Teachers Manually"})]}):null,(0,pr.jsxs)(gN,{className:"my-3",heading:"Important Tips",children:["Please ensure your file contains column headings.",(0,pr.jsx)("p",{className:"mt-2 mb-0 text-uppercase",style:{fonSize:"12px"},children:"Required Column Headers"}),(0,pr.jsx)("pre",{className:"mb-2",children:u.replaceAll(",",", ")}),"If you are using a Mac, please save the file format as CSV UTF-8 (.csv)"]})]})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2",children:r}),(0,pr.jsx)("a",{href:t,download:`${e}_template.csv`,children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary m-2",children:"Download Template"})}),(0,pr.jsx)("h2",{className:"m-2",children:"2. Then upload the completed file"}),s?(0,pr.jsx)(Qg,{className:"btn-200-width disabled",children:"Upload Completed File"}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",hidden:!0,onChange:this.fileSelect}),(0,pr.jsx)(Qg,{for:"fileUpload",className:"btn-200-width btn-secondary m-2",children:x?"Choose Another File":"Upload Completed File"})]}),c?(0,pr.jsx)(ld,{color:"link",onClick:a,children:o}):"Teachers"===e?(0,pr.jsxs)("span",{className:"m-2",children:["\xa0 Alternatively, you can also\xa0",(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:l,children:"Add Teachers Manually"})]}):null]}),(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:n}),(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:this.openStepVideo,children:[p,(0,pr.jsx)("i",{className:"fa fa-play mr-2 pl-2"}),m]}),(0,pr.jsx)("div",{}),g&&(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:this.openStepVideo2,children:[f,(0,pr.jsx)("i",{className:"fa fa-play mr-2 pl-2"}),g]})]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsxs)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:[(0,pr.jsxs)("div",{className:"flex-column text-center",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[j,this.props.children]}),(0,pr.jsx)(aN,{isOpen:y,toggle:ng()((()=>this.props.navigate(this.props.nextStep)),a,this.toggle("successModal")),heading:"Almost There!",buttonText:"Continue",text:""}),this.hasKnownWarning(w,i)?(0,pr.jsx)(Jj,{title:i[w].title,isOpen:b,type:e,jobId:C&&C.job_id,toggle:ng()(this.reset("warningDetails"),this.reset("warningCode"),this.toggle("warningModal")),children:i[w].body(e,S)}):(0,pr.jsxs)(Jj,{isOpen:b,type:e,toggle:this.toggle("warningModal"),children:["jobId=",C&&C.job_id,(0,pr.jsxs)("p",{children:["We\u2019re sorry, but something went wrong with your ",e," ","record upload.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),'Please click "Need help importing?" to let us know and we will upload the file for you.']})]})]}),this.state.showStepVideo&&(0,pr.jsx)(vN,{toggle:this.closeStepVideo,videoUrl:d,title:"Instruction Step 1"}),this.state.showStepVideo2&&(0,pr.jsx)(vN,{toggle:this.closeStepVideo2,videoUrl:h,title:"Instruction Step 2"})]})})})]})}}const yk=e=>{const t=vl();return(0,pr.jsx)(vk,{...e,navigate:t})},bk=function({show:e=!0,hide:t=!1,children:n}){return e&&!t?n:null},xk=({mandatory:e,pair:t,isMet:n})=>{const r=t?"P":"S";let o="c-badge__circle ";return n?(o+=e?"c-badge__is-met-mandatory":"c-badge__is-met-important",(0,pr.jsx)("div",{className:o,children:r})):(o+=e?"c-badge__mandatory":"c-badge__important",(0,pr.jsx)("div",{className:o,children:r}))},wk=e=>{const{options:t,mapTo:n,mappedColumns:r,onChange:i,onClear:s,optional:a,isDisabled:l=!1}=e,[c,u]=o.useState(r[n]||""),d=o.useCallback((e=>{u(e.target.value),i({selectedOption:e.target.value,mapTo:n})}),[n,i]),h=o.useCallback((()=>s(n)),[s,n]),p=o.useMemo((()=>r[n]||"empty"),[r,n]);return(0,pr.jsxs)("div",{className:"d-flex align-items-center",children:[(0,pr.jsx)(ld,{color:"link",onClick:h,disabled:"empty"===p,children:"Clear"}),(0,pr.jsxs)(Zg,{value:p,type:"select",onChange:d,disabled:l,children:[(0,pr.jsx)("option",{value:"empty",disabled:!0,children:"Select"},"empty"),t.map((e=>{const t=Object.keys(r).some((t=>r[t]===e));return t&&c!==e?null:(0,pr.jsx)("option",{value:e,children:e},e)}))]}),(0,pr.jsx)("div",{className:"pl-3 text-center",children:"empty"!==p?(0,pr.jsx)("i",{className:"fa fa-check text-success"}):(0,pr.jsx)("i",{className:"fa fa-warning text-danger "+(a?"invisible":"")})})]})},Sk=({currentSchoolGrades:e=[],onChange:t,value:n})=>(0,pr.jsxs)(rv,{className:"current-grade-input mr-5 pr-5 border-right",children:[(0,pr.jsx)(Qg,{className:"align-self-center mr-2 pt-2",children:"View by Current Grade"}),(0,pr.jsxs)(Zg,{type:"select",name:"currentGradeFilter",value:n,onChange:t,children:[e.map((e=>{const t=AC(e)?"New Students":e.label;return(0,pr.jsx)("option",{value:e.id,children:t},e.id)})),(0,pr.jsx)("option",{value:"all-grades",children:"All Grades"})]})]}),Ck=({isOpen:e,toggle:t,heading:n,text:r,error:o,loading:i,onButtonClick:s,buttonText:a="Yes, delete"})=>(0,pr.jsx)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:n,toggle:t}),i?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"text-primary mb-3",children:"CAUTION: "}),r]})]})}),(0,pr.jsx)(Ef,{className:"mt-5",buttonText:a,onButtonClick:s,onCancelClick:t}),(0,pr.jsx)($k,{text:o})]})]})}),jk=({closeModal:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",style:{width:"33em"},children:[(0,pr.jsx)(Kk,{title:"Maximum Pinned Times Reached",className:"px-4 pt-4",toggle:e}),(0,pr.jsx)("div",{className:"px-2 pb-2 d-flex justify-content-center",children:(0,pr.jsx)("div",{className:"px-1",children:(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-start mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:["You can only have a maximum of 5 pinned times.",(0,pr.jsx)("div",{className:"mt-3",children:"To save this version, please remove an existing pinned time by clicking on the blue pin."})]})]})}),(0,pr.jsx)("div",{className:"pt-4",children:(0,pr.jsx)(Ef,{onCancelClick:e,buttonText:"Ok, got it",onButtonClick:e})})]})})})]}),_k=({assignmentIdForUnFavouriting:e,unfavouriteAnAssignmentMutation:t,setAssignmentIdForSave:n,setDataForUpdatingFavourite:r,activeGradeId:i,closeModal:s})=>{const[a,l]=o.useState({});return(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",style:{width:"33em"},children:[(0,pr.jsx)(Kk,{title:"Remove Pinned Time",className:"px-4 pt-4",toggle:s}),(0,pr.jsx)("div",{className:"px-2 pb-2 d-flex justify-content-center",children:(0,pr.jsx)("div",{className:"px-1",children:(0,pr.jsxs)(Gg,{className:"col sm-6",children:[(0,pr.jsx)("div",{className:"d-flex flex-column align-items-start mt-2",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:["This will remove this pinned time from your list of saved times.",(0,pr.jsx)("div",{className:"mt-3",children:"Are you sure?"})]})]})}),(0,pr.jsx)("div",{className:"pt-4",children:(0,pr.jsx)(Ef,{onCancelClick:s,buttonText:"Yes, Remove",onButtonClick:()=>{t({variables:{assignmentId:e},refetchQueries:[{query:U,variables:{gradeId:i}}]}).then((()=>{s(),n(null),r(null)})).catch((()=>{l({mutation:"Unable to update pinned time"})}))}})}),(0,pr.jsx)($k,{text:a.mutation})]})})})]})},kk=({assignmentId:e,favouriteAnAssignment:t,toggle:n})=>{const[r,i]=(0,o.useState)({}),[s,a]=(0,o.useState)("");return(0,pr.jsx)(Ek,{toggle:n,notes:s,onChange:e=>{a(e.target.value)},onCancel:n,onSave:()=>{t(e,s).then((()=>{n()})).catch((()=>{i({mutation:"Unable to create pinned time"})}))},errors:r})},Nk=({assignmentId:e,updateFavourite:t,toggle:n,favouriteNotes:r})=>{const[i,s]=(0,o.useState)({}),[a,l]=(0,o.useState)(r||"");return(0,pr.jsx)(Ek,{toggle:n,notes:a,onChange:e=>{l(e.target.value)},onCancel:n,onSave:()=>{t(e,a).then((()=>{n()})).catch((()=>{s({mutation:"Unable to update pinned time"})}))},errors:i})},Ek=({toggle:e,notes:t,onChange:n,onCancel:r,onSave:o,errors:i})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-40rem",children:[(0,pr.jsx)(Kk,{title:"Enter Pinned Time",className:"px-4 py-3",toggle:e}),(0,pr.jsx)(Ig,{className:"px-4 d-flex justify-content-center",children:(0,pr.jsxs)(Gg,{className:"col",children:[(0,pr.jsx)(Qg,{children:"Pinned Time Label"}),(0,pr.jsx)(Zg,{type:"text",name:"notes",placeholder:"Enter Pinned Time Label",onChange:n,maxLength:40,value:t}),(0,pr.jsx)(Ef,{className:"pt-4",onCancelClick:r,buttonText:"Save",onButtonClick:o,disabled:""===t}),(0,pr.jsx)($k,{text:i.mutation})]})})]});var Tk=["className","cssModule","tag","flush","horizontal"],Ok={tag:Pu,flush:pu().bool,className:pu().string,cssModule:pu().object,horizontal:pu().oneOfType([pu().bool,pu().string])},Ik=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.flush,s=e.horizontal,a=lu(e,Tk),l=Eu(ju()(t,"list-group",i?"list-group-flush":function(e){return!1!==e&&(!0===e||"xs"===e?"list-group-horizontal":"list-group-horizontal-"+e)}(s)),n);return o.createElement(r,au({},a,{className:l}))};Ik.propTypes=Ok,Ik.defaultProps={tag:"ul",horizontal:!1};const Rk=Ik;var Ak=["className","cssModule","tag","active","disabled","action","color"],Mk={tag:Pu,active:pu().bool,disabled:pu().bool,color:pu().string,action:pu().bool,className:pu().any,cssModule:pu().object},Pk=function(e){e.preventDefault()},Dk=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=e.active,s=e.disabled,a=e.action,l=e.color,c=lu(e,Ak),u=Eu(ju()(t,!!i&&"active",!!s&&"disabled",!!a&&"list-group-item-action",!!l&&"list-group-item-"+l,"list-group-item"),n);return s&&(c.onClick=Pk),o.createElement(r,au({},c,{className:u}))};Dk.propTypes=Mk,Dk.defaultProps={tag:"li"};const Fk=Dk;class Lk extends o.Component{constructor(){super(),this.componentDidMount=()=>{this.getFilteredRecords(this.props)},this.UNSAFE_componentWillReceiveProps=e=>{JSON.stringify(this.props.studentsToExclude)===JSON.stringify(e.studentsToExclude)&&JSON.stringify(this.props.teachersToExclude)===JSON.stringify(e.teachersToExclude)||this.getFilteredRecords(e)},this.getFilteredRecords=e=>{const{students:t,studentsToExclude:n,teachers:r,teachersToExclude:o}=e,i=this.filterData(t,n),s=this.filterData(r,o),a=[];if(su(i)&&a.push(...i),su(s)){const e=Array.from(s);e.sort(GS),a.push(...e)}this.setState({tableData:a})},this._changeHandler=e=>{this.setState({[e.target.name]:e.target.value})},this._getRecords=()=>{this.setState({tableData:this.props.filteredData})},this._focusHandler=()=>{this.setState({focused:!0})},this._blurHandler=()=>{},this._updateSearch=e=>{this.setState({search:e.target.value.substr(0,20)})},this._changeHandelerParent=e=>{this.props.changeHandler&&this.props.changeHandler(e,this.props.index)},this._clickHandeler=e=>{this.setState({focused:!1}),this.props.selectFunction(e,this.props.index)},this.onClearClick=()=>{this.props.selectFunction(void 0,this.props.index),this.setState({focused:!1})},this.onKeyDown=(e,t)=>{13===e.keyCode&&su(t)&&(this.props.selectFunction(t,this.props.index),this.setState({focused:!1}),e.target.blur())},this.state={tableData:[],search:""}}filterData(e,t){if(su(e))return su(t)?e.filter((e=>!t.includes(e.id))):e}render(){let e=this.state.tableData.filter((e=>this.props.selectedValue?-1!==Object.values(e).join(" ").toLowerCase().indexOf(this.props.selectedValue.toLowerCase()):-1!==Object.values(e).join(" ").toLowerCase().indexOf(this.state.search.toLowerCase())));return(0,pr.jsxs)("div",{className:"c-filtered-list "+this.props.containerClass,children:[(0,pr.jsx)(Zg,{className:"c-filtered-list__input",autoComplete:"off",name:this.props.nameVal,onFocus:this._focusHandler,onBlur:this._blurHandler,id:"search",value:this.props.selectedValue,onChange:e=>this._changeHandelerParent(e),type:"text",placeholder:this.props.placeholder,disabled:this.props.disabled,onKeyDown:t=>{this.onKeyDown(t,e[0])}}),(0,pr.jsx)("i",{className:"fa fa-times color-grey-dark c-filtered-list__icon",onClick:this.onClearClick}),(0,pr.jsx)("span",{className:"c-filtered-list__list "+(this.state.focused?"":"d-none"),children:(0,pr.jsxs)(Rk,{className:"c-filtered-list__list__list-group",children:[Object.values(e).map(((e,t)=>{let n=e.currentClass?`${e.firstName} ${e.lastName} (${e.currentClass.label})`:`${e.firstName} ${e.lastName}`,r=this.props.selectedValue?this.props.selectedValue.toLowerCase():this.state.search.toString().toLowerCase(),o=n.slice(0,n.toLowerCase().indexOf(r)),i=r,s=n.slice(n.toLowerCase().indexOf(r)+r.length,n.length),a="";return o=o.charAt(0).toUpperCase()+o.slice(1),0===o.length&&(i=i.replace(/([^ \t]+)/g,(e=>e.charAt(0).toUpperCase()+e.slice(1)))),o.indexOf(" ")===o.length-1&&(i=i.charAt(0).toUpperCase()+i.slice(1)),a=-1!==n.toString().toLowerCase().indexOf(r)?(0,pr.jsx)(Fk,{className:"c-filtered-list__list__list-group__list-group-item",onClick:()=>{this._clickHandeler(e,this.props.index)},action:!0,children:(0,pr.jsxs)("span",{children:[(0,pr.jsx)("span",{children:o}),(0,pr.jsx)("strong",{children:i}),(0,pr.jsx)("span",{children:s})]})},t):"",a})),Object.values(e).length<1&&(0,pr.jsx)(Fk,{onClick:()=>{this._clickHandeler(void 0)},action:!0,children:(0,pr.jsx)("span",{children:"No Matches"})})]})})]})}}class Bk extends o.Component{constructor(e){super(e),this.setWrapperRef=e=>{this.wrapperRef=e},this.handleClickOutside=e=>{this.wrapperRef&&!this.wrapperRef.contains(e.target)&&this.setState((e=>({schoolGrades:e.schoolGrades.map((e=>({...e,active:!1})))})))},this.toggleActive=()=>{this.setState((e=>({schoolGrades:e.schoolGrades.map((e=>({...e,active:!1})))})))},this.onClick=e=>{this.setState((t=>({schoolGrades:t.schoolGrades.map(((t,n)=>({...t,active:e===n})))})))},this.onChange=(e,t)=>{const{schoolGrades:n}=this.state,r=Array.from(n),o={...r[e],[t.name]:t.value};r.splice(e,1,o),this.setState({schoolGrades:r})},this.deleteGrade=e=>{const{schoolGrades:t}=this.state,n=Array.from(t);n.splice(e,1),this.setState({schoolGrades:n})},this.changeOrder=(e,t)=>{const{schoolGrades:n}=this.state,r=Array.from(n),o="asc"===t?e-1:e+1,i=r[e];r[e]=r[o],r[o]=i,this.setState({schoolGrades:r})},this.addGrade=()=>{const{schoolGrades:e}=this.state,t=Array.from(e);t.push({code:"NEW",label:"New Grade"}),this.setState({schoolGrades:t})},this.saveGrades=()=>{const{schoolGradesMutation:e,fromSettings:t,toggle:n,onContinue:r}=this.props,{schoolGrades:o}=this.state;this.setState({loading:!0});const i=o.map(((e,t)=>({id:e.id,code:e.code||e.label,order:t+1,label:e.label})));[this.props.schoolGrades.find((e=>e.code===fC))||{code:fC,label:fC},this.props.schoolGrades.find((e=>e.code===mC))||{code:mC,label:mC}].forEach((e=>{i.push({id:e.id,code:e.code,order:i.length+1,label:e.label})}));e({variables:{schoolGradeParams:{schoolId:uw(),grades:i}},refetchQueries:[{query:yg,variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0}}]}).then((()=>{this.setState({loading:!1,errors:{}}),t?n():r()})).catch((e=>{this.setState({loading:!1,errors:{mutation:e.message.includes(iw)?sw:"Network Error"}})}))},this.hasDuplicateGradeCode=e=>{const t=e.map((e=>e.code));return new Set(t).size!==t.length},this.hasDuplicateGradeLabel=e=>{const t=e.map((e=>e.label));return new Set(t).size!==t.length};const t=this.props.schoolGrades?this.props.schoolGrades.filter((e=>!PC(e))):null;this.state={schoolGrades:t,loading:!1,errors:{}}}componentDidMount(){document.addEventListener("mousedown",this.handleClickOutside)}componentWillUnmount(){document.removeEventListener("mousedown",this.handleClickOutside)}render(){const{className:e="",fromSettings:t,toggle:n,cancel:r}=this.props,{loading:o,errors:i,schoolGrades:s}=this.state,a=this.hasDuplicateGradeCode(s),l=this.hasDuplicateGradeLabel(s);return o?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{className:`student-upload-list ${e}`,children:[(0,pr.jsx)("div",{className:"pb-5 u-content-border-bottom",children:(0,pr.jsxs)("div",{className:"container-fluid w-75",children:[(0,pr.jsxs)("div",{className:"c-note d-flex my-3",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsxs)("div",{children:["Please ensure that you:",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"1. Set the order of the grades from youngest to oldest by using the up/down arrows",(0,pr.jsx)("br",{}),"2. Include all grades at your school, even if you are not importing students for this grade",(0,pr.jsx)("br",{}),"3. Add the grade 'before' students join your school (e.g. you may need to have 'pre-Kinder' if you are K-6)"]})]}),(0,pr.jsxs)("div",{className:"student-upload-list__header row",children:[(0,pr.jsx)("div",{className:"student-upload-list__header__label col-3",children:"Order"}),(0,pr.jsx)("div",{className:"student-upload-list__header__label col-2",children:"Code"}),(0,pr.jsx)("div",{className:"student-upload-list__header__label col-3",children:"Label"})]}),(0,pr.jsx)("div",{ref:this.setWrapperRef,children:s.map(((e,t)=>(0,pr.jsx)(Gk,{index:t,length:s.length,onChange:this.onChange,changeOrder:this.changeOrder,deleteGrade:this.deleteGrade,onClick:this.onClick,toggleActive:this.toggleActive,...e},t)))}),(0,pr.jsx)(Lh,{className:"mt-3",text:"Add Another Grade",onClick:this.addGrade})]})}),(0,pr.jsx)(Ef,{className:"p-3",buttonText:t?"Save":"Save & Continue",cancelText:t?"":"Cancel Import",onButtonClick:this.saveGrades,onCancelClick:t?n:r,disabled:a||l}),(0,pr.jsx)($k,{text:(a?"Grade Code must be unique":l&&"Grade Label must be unique")||i.mutation})]})}}const Uk=eg(Sg,{name:"schoolGradesMutation"})(Bk);class Gk extends o.Component{constructor(...e){super(...e),this.onChange=e=>{const{onChange:t,index:n}=this.props;t(n,e.target)},this.deleteGrade=()=>{const{deleteGrade:e,index:t}=this.props;e(t)},this.increaseOrder=()=>{const{changeOrder:e,index:t}=this.props;e(t,"asc")},this.decreaseOrder=()=>{const{changeOrder:e,index:t}=this.props;e(t,"desc")},this.edit=()=>{const{index:e,onClick:t}=this.props;t(e)}}render(){const{index:e,length:t,label:n,code:r,active:i,toggleActive:s}=this.props;return(0,pr.jsxs)("div",{className:"student-upload-list__item row border-bottom py-3",children:[(0,pr.jsxs)("div",{className:"col-3 d-flex align-items-center",children:[(0,pr.jsx)("div",{className:"student-upload-list__item__order mr-2",children:e}),e<t-1?(0,pr.jsx)("i",{className:"student-upload-list__item__icon fa fa-arrow-down mr-2",onClick:this.decreaseOrder}):null,e>0?(0,pr.jsx)("i",{className:"student-upload-list__item__icon fa fa-arrow-up",onClick:this.increaseOrder}):null]}),(0,pr.jsx)("div",{className:"student-upload-list__item__label col-2",children:i?(0,pr.jsx)(Zg,{type:"text",name:"code",value:r,onChange:this.onChange}):r}),(0,pr.jsx)("div",{className:"student-upload-list__item__label col-6",children:i?(0,pr.jsx)(Zg,{type:"text",name:"label",value:n,onChange:this.onChange,autoFocus:!0}):(0,pr.jsxs)(o.Fragment,{children:[n,(0,pr.jsx)("i",{className:"student-upload-list__item__label__pencil fa fa-pencil ml-2",onClick:this.edit})]})}),(0,pr.jsx)("div",{className:"col-1 d-flex align-items-center",children:i?(0,pr.jsx)("i",{className:"fa fa-check-square-o student-upload-list__item__icon--check-square",onClick:s}):(0,pr.jsx)("i",{className:"fa fa-times student-upload-list__item__icon student-upload-list__item__icon--times",onClick:this.deleteGrade})})]})}}const $k=({text:e,className:t})=>(0,pr.jsx)("span",{className:`text-danger ${t}`,children:e}),qk=({className:e=""})=>(0,pr.jsx)("div",{className:`loader-container ${e}`,children:(0,pr.jsxs)("svg",{className:"loader",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 340 340",children:[(0,pr.jsx)("circle",{cx:"170",cy:"170",r:"160",stroke:"#fbd90b"}),(0,pr.jsx)("circle",{cx:"170",cy:"170",r:"135",stroke:"#fca613"}),(0,pr.jsx)("circle",{cx:"170",cy:"170",r:"110",stroke:"#e7181c"}),(0,pr.jsx)("circle",{cx:"170",cy:"170",r:"85",stroke:"#3b2584"}),(0,pr.jsx)("circle",{cx:"170",cy:"170",r:"60",stroke:"#1d2ed2"})]})}),zk=({isOpen:e,toggle:t,loading:n,heading:r,error:o,text:i})=>(0,pr.jsx)(Yf,{isOpen:e,toggle:n?void 0:t,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)("h1",{children:r}),(0,pr.jsx)("span",{className:"mt-3",children:i}),n?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)("div",{className:"mt-4",children:(0,pr.jsx)($k,{text:o})})]})}),Vk=e=>{const{importType:t,handleToggleHelpModal:n,showHelpModal:r,uploadJob:o,requiredColumns:i,optionalColumns:s,mappedColumns:a,options:l,handleColumnMapped:c,handleColumnClear:u,isMappingComplete:d,isUpdatingJob:h,isImportingJob:p,handleContinue:f,handleCancel:m,uploadError:g,errorType:v,setUploadError:y,knownWarnings:b,defaultWarning:x,errorModalActions:w}=e;return(0,pr.jsxs)("div",{className:"container",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Map Your Column Headings"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:n,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:r,toggle:n,jobId:o.id,onSentNotification:n,type:t})]}),(0,pr.jsx)("div",{className:"pt-3 pb-4",children:"Please map the required fields to the columns found in your file:"}),(0,pr.jsx)(Hk,{requiredColumns:i,optionalColumns:s,mappedColumns:a,options:l,handleColumnMapped:c,handleColumnClear:u,firstHeading:"Fields for Class Solver",optional:!1}),(0,pr.jsx)("div",{className:"u-content-border-bottom",children:"\xa0"}),(0,pr.jsx)(Ef,{buttonText:"Save & Continue",cancelText:"Cancel Import",className:"p-3",disabled:!d||h||p,onButtonClick:f,onCancelClick:m}),g&&(0,pr.jsx)(Jj,{isOpen:!0,title:(b[g.message]||x).title,type:v,jobId:o&&o.id,toggle:()=>y(),actions:w,children:(b[g.message]||x).body(g)})]})},Hk=e=>{const{requiredColumns:t=[],optionalColumns:n=[],mappedColumns:r,options:o,handleColumnMapped:i,handleColumnClear:s,firstHeading:a,firstHeadingTooltipText:l}=e;return(0,pr.jsxs)("div",{className:"container",children:[(0,pr.jsxs)("div",{className:"row pb-2 mb-3 u-content-border-bottom",children:[(0,pr.jsxs)("div",{className:"col-lg font-weight-bold",children:[a,l&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{style:{color:"#00000080"},className:"fa fa-info-circle ml-2","data-tooltip-id":l}),(0,pr.jsx)(kf,{id:l,opacity:1,variant:"light",border:"1px solid #dce1e8",children:l})]})]}),(0,pr.jsx)("div",{className:"col-sm font-weight-bold",children:"Columns in your file"})]}),(0,pr.jsx)(Wk,{columns:t,mappedColumns:r,handleColumnMapped:i,handleColumnClear:s,options:o,optional:!1}),(0,pr.jsx)(Wk,{columns:n,mappedColumns:r,handleColumnMapped:i,handleColumnClear:s,options:o,optional:!0})]})},Wk=e=>{const{columns:t,mappedColumns:n,handleColumnMapped:r,handleColumnClear:o,options:i,optional:s}=e;return Object.keys(t).map((e=>{const a=t[e];return(0,pr.jsx)(Qk,{column:e,columnData:a,mappedColumns:n,options:i,handleColumnMapped:r,handleColumnClear:o,optional:s},e)}))},Yk="EMPTY",Qk=e=>{const{column:t,columnData:n,options:r,mappedColumns:o,handleColumnMapped:i,handleColumnClear:s,optional:a}=e,l="object"===typeof n?n.label:n,c="object"===typeof n?n.tooltip:null,u="object"===typeof n&&n.selectableRowItems,d=u?n.selectableRowItems:null,h=u?n.selectedId:null,p=u?n.handleChange:null,f=u?n.placeholderText:"",m=u?n.isSelectableRowItemsLoading:null,g=a?" (optional)":"";return(0,pr.jsxs)("div",{className:"row py-2",children:[(0,pr.jsx)("div",{className:"col-lg",children:d?(0,pr.jsxs)(Zg,{type:"select",value:h,onChange:p,children:[d.map((e=>(0,pr.jsx)("option",{value:e.id,children:e.name},e.id))),(0,pr.jsx)("option",{value:Yk,hidden:!0,children:f},Yk)]}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{children:`${l}${g}`}),!a&&(0,pr.jsx)("span",{className:"pl-1 font-weight-bold text-danger",children:"*"}),c&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{style:{color:"#00000080"},className:"fa fa-info-circle pl-2","data-tooltip-id":t}),(0,pr.jsx)(kf,{id:t,opacity:1,variant:"light",border:"1px solid #dce1e8",children:c})]})]})}),(0,pr.jsx)("div",{className:"col-sm",children:(0,pr.jsx)(wk,{mapTo:t,mappedColumns:o,options:r,onChange:i,onClear:s,optional:a,isDisabled:m})})]},t)},Jk=({toggle2:e})=>e?(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:e,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Watch Video"]}):null,Kk=({title:e,toggle:t,toggle2:n,className:r})=>(0,pr.jsx)("div",{className:"container-fluid u-modal__header",children:(0,pr.jsxs)("div",{className:`row  ${r}`,children:[(0,pr.jsxs)("div",{style:{display:"flex",flexWrap:"flex-wrap"},className:"mr-a mb-0",children:[(0,pr.jsx)("h6",{style:{maxWidth:"500px",wordWrap:"break-word"},className:"max-w-xs",children:e}),(0,pr.jsx)(Jk,{toggle2:n})]}),t&&(0,pr.jsx)("i",{className:"fa fa-times u-modal__close-icon",onClick:t})]})}),Xk=({text:e,className:t=""})=>(0,pr.jsxs)("div",{className:`c-modal-note d-flex ${t}`,children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("div",{children:e})]}),Zk=({text:e,className:t=""})=>(0,pr.jsx)("div",{className:`c-modal-note c-modal-note--success d-flex ${t}`,children:(0,pr.jsx)("div",{children:e})});class eN extends o.Component{componentDidMount(){aw(this.props.error)}render(){const{message:e="Oops, something went wrong.",refetch:t,error:n}=this.props;return(0,pr.jsxs)("div",{className:"c-query-error",children:[(0,pr.jsx)("h2",{className:"mt-2",children:e}),(0,pr.jsx)("br",{}),(0,pr.jsxs)("div",{className:"justify-content-center",children:["Please try: ",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"1. Closing and re-opening your browser",(0,pr.jsx)("br",{}),"2. Accessing our website from a different device",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If the issue is still not resolve, please contact your school's IT Department and make sure that your network is allowed to access api.classsolver.com. They may need to adjust their network whitelist to allow this.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If you need any further assistance, please contact us at"," ",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"}),(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),(0,pr.jsx)($k,{text:n.message})]}),(0,pr.jsx)(ld,{color:"primary",className:"p-1 u-text-12",onClick:()=>t(),children:"Retry"})]})}}const tN={container:{position:"relative"},stepCounter:{position:"absolute",top:0,left:0,backgroundColor:"#d8d8d8",borderRadius:"100%",padding:"4px 12px 5px"},transition1:{backgroundColor:"pink"},transition2:{transition:"all 0.5s ease-in-out !important"}};class nN extends o.PureComponent{constructor(e){super(e),this.state={numberOfStudentsOnBlur:!0,positionTitleOnBlur:!0}}renderCountryOptions(e){if(void 0!==e){const t=e.map(((e,t)=>(0,pr.jsx)("option",{value:e.code,children:e.name},t+1)));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("option",{disabled:!0,value:"",children:"-- Please select a country --"},0),t]})}}renderStateInput(e,t,n){const r=e.find((e=>e.code===t)),o=ou(r,"states");if(o&&o.length>0){const e=o.map(((e,t)=>(0,pr.jsx)("option",{value:e.code,children:e.name},t)));return(0,pr.jsxs)(Zg,{type:"select",value:n,onChange:this.props.onChange,name:"stateCode",id:"stateCode",placeholder:"State Code",children:[(0,pr.jsx)("option",{value:"",children:"Select State"},""),e]})}return(0,pr.jsx)(Zg,{type:"text",value:n,onChange:this.props.onChange,name:"stateCode",id:"stateCode",placeholder:"State"})}renderAccountTypeInput(e){const t=["CLASS","CAMP","ACTIVITY_GROUP"].map(((e,t)=>{const n=e.toLowerCase();return(0,pr.jsx)("option",{value:e,children:n},t)}));return(0,pr.jsxs)(Zg,{type:"select",value:e,onChange:this.props.onChange,name:"accountType",id:"accountType",placeholder:"Account Type",children:[(0,pr.jsx)("option",{value:"",children:"Select Account Type"},""),t]})}render(){const{numberOfStudentsOnBlur:e,positionTitleOnBlur:t}=this.state,{onChange:n,data:r,errors:i,edit:s,client:a,isSuper:l,availableManagers:c,onManagerChange:u}=this.props,{schoolName:d,addressLine1:h,suburb:p,countryCode:f,stateCode:m,postcode:g,contactFirstName:v,contactLastName:y,contactNumber:b,contactPositionTitle:x,contactEmail:w,numberOfStudents:S,crmAccountName:C,crmStatus:j,accountType:k,accountName:N,referrer:E,managers:T}=r,O=()=>{this.setState({numberOfStudentsOnBlur:!e})},I=()=>{this.setState({positionTitleOnBlur:!t})},R=(e,t)=>{const n=parseInt(e,10);return!isNaN(n)&&String(n)===String(e)&&n<t},A=(e,t)=>{if(!e)return!1;return e.toLowerCase().trim()===t.trim()};let M=null;return((e,t)=>{if(!e)return!1;return e.toLowerCase().includes(t)})(x,"teacher")?M="If you are a teacher at a school, please check with administration that you don\u2019t already have an account before creating a new account.":(A(x,"parent")||A(x,"student"))&&(M="This system is for authorized school staff only. Parents and students, please contact your school directly for any questions or information. Thanks for your understanding!"),(0,pr.jsx)("div",{children:(0,pr.jsx)(Vm,{query:_,client:a,children:({loading:r,error:a,data:_,refetch:A})=>{if(r)return(0,pr.jsx)(qk,{});if(a)return(0,pr.jsx)(eN,{error:a,refetch:A});const{countries:P}=_;return(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fg,{className:"d-flex align-items-center justify-content-between pb-4 pt-0",children:(0,pr.jsx)("div",{className:"w-100",style:tN.container,children:(0,pr.jsx)("div",{className:s?"":"pl-5",children:(0,pr.jsxs)(nS,{children:[!s&&(0,pr.jsx)("h1",{className:"mb-4",children:"Your school details"}),(0,pr.jsxs)(b_,{children:[(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"schoolName",children:"School name"}),(0,pr.jsx)(Zg,{type:"text",value:d||"",onChange:n,name:"schoolName",id:"schoolName",placeholder:"School name"}),i.schoolName&&(0,pr.jsx)($k,{text:i.schoolName})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{for:"countryCode",children:"Country"}),(0,pr.jsx)(Zg,{type:"select",value:f||"",onChange:n,name:"countryCode",id:"countryCode",children:this.renderCountryOptions(P)}),i.countryCode&&(0,pr.jsx)($k,{text:i.countryCode})]}),s?(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{htmlFor:"addressLine1",children:"School address"}),(0,pr.jsx)(Zg,{value:h||"",onChange:n,type:"text",name:"addressLine1",id:"addressLine1",placeholder:"Address"}),i.addressLine1&&(0,pr.jsx)($k,{text:i.addressLine1}),(0,pr.jsx)(Zg,{className:"mt-4",value:p||"",onChange:n,type:"text",name:"suburb",id:"suburb",placeholder:"Suburb"}),i.suburb&&(0,pr.jsx)($k,{text:i.suburb}),(0,pr.jsxs)(Fg,{className:"mt-4",children:[(0,pr.jsxs)(nS,{sm:"6",className:"pr-0",children:[this.renderStateInput(P,f,m),i.stateCode&&(0,pr.jsx)($k,{text:i.stateCode})]}),(0,pr.jsxs)(nS,{sm:"6",children:[(0,pr.jsx)(Zg,{type:"text",value:g||"",onChange:n,name:"postcode",id:"postcode",placeholder:"ZIP code",maxLength:10}),i.postcode&&(0,pr.jsx)($k,{text:i.postcode})]})]})]}):(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{for:"suburb",children:"Suburb/City"}),(0,pr.jsx)(Zg,{value:p||"",onChange:n,type:"text",name:"suburb",id:"suburb",placeholder:"Suburb"}),i.suburb&&(0,pr.jsx)($k,{text:i.suburb})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{htmlFor:"state",children:"State"}),this.renderStateInput(P,f,m),i.stateCode&&(0,pr.jsx)($k,{text:i.stateCode})]})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"contactNumber",children:"Contact number"}),(0,pr.jsx)(Zg,{type:"text",value:b||"",onChange:n,name:"contactNumber",id:"contactNumber",placeholder:"Contact number"}),i.contactNumber&&(0,pr.jsx)($k,{text:i.contactNumber})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"numberOfStudents",children:"Number of students (to be placed into classes)"}),(0,pr.jsx)(Zg,{type:"number",value:S||"",onFocus:O,onBlur:O,onChange:n,name:"numberOfStudents",id:"numberOfStudents",placeholder:"# Total Students"}),R(S,51)&&e&&(0,pr.jsx)($k,{text:"It looks like you are only signing up for one or two classes.\xa0 Please check that you don\u2019t already have an account before creating a new account."}),i.numberOfStudents&&(0,pr.jsx)($k,{text:i.numberOfStudents})]}),l&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"crmAccountName",children:"CRM Account Name"}),(0,pr.jsx)(Zg,{type:"text",value:C||"",onChange:n,name:"crmAccountName",id:"crmAccountName"})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"crmStatus",children:"CRM Status"}),(0,pr.jsx)(Zg,{type:"text",value:j||"",onChange:n,name:"crmStatus",id:"crmStatus"})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"managers",children:"Managers"}),(0,pr.jsx)(Xx,{id:"managers",className:"c-input__multiselect",placeholder:"Select managers",options:c,value:T,onChange:u,closeMenuOnSelect:!1,isMulti:!0,styles:fN})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"accountType",children:"Account Type"}),this.renderAccountTypeInput(k)]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"accountName",children:"Account Name"}),(0,pr.jsx)(Zg,{type:"text",value:N||"",onChange:n,name:"accountName",id:"accountName"})]})]})]})]})})})}),!s&&(0,pr.jsx)(Fg,{className:"d-flex align-items-center justify-content-between pb-4 pt-0",children:(0,pr.jsx)("div",{className:"w-100",style:tN.container,children:(0,pr.jsx)("div",{className:"pl-5",children:(0,pr.jsxs)(nS,{children:[(0,pr.jsx)("h1",{className:"mb-4",children:"Your contact details"}),(0,pr.jsxs)(b_,{children:[(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"contactFirstName",children:"Contact name"}),(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(nS,{md:{size:6},className:"pr-0",children:[(0,pr.jsx)(Zg,{type:"text",value:v||"",onChange:n,name:"contactFirstName",id:"contactFirstName",placeholder:"First name"}),i.contactFirstName&&(0,pr.jsx)($k,{text:i.contactFirstName})]}),(0,pr.jsxs)(nS,{md:{size:6},children:[(0,pr.jsx)(Zg,{type:"text",value:y||"",onChange:n,name:"contactLastName",id:"contactLastName",placeholder:"Last name"}),i.contactLastName&&(0,pr.jsx)($k,{text:i.contactLastName})]})]})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{htmlFor:"contactPositionTitle",children:"Position Title"}),(0,pr.jsx)(Zg,{type:"text",value:x||"",onChange:n,onFocus:I,onBlur:I,name:"contactPositionTitle",id:"contactPositionTitle",placeholder:"Position Title"}),t&&M&&(0,pr.jsx)($k,{text:M}),i.contactPositionTitle&&(0,pr.jsx)($k,{text:i.contactPositionTitle})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"contactEmail",children:"Email address"}),(0,pr.jsx)(Zg,{type:"email",value:w||"",onChange:n,name:"contactEmail",id:"contactEmail",placeholder:"Email address"}),i.contactEmail&&(0,pr.jsx)($k,{text:i.contactEmail})]}),(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)(Qg,{htmlFor:"referrer",children:"Subscription Code or name of referring school (optional)"}),(0,pr.jsx)(Zg,{type:"text",value:E||"",onChange:n,name:"referrer",id:"referrer",placeholder:"Subscription Code or name of school already using Class Solver"}),i.referrer&&(0,pr.jsx)($k,{text:i.referrer})]})]})]})})})})]})}})})}}class rN extends o.Component{constructor(...e){super(...e),this.state={search:""},this.onChange=e=>{this.setState({...this.state,[e.target.name]:e.target.value})}}render(){const{isOpen:e,toggle:t,onSchoolClick:n,loading:r,schools:o,isSuper:i}=this.props,{search:s}=this.state;let a=[];return o&&(a=Array.from(o),aC(s)&&(a=a.filter((e=>[e.id,e.name,e.stateCode,e.suburb,e.crm_account_name].join(" ").toLowerCase().includes(s.toLowerCase())))),a.sort(((e,t)=>e.id-t.id))),(0,pr.jsx)(Yf,{isOpen:e,children:r?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Kk,{title:"School Clients",toggle:t,className:"p-3"}),(0,pr.jsx)("div",{className:"modal-body",children:(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)(Fg,{className:"mt-2 mb-4",children:[(0,pr.jsx)(Qg,{children:"Search"}),(0,pr.jsx)(Zg,{placeholder:"Search Schools",type:"text",name:"search",value:s,onChange:this.onChange})]}),(0,pr.jsxs)(Fg,{children:[(0,pr.jsx)(nS,{className:"title-border-underline",children:(0,pr.jsx)("strong",{className:"pb-1 pl-3",children:"School Name"})}),i&&(0,pr.jsx)(nS,{className:"title-border-underline",children:(0,pr.jsx)("strong",{className:"pb-1 pl-3",children:"CRM_Name"})})]}),a.map(((e,t)=>{const{id:r,stateCode:o,suburb:s,name:a,crm_account_name:l}=e;return(0,pr.jsx)("a",{onClick:()=>{n(r,a)},children:(0,pr.jsxs)(Fg,{className:"school-border-underline",children:[(0,pr.jsx)(nS,{children:(0,pr.jsxs)("div",{className:"py-2 pl-3 u-white-space-pre-wrap",children:[r," - ",o,", ",s," - ",a]})}),(0,pr.jsx)(nS,{children:i&&(0,pr.jsx)("div",{className:"py-2 pl-3 u-white-space-pre-wrap",children:l})})]})},t)}))]})})]})})}}const oN=ng()(eg(Ue,{options:()=>({fetchPolicy:"network-only"}),props:({data:{loading:e,schools:t}})=>({loading:e,schools:t})}))(rN),iN=({placeholder:e,onChange:t,value:n})=>(0,pr.jsxs)("div",{className:"c-search-input d-print-none",children:[(0,pr.jsx)(Zg,{className:"c-search-input__input",type:"text",placeholder:e,value:n,onChange:t}),(0,pr.jsx)("span",{className:"c-search-input__icon",children:aC(n)?(0,pr.jsx)("i",{className:"fa fa-times color-grey-dark cursor-pointer",onClick:()=>t(void 0)}):(0,pr.jsx)("i",{className:"fa fa-search color-grey-mid"})})]}),sN=({onChange:e,value:t,options:n})=>(0,pr.jsxs)(rv,{className:"current-grade-input mr-5 pr-5 border-right",children:[(0,pr.jsx)(Qg,{className:"align-self-center mr-2 pt-2",children:"Filter:"}),(0,pr.jsx)(Zg,{type:"select",name:"studentFilter",value:t,onChange:e,children:n.map((e=>(0,pr.jsx)("option",{value:e.id,children:e.label},e.id)))})]}),aN=({isOpen:e,toggle:t,heading:n,text:r,buttonText:o="Dismiss"})=>(0,pr.jsx)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-between align-items-center p-5",children:[(0,pr.jsx)("div",{className:"c-success-modal__icon-container",children:(0,pr.jsx)("i",{className:"fa fa-check"})}),(0,pr.jsx)("h1",{className:"mt-3",children:n}),(0,pr.jsx)("span",{className:"mt-3 text-center",children:r}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5",onClick:t,children:o})]})});class lN extends o.Component{constructor(e){super(e),this.toggleDeleteModal=()=>{this.setState({deleteModal:!this.state.deleteModal})},this.toggleCautionModal=()=>{this.setState({cautionModal:!this.state.cautionModal})},this.onChange=e=>{const t="checkbox"===e.target.type?e.target.checked:e.target.value;this.setState({adminData:{...this.state.adminData,[e.target.name]:t}})},this.addUniqueItem=(e,t)=>[...new Set(e.concat([t]))],this.saveAdmin=()=>{const{adminData:e}=this.state,t=this.validateAdmin(e);this.setState({errors:t}),0===Object.keys(t).length&&this.addOrEditAdmin()},this.addOrEditAdmin=()=>{const{toggle:e,createOrUpdateUserMutation:t,refetchQueries:n,roleType:r}=this.props,{adminData:{id:o,firstName:i,lastName:s,positionTitle:a,email:l,mfa:c}}=this.state;t({variables:{user:{id:o,role:r,firstName:i,lastName:s,positionTitle:a,email:l,mfa:c}},refetchQueries:n}).then((()=>{this.setState({loading:!1}),e()})).catch((()=>{this.setState({loading:!1,errors:{mutation:"Could not update User. Please ensure email is unique and try again."}})}))},this.deleteSuperAdmin=()=>{const{deleteUserMutation:e,refetchQueries:t,toggle:n,adminData:{id:r,role:o}}=this.props;this.setState({deleteLoading:!0});e({variables:{id:r,role:o},refetchQueries:t}).then((()=>{this.setState({deleteLoading:!1,deleteModal:!1}),n()})).catch((()=>{this.setState({deleteLoading:!1,errors:{delete:"Could not delete admin"}})}))},this.state={loading:!1,deleteLoading:!1,deleteModal:!1,cautionModal:!1,adminData:this.props.adminData,errors:{}}}validateAdmin(e){const{firstName:t,lastName:n,email:r}=e;let o={};return aC(t)||(o.firstName="Required"),aC(n)||(o.lastName="Required"),lC(r)||(o.email="Invalid Email"),o}render(){const{toggle:e,addAdmin:t,canDelete:n}=this.props,{loading:r,deleteModal:o,deleteLoading:i,errors:s,adminData:{firstName:a,lastName:l,email:c,positionTitle:u,mfa:d}}=this.state;return(0,pr.jsxs)(Yf,{isOpen:!0,children:[(0,pr.jsx)(Kk,{title:t?"Add Admin":"Edit Admin",toggle:e,className:"u-p-fix p-4"}),r?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsx)(Ig,{className:"p-4",children:(0,pr.jsx)(b_,{autoComplete:"off",children:(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)("div",{className:"row mt-3",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"First name"}),(0,pr.jsx)(Zg,{type:"text",name:"firstName",placeholder:"First name",autoComplete:"off",value:a,onChange:this.onChange}),(0,pr.jsx)($k,{text:s.firstName})]}),(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Last name"}),(0,pr.jsx)(Zg,{type:"text",name:"lastName",placeholder:"Last name",autoComplete:"off",value:l,onChange:this.onChange}),(0,pr.jsx)($k,{text:s.lastName})]})]}),(0,pr.jsx)("div",{className:"row",children:(0,pr.jsxs)(Gg,{className:"col-12",children:[(0,pr.jsx)(Qg,{children:"Position Title"}),(0,pr.jsx)(Zg,{type:"text",name:"positionTitle",placeholder:"Position Title",autoComplete:"off",value:u||"",onChange:this.onChange})]})}),(0,pr.jsx)("div",{className:"row",children:(0,pr.jsxs)(Gg,{className:"col-12",children:[(0,pr.jsx)(Qg,{children:"Email address"}),(0,pr.jsx)(Zg,{disabled:!t,type:"text",name:"email",placeholder:"Email address",autoComplete:"off",value:c,onChange:this.onChange}),(0,pr.jsx)($k,{text:s.email})]})}),(0,pr.jsx)("div",{className:"row",children:(0,pr.jsx)(Gg,{className:"col-12 mb-0",children:(0,pr.jsxs)(Qg,{className:"ml-4",children:[(0,pr.jsx)(Zg,{type:"checkbox",name:"mfa",id:"mfa",checked:d,onChange:this.onChange}),"Require Multi-Factor Authentication (MFA)"]})})}),t?(0,pr.jsx)(Ef,{className:"mt-5 mb-3",buttonText:"Add Admin",onButtonClick:this.saveAdmin,onCancelClick:e}):(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-5 mb-3",children:[n?(0,pr.jsx)("div",{children:(0,pr.jsx)("span",{className:"py-2 pr-3 mr-2 text-primary cursor-pointer",onClick:this.toggleDeleteModal,children:"Delete"})}):(0,pr.jsx)("span",{}),(0,pr.jsx)(Ef,{buttonText:"Save",onButtonClick:this.saveAdmin,onCancelClick:e})]}),(0,pr.jsx)($k,{text:s.mutation})]})})}),o&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:this.toggleDeleteModal,error:s.delete,loading:i,heading:"Delete Admin?",text:"Are you sure you want to delete this admin?",onButtonClick:this.deleteSuperAdmin})]})}}const cN=ng()(eg(Ve,{name:"createOrUpdateUserMutation"}),eg(T,{name:"deleteUserMutation"}))(lN);class uN extends o.Component{renderHeaderSection(e){const{sections:t,headers:n,tableAction:r}=this.props,o=n.slice();o.unshift({name:"",id:"rowCount",section:n[0].section});const i=o.filter(((e,t,n)=>n.findIndex((t=>t.section===e.section))===t));return(0,pr.jsx)(QC.Row,{id:"row-id",className:`${e}-section`,children:o.map(((e,o)=>{const s=i.some((t=>t.id===e.id));let a;return a=s?t[e.section].name:o===n.length&&r?r:e.sectionTitleContent?e.sectionTitleContent:(0,pr.jsx)("span",{children:"\xa0"}),(0,pr.jsxs)(QC.Cell,{className:`cell ${e.section} ${s&&"first"}`,children:[(0,pr.jsx)("div",{className:"sectionTitle",children:a}),(0,pr.jsx)("div",{className:`headerName ${e.id}`,children:e.name})]},o)}))})}renderData(e){const{headers:t,data:n,rowCount:r,rowClick:o}=this.props;return n.map(((n,i)=>{const s=o?()=>o(n):void 0,a=s?e+"row u-data-row":e+"row";return(0,pr.jsxs)(QC.Row,{onClick:s,className:`${a} ${n.rowClassName}`,children:[r&&(0,pr.jsx)(QC.Cell,{className:e+"cell "+e+"count u-table-edit-icon text-center",children:i+1}),t.map(((t,r)=>{const o=n.highlighted&&n.highlighted[t.id];return(0,pr.jsx)(QC.Cell,{className:e+"cell "+t.dataClass+(o?" highlighted":""),children:n[t.id]},r)}))]},i)}))}render(){const{tableName:e,tableStyle:t,...n}=this.props;return(0,pr.jsxs)(QC.StickyTable,{style:t,...n,children:[this.renderHeaderSection(e),this.renderData(e+"-data-")]})}}class dN extends o.Component{constructor(e){super(e),this.onChange=e=>{const{verifyText:t}=this.props,n=e.target.value,r=n.trim(),{valid:o,hint:i}=t(r);this.setState({data:{...this.state.data,[e.target.name]:n},errors:{text:o?"":i}})},this.onButtonClick=()=>{const{data:{text:e,textArea:t}}=this.state,{verifyText:n,onSubmit:r}=this.props,{valid:o}=n(e),i=e.trim(),s=t.trim();o&&r(i,s)},this.state={data:{text:"",textArea:""},errors:{}}}render(){const{isOpen:e,toggle:t,modalTitle:n,textInputLabel:r,textAreaLabel:i,submitButtonText:s,withTextArea:a,loading:l,error:c}=this.props,{data:u,errors:d}=this.state;return(0,pr.jsxs)(Yf,{isOpen:e,className:"u-modal__w-30rem modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:n,toggle:t,className:"p-4"}),(0,pr.jsx)(Ig,{className:"p-4",children:l?(0,pr.jsx)("div",{className:"p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Qg,{children:r}),(0,pr.jsx)(Zg,{type:"text",className:"input-sm",name:"text",value:u.text,onFocus:e=>e.target.select(),onChange:this.onChange}),(0,pr.jsx)($k,{text:d.text,className:"d-block"}),(0,pr.jsx)(bk,{show:a,children:(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Qg,{className:"mt-3",children:i}),(0,pr.jsx)(Zg,{type:"textarea",className:"input-sm",name:"textArea",id:"textArea",placeholder:"Add description...",value:u.textArea,onChange:this.onChange,maxLength:255})]})}),(0,pr.jsx)(Ef,{onCancelClick:t,buttonText:s,onButtonClick:this.onButtonClick,className:"mt-3"}),(0,pr.jsx)($k,{text:c})]})})]})}}dN.defaultProps={verifyText:e=>({valid:aC(e),hint:"Cannot be empty"}),withTextArea:!1};const hN=({className:e="",nameForId:t,trueValue:n,falseValue:r,changeFunction:o,defaultState:i,fullWidth:s})=>(0,pr.jsxs)("div",{className:`c-toggle ${s&&"w-100"} ${e}`,children:[(0,pr.jsx)("input",{type:"checkbox",checked:!0===i,name:t,onChange:o,value:i,className:"c-toggle__checkbox",id:t}),(0,pr.jsxs)("label",{className:"c-toggle__label",htmlFor:t,children:[(0,pr.jsx)("div",{className:"c-toggle__on",children:n}),(0,pr.jsx)("div",{className:"c-toggle__off",children:r})]})]}),pN=({type:e})=>(0,pr.jsxs)("div",{className:"c-upload-loader",children:[(0,pr.jsxs)("div",{className:"d-flex mb-3",children:[(0,pr.jsx)("div",{className:"c-upload-loader__block"}),(0,pr.jsx)("div",{className:"c-upload-loader__block"}),(0,pr.jsx)("div",{className:"c-upload-loader__block"}),(0,pr.jsx)("div",{className:"c-upload-loader__block"}),(0,pr.jsx)("div",{className:"c-upload-loader__block"})]}),(0,pr.jsxs)("h2",{children:["Uploading your ",e," list..."]})]}),fN={multiValue:(e,{theme:{colors:t}})=>({...e,backgroundColor:t.primary25,border:`0.5px solid ${t.primary50}`}),multiValueLabel:(e,{theme:{colors:t}})=>({...e,color:t.primary}),placeholder:e=>({...e,color:"#bfbfbf",fontWeight:"$font-weight-light",fontSize:"0.9rem"}),menu:(e,t)=>({...e,zIndex:10})},mN=({loading:e,toggle:t,heading:n,text:r,onDontSaveButtonClick:o,error:i})=>(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:n,toggle:t}),e?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{className:"mt-4 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"text-primary mb-3",children:"IMPORTANT NOTICE"}),(0,pr.jsx)("div",{children:r})]})]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:t,children:"Go Back"}),(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:o,children:"Don't Save & Close"}),(0,pr.jsx)($k,{text:i})]})]})}),gN=({heading:e,children:t,className:n=""})=>(0,pr.jsxs)("div",{className:`c-note d-flex flex-column ${n}`,children:[(0,pr.jsxs)("div",{className:"my-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("b",{children:e})]}),(0,pr.jsx)("div",{children:t})]}),vN=({toggle:e,videoUrl:t,title:n})=>(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered c-video-modal-dialog",contentClassName:"c-video-modal-content",children:(0,pr.jsxs)(Ig,{children:[(0,pr.jsx)("button",{className:"close c-video-close-button",onClick:e,children:(0,pr.jsx)("i",{className:"fa fa-lg fa-times-circle-o","aria-hidden":"true"})}),(0,pr.jsx)("div",{className:"c-video-modal-embed-responsive",children:(0,pr.jsx)("iframe",{src:t,allow:"autoplay; fullscreen; picture-in-picture",sandbox:"allow-scripts allow-same-origin allow-presentation",title:n})})]})}),yN=e=>{!function(e){let{router:t,basename:n}=El(kl.UseBlocker),r=Tl(Nl.UseBlocker),[i,s]=o.useState(""),a=o.useCallback((t=>{if("function"!==typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:al({},r,{pathname:oa(r.pathname,n)||r.pathname}),nextLocation:al({},o,{pathname:oa(o.pathname,n)||o.pathname}),historyAction:i})}),[n,e]);o.useEffect((()=>{let e=String(++Rl);return s(e),()=>t.deleteBlocker(e)}),[t]),o.useEffect((()=>{""!==i&&t.getBlocker(i,a)}),[t,i,a]),i&&r.blockers.has(i)&&r.blockers.get(i)}((()=>!window.confirm(e.message)))},bN=({toggle:e,loading:t,inputs:n,setInput:r,onSave:o,saveDisabled:i,saveErrors:s,title:a,description:l,addButtonText:c,note:u,saveButtonText:d="Save"})=>(0,pr.jsxs)(Yf,{isOpen:!0,children:[(0,pr.jsx)(Kk,{title:a,toggle:e,className:"px-4 py-4"}),u&&(0,pr.jsx)(Xk,{text:u}),(0,pr.jsx)(Ig,{className:"p-4",children:t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fg,{className:"d-flex align-items-center justify-content-between",children:(0,pr.jsx)(nS,{children:(0,pr.jsx)(b_,{onSubmit:e=>{e.preventDefault()},children:(0,pr.jsxs)(Gg,{className:"mb-4",children:[(0,pr.jsx)("p",{children:l}),n.map(((e,t)=>(0,pr.jsxs)("div",{className:"d-flex my-1",children:[(0,pr.jsx)(Zg,{type:"text",value:e,onChange:e=>((e,t)=>{r(n.toSpliced(t,1,e.target.value))})(e,t),name:`field${t}`,id:`field${t}`}),n.length>1&&(0,pr.jsx)("i",{className:"fa fa-times student-upload-list__item__icon student-upload-list__item__icon--times m-2",onClick:()=>(e=>r(n.toSpliced(e,1)))(t)})]},t))),(0,pr.jsx)(Lh,{text:c,onClick:()=>r(n.concat([""])),className:"mt-3"})]})})})}),(0,pr.jsx)(Ef,{onCancelClick:e,buttonText:d,onButtonClick:o,disabled:i}),s&&(0,pr.jsx)($k,{text:s})]})})]}),xN=n.p+"static/media/logo.ba7a535d4f018cbaeb0f.png",wN=(e,t,n,r,o)=>{const i=(()=>{var e=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!==typeof InstallTrigger,n=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!==typeof safari&&window.safari.pushNotification).toString(),r=!!document.documentMode,o=!r&&!!window.StyleMedia,i=!!window.chrome&&!e;return{isOpera:e,isFirefox:t,isSafari:n,isIE:r,isEdge:o,isChrome:i,isEdgeChromium:i&&-1!==navigator.userAgent.indexOf("Edg"),isBlink:(i||e)&&!!window.CSS}})();return`\n        ${e?`Account Information:\n            School Name: ${t.school.name}\n            School Id: ${t.school.id}\n            Account Type: ${t.school.accountType}\n            Address: ${t.school.address}\n            Administration System: ${t.school.administrationSystem}\n            Contact Number: ${t.school.contactNumber}\n            Crm Status: ${t.school.crmStatus}`:""}\n\n        ${t?`User Information:\n            User email: ${e.myprofile.email}\n            User first name: ${e.myprofile.firstName}\n            User last name: ${e.myprofile.lastName}\n            User id: ${e.myprofile.id}\n            User role: ${e.myprofile.role}`:""}\n\n        User message:\n            ${o}\n\n        Error message:\n            ${n.message}\n\n        Error stack trace:\n            ${n.stack}\n\n        Current Path:\n            ${r}\n\n        Browser detection:\n            Opera: ${i.isOpera}\n            Firefox: ${i.isFirefox}\n            Safari: ${i.isSafari}\n            Internet Explorer: ${i.isIE}\n            Edge: ${i.isEdge}\n            Chrome: ${i.isChrome}\n            Edge Chromium: ${i.isEdgeChromium}\n            Blink engine: ${i.isBlink}\n        `},SN=()=>{const[e,t]=(0,o.useState)(""),[n,{loading:r}]=Km(EC,{onError:()=>{},onCompleted:()=>{t("")}}),{pathname:i}=ml(),{data:s,loading:a,error:l}=Gm(O),{data:c,loading:u,error:d}=Gm(Fe,{variables:{schoolId:uw()},fetchPolicy:"network-only",skip:a||!uw()}),h=Il(),p=vl();if(a||u)return(0,pr.jsx)(qk,{});const f={notificationType:"FRONTEND_ERROR",message:wN(s,c,h,i,e),schoolId:uw()};return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("img",{className:"my-4",style:{maxWidth:150},src:xN,alt:"Class Solver Logo"}),(0,pr.jsxs)("div",{className:"text-center",children:[(0,pr.jsx)("div",{className:"m-4",children:"Sorry - we have encountered an issue"}),(0,pr.jsx)("h1",{className:"m-4",children:"Please refresh your browser and try again"}),!(l||d)&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"m-4",children:'If the issue continues, please provide a brief description of what happened and click on "Send to Support"'}),(0,pr.jsxs)(Gg,{className:"flex justify-center d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{className:"w-40rem text-center",children:[(0,pr.jsx)("div",{className:"text-left",children:"Message (Optional)"}),(0,pr.jsx)(Zg,{type:"textarea",className:"",name:"message",value:e,rows:5,onChange:e=>{t(e.target.value)}})]}),(0,pr.jsx)("div",{className:"container w-lg-75",children:(0,pr.jsxs)("div",{className:"mt-3 d-flex flex-column align-items-center",children:[(0,pr.jsx)(ld,{color:"primary",className:"mt-2 w-15rem",disabled:r,onClick:()=>{n({variables:f}),p("/")},children:"Send to Support"}),(0,pr.jsx)("span",{className:"mt-4 w-15rem text-primary cursor-pointer",disabled:r,onClick:()=>p("/"),children:"Cancel"})]})})]})]})]})]})};var CN=["className","cssModule","tag"],jN={tag:Pu,className:pu().string,cssModule:pu().object},_N=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=lu(e,CN),s=Eu(ju()(t,"navbar-brand"),n);return o.createElement(r,au({},i,{className:s}))};_N.propTypes=jN,_N.defaultProps={tag:"a"};const kN=_N;var NN=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],EN={tabs:pu().bool,pills:pu().bool,vertical:pu().oneOfType([pu().bool,pu().string]),horizontal:pu().string,justified:pu().bool,fill:pu().bool,navbar:pu().bool,card:pu().bool,tag:Pu,className:pu().string,cssModule:pu().object},TN=function(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,s=e.vertical,a=e.horizontal,l=e.justified,c=e.fill,u=e.navbar,d=e.card,h=e.tag,p=lu(e,NN),f=Eu(ju()(t,u?"navbar-nav":"nav",!!a&&"justify-content-"+a,function(e){return!1!==e&&(!0===e||"xs"===e?"flex-column":"flex-"+e+"-column")}(s),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return o.createElement(h,au({},p,{className:f}))};TN.propTypes=EN,TN.defaultProps={tag:"ul",vertical:!1};const ON=TN;var IN=["className","cssModule","active","tag"],RN={tag:Pu,active:pu().bool,className:pu().string,cssModule:pu().object},AN=function(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,s=lu(e,IN),a=Eu(ju()(t,"nav-item",!!r&&"active"),n);return o.createElement(i,au({},s,{className:a}))};AN.propTypes=RN,AN.defaultProps={tag:"li"};const MN=AN,PN={logo:{maxWidth:100},navContainer:{backgroundColor:"#FFF",position:"sticky",top:0,zIndex:10},adminLogo:{maxWidth:32}};class DN extends o.Component{constructor(e){super(e),this.toggle=()=>{this.setState({dropdownOpen:!this.state.dropdownOpen})},this.onLogOut=()=>{window.location.href="/logout"},this.toggleSchoolListModal=()=>{this.setState({schoolListModal:!this.state.schoolListModal})},this.onSchoolClick=e=>{e?sessionStorage.setItem(Ht,e):sessionStorage.removeItem(Ht),this.toggleSchoolListModal(),window.location.reload()},this.state={dropdownOpen:!1,schoolListModal:null===uw()}}render(){const{user:e,settings:t,school:n,dashboard:r={}}=this.props,{dropdownOpen:o,schoolListModal:i}=this.state,{newClassCount:s=0,studentCount:a=0}=r,l=a>0,c=s>0,u=e&&e.role===lS,d=e&&cS(e.role),h=t.adminOnlyRequests,p=r.newAccountLock,f=this.context.gettextObj;return(0,pr.jsxs)(Fg,{style:PN.navContainer,className:"c-nav d-flex align-items-center justify-content-between py-2 d-print-none",children:[(d||e.schools.length>1)&&i&&(0,pr.jsx)(oN,{isOpen:i,toggle:this.toggleSchoolListModal,onSchoolClick:this.onSchoolClick,isSuper:d}),(0,pr.jsxs)("div",{className:"col-12 d-flex justify-content-between",children:[(0,pr.jsx)(kN,{href:"/",className:"pl-4",children:(0,pr.jsx)("img",{style:PN.logo,src:xN,alt:"Class Solver Logo"})}),!u&&(0,pr.jsxs)(ON,{className:"nav-left align-items-center d-inline-flex d-print-none mr-auto pl-4 color-grey-dark",children:[(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{end:!0,to:"/",children:"Dashboard"})}),(0,pr.jsx)("span",{children:"|"}),(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{className:n?"":"btn disabled",end:!0,to:"/Students",children:"Students"})}),(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{end:!0,to:"/Teachers",className:n&&l?"":"btn disabled",children:"Teachers"})}),(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{end:!0,to:"/Requests",className:n&&l&&!0!==p?"":"btn disabled",children:"Requests"})}),(0,pr.jsx)("span",{children:"|"}),(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{end:!0,to:"/Classes",className:n&&l&&!0!==p?"":"btn disabled",children:f.gettext("Classes")})}),(0,pr.jsx)(MN,{children:(0,pr.jsx)(nc,{end:!0,to:"/Solver",className:n&&l&&c&&lw(ou(n,"paymentStatus.status"))&&!p?"":"btn disabled",children:"Solver"})})]}),!u&&(0,pr.jsx)(nE,{dropdownOpen:o,toggle:this.toggle,toggleSchoolListModal:this.toggleSchoolListModal,school:n,onLogOut:this.onLogOut,myprofile:e,adminMode:h})]})]})}}DN.contextType=Cw;const FN=e=>{const t=uw();return t||1!==e.schools.length?t:(sessionStorage.setItem(Ht,e.schools[0].id),e.schools[0].id)},LN=ng()(eg(O,{props:({data:{myprofile:e}})=>({user:e})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Mw,{skip:({user:e})=>!e||(e.role===lS||!FN(e)),options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{dashboard:e,error:t}})=>({dashboard:e,error:t})}),eg(Fe,{skip:({user:e})=>!e||(e.role===lS||!FN(e)),options:()=>({variables:{schoolId:uw()}}),props:({data:{school:e}})=>({school:e})}),eg(me,{skip:({user:e})=>!e||!FN(e),options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()}}),props:({data:{error:e}})=>({studentsError:e})}))(lj(DN));var BN=function(e){var t=ju()("popover","show",e.popperClassName),n=ju()("popover-inner",e.innerClassName);return o.createElement(um,au({},e,{popperClassName:t,innerClassName:n}))};BN.propTypes=om,BN.defaultProps={placement:"right",placementPrefix:"bs-popover",trigger:"click"};const UN=BN;function GN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $N=["defaultOpen"],qN=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={isOpen:t.defaultOpen||!1},n.toggle=n.toggle.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.toggle=function(){this.setState({isOpen:!this.state.isOpen})},n.render=function(){return o.createElement(UN,au({isOpen:this.state.isOpen,toggle:this.toggle},Tu(this.props,$N)))},t}(o.Component);qN.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GN(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultOpen:pu().bool},UN.propTypes);var zN=["className","cssModule","tag"],VN={tag:Pu,className:pu().string,cssModule:pu().object},HN=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=lu(e,zN),s=Eu(ju()(t,"popover-header"),n);return o.createElement(r,au({},i,{className:s}))};HN.propTypes=VN,HN.defaultProps={tag:"h3"};const WN=HN;var YN=["className","cssModule","tag"],QN={tag:Pu,className:pu().string,cssModule:pu().object},JN=function(e){var t=e.className,n=e.cssModule,r=e.tag,i=lu(e,YN),s=Eu(ju()(t,"popover-body"),n);return o.createElement(r,au({},i,{className:s}))};JN.propTypes=QN,JN.defaultProps={tag:"div"};const KN=JN,XN=({icon:e,title:t,action:n,message:r})=>(0,pr.jsxs)("div",{className:"c-notification",children:[(0,pr.jsxs)("div",{className:"c-notification-title",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"mr-1",children:e}),(0,pr.jsx)("span",{children:t})]}),(0,pr.jsx)("div",{children:n})]}),(0,pr.jsx)(ws,{className:"c-notification-body",children:r})]}),ZN=({notifications:e})=>{if(0===e.length){const e=(0,pr.jsx)("i",{className:"fa fa-check text-success"});return(0,pr.jsx)(XN,{icon:e,title:"You have no notifications"})}return e.map((({notificationId:e,title:t,severity:n,message:r},o)=>{const i=(e=>{let t;return"CRITICAL"===e||"MAJOR"===e?t="fa fa-warning text-danger":"MINOR"===e?t="fa fa-warning text-warning":"NORMAL"===e&&(t="fa fa-info-circle color-blue-mid"),(0,pr.jsx)("i",{className:t})})(n);let s;switch(e){case"MISSING_BILLING_EMAIL_ADDRESS":s=(0,pr.jsx)(tc,{to:"/BillingSettings",children:"View"});break;case"STUDENTS_MISSING_CODES":s=(0,pr.jsx)(tc,{to:{pathname:"/Students",search:new URLSearchParams({filterId:"missing-ids"}).toString()},children:"View"});break;case"UNALLOCATED_STUDENTS":s=(0,pr.jsx)(tc,{to:{pathname:"/Students",search:new URLSearchParams({filterId:"unallocated-students"}).toString()},children:"View"});break;default:return null}return(0,pr.jsx)(XN,{icon:i,title:t,action:s,message:r},o)}))},eE=()=>{const{data:e,loading:t}=Gm(TC,{variables:{schoolId:uw()}}),n=!t&&e?e.getNotifications:[];return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"text-primary cursor-pointer mx-4",id:"notificationsPopover",children:n.length>0?(0,pr.jsxs)("span",{className:"fa-stack c-notification-icon",children:[(0,pr.jsx)("i",{className:"fa fa-bell-o fa-lg fa-stack-1x color-grey-mid"}),(0,pr.jsx)("div",{className:"fa fa-stack-2x c-notification-badge-text",children:1===n.length?`${n.length} action`:`${n.length} actions`})]}):(0,pr.jsx)("span",{className:"fa-stack",children:(0,pr.jsx)("i",{className:"fa fa-bell-o fa-lg fa-stack-1x color-grey-mid"})})}),(0,pr.jsxs)(qN,{trigger:"legacy",placement:"bottom",target:"notificationsPopover",popperClassName:"c-notifications",children:[(0,pr.jsx)(WN,{className:"text-primary",children:"Notifications"}),(0,pr.jsx)(KN,{className:"c-notifications-body",children:(0,pr.jsx)(ZN,{notifications:n})})]})]})},tE=()=>(0,pr.jsxs)(kf,{id:"helpTooltip",variant:"light",border:"1px solid #dce1e8",clickable:!0,openEvents:{click:!0,focus:!0},closeEvents:{click:!0,blur:!0},globalCloseEvents:{clickOutsideAnchor:!0,scroll:!0},children:[(0,pr.jsxs)("div",{className:"justify-content-left color-blue-primary c-footer__need-help",children:[(0,pr.jsx)("i",{className:"c-footer__need-help__icon mr-2"}),"Need help?"]}),(0,pr.jsxs)("div",{className:"justify-content-end c-footer__email color-grey-dark",children:["Email us on",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"})]})]}),nE=({dropdownOpen:e,toggle:t,toggleSchoolListModal:n,school:r,onLogOut:o,adminMode:i,myprofile:s})=>{const a=cS(s.role),l=s.role===lS,c=s.schools.length>1,u=r?`${r.id} - ${r.stateCode} ${r.suburb||""} - ${r.name}`:"Choose Account";return(0,pr.jsxs)(Ku,{className:"nav-right pr-4 d-print-none",isOpen:e,toggle:t,children:[(0,pr.jsxs)("div",{className:"d-flex align-items-center",children:[a||c?(0,pr.jsx)("div",{className:"d-inline-block mr-4",children:(0,pr.jsx)("div",{className:"bg-requests-mandatory btn btn-light u-white-space-pre-wrap\n            "+(r?"":"bg-choose-account color-white"),onClick:n,children:u})}):(0,pr.jsx)("div",{}),(0,pr.jsx)(nc,{className:"font-size-16 nav-link justify-content-between d-inline-flex "+(r?"":"btn disabled"),to:"/AccountSettings",children:"Settings"}),(0,pr.jsx)("p",{className:"font-size-16 nav-link justify-content-between d-inline-flex","data-tooltip-id":"helpTooltip",children:"Help"}),(0,pr.jsx)(tE,{}),(0,pr.jsx)(eE,{}),i?(0,pr.jsxs)("div",{className:"d-flex u-nav-border pl-3",children:[(0,pr.jsx)(nc,{className:"align-self-center c-nav__admin-link",to:"/AccountSettings",children:(0,pr.jsx)("span",{className:"c-nav__admin-badge",children:"Admin Mode"})}),(0,pr.jsx)(hd,{className:"pr-0 d-inline-block",nav:!0,caret:!0,children:(0,pr.jsx)("span",{className:"class-badge",children:Gh(s)})})]}):(0,pr.jsx)(hd,{className:"pr-0 pl-4 ml-1 d-inline-block u-nav-border",nav:!0,caret:!0,children:(0,pr.jsx)("span",{className:"class-badge",children:Gh(s)})})]}),(0,pr.jsx)("div",{className:"dropdown-menu-container",children:l?(0,pr.jsx)(Ih,{className:"mr-5",children:(0,pr.jsx)(Ph,{className:"mt-1 mb-1",onClick:o,children:"Log out"})}):(0,pr.jsxs)(Ih,{className:"mr-5",children:[(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsxs)(nc,{to:"/UserProfile",children:[(0,pr.jsx)("div",{className:"mt-0 mb-1 u-settings-link",children:"My Profile"}),(0,pr.jsx)("div",{className:"color-grey-dropdown-header font-weight-medium",children:s.email})]})}),r&&(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsx)(nc,{className:"d-block mt-1 mb-1 u-settings-link w-100",to:"/BillingSettings",children:"Account and Billing"})}),a&&(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsx)(nc,{className:"d-block mt-1 mb-1 u-settings-link w-100",to:"/SuperAdmin",children:"Support Admin Menu"})}),(0,pr.jsx)(Ph,{divider:!0}),(0,pr.jsx)(Ph,{className:"mt-1 mb-1",onClick:o,children:"Log out"})]})})]})};var rE=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function oE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oE(Object(n),!0).forEach((function(t){gu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sE={children:pu().node,className:pu().string,closeClassName:pu().string,closeAriaLabel:pu().string,cssModule:pu().object,color:pu().string,fade:pu().bool,isOpen:pu().bool,toggle:pu().func,tag:Pu,transition:pu().shape(Bf.propTypes),innerRef:pu().oneOfType([pu().object,pu().string,pu().func])},aE={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:iE(iE({},Bf.defaultProps),{},{unmountOnExit:!0})};function lE(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=e.cssModule,s=e.tag,a=e.color,l=e.isOpen,c=e.toggle,u=e.children,d=e.transition,h=e.fade,p=e.innerRef,f=lu(e,rE),m=Eu(ju()(t,"alert","alert-"+a,{"alert-dismissible":c}),i),g=Eu(ju()("close",n),i),v=iE(iE(iE({},Bf.defaultProps),d),{},{baseClass:h?d.baseClass:"",timeout:h?d.timeout:0});return o.createElement(Bf,au({},f,v,{tag:s,className:m,in:l,role:"alert",innerRef:p}),c?o.createElement("button",{type:"button",className:g,"aria-label":r,onClick:c},o.createElement("span",{"aria-hidden":"true"},"\xd7")):null,u)}lE.propTypes=sE,lE.defaultProps=aE;const cE=lE;const uE=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={isOpen:!0},n.toggle=n.toggle.bind(cu(n)),n}du(t,e);var n=t.prototype;return n.toggle=function(){this.setState({isOpen:!this.state.isOpen})},n.render=function(){return o.createElement(cE,au({isOpen:this.state.isOpen,toggle:this.toggle},this.props))},t}(o.Component),dE=()=>navigator.userAgent.indexOf("Chrome")>-1&&!!window.chrome?null:(0,pr.jsx)(uE,{color:"primary",children:"Please use the Google Chrome browser for best results. Some features may not work properly with other browsers."}),hE=w.J1`
  mutation createBulkUploadJob(
    $file: Upload!
    $schoolId: ID!
    $type: UploadJobType!
  ) {
    createBulkUploadJob(file: $file, schoolId: $schoolId, type: $type) {
      id
      meta
      type
      status
      failureCount
      updatedAt
      createdAt
      uploadedFile {
        csvData {
          canonicalHeaders
          headers
          rows
        }
      }
    }
  }
`,pE=()=>Km(hE),fE=n.p+"static/media/student_characteristics_template.29d87499482017df3d7d.csv",mE=n.p+"static/media/friendship_preferences_template.bb87b575a8ab8490684d.csv",gE=w.J1`
  query bulkUploadJob($jobId: ID!) {
    bulkUploadJob(jobId: $jobId) {
      id
      meta
      type
      status
      failureCount
      updatedAt
      createdAt
      uploadedFile {
        csvData {
          canonicalHeaders
          headers
          rows
        }
      }
      fileSummary {
        ... on StudentCharacteristicUploadSummary {
          headers
          sourceResponseLabels {
            label
            studentCount
          }
          subjectCharacteristic {
            id
            name
            characteristicResponses {
              id
              label
            }
          }
        }
        ... on StudentCommentsUploadSummary {
          headers
        }
        ... on UploadSolutionUploadSummary {
          headers
        }
        ... on TeacherUploadSummary {
          headers
          sourceClassLabels {
            label
          }
          currentClassesInSchool {
            label
          }
        }
      }
    }
  }
`,vE=w.J1`
  mutation updateBulkUploadJob($jobParams: JobParams!) {
    updateBulkUploadJob(jobParams: $jobParams) {
      id
      meta
      type
      status
      failureCount
      updatedAt
      createdAt
      fileSummary {
        ... on StudentCharacteristicUploadSummary {
          headers
          sourceResponseLabels {
            label
            studentCount
          }
          subjectCharacteristic {
            id
            name
            characteristicResponses {
              id
              label
            }
          }
        }
        ... on StudentCommentsUploadSummary {
          headers
        }
        ... on TeacherUploadSummary {
          headers
          sourceClassLabels {
            label
          }
          currentClassesInSchool {
            label
          }
        }
      }
    }
  }
`,yE=w.J1`
  mutation importFileFromJobWithMeta($jobId: ID!) {
    importFileFromJobWithMeta(jobId: $jobId) {
      id
      status
      type
    }
  }
`,bE=e=>{const t=uw(),n=Gm(gE,{variables:{jobId:e}}),[r,i]=Km(vE),[s,a]=Km(yE),l=(0,o.useCallback)((t=>r({variables:{jobParams:{id:e,...t}}})),[r,e]),c=(0,o.useCallback)((()=>s({variables:{jobId:e},refetchQueries:[{query:Dw,variables:{schoolId:t}}]})),[s,e,t]),u=(0,o.useCallback)((()=>l({status:"CANCELLED"})),[l]);return{fetch:[n.data&&n.data.bulkUploadJob,n],update:[l,i],cancel:[u,i],import:[c,a]}},xE=o.forwardRef((({indeterminate:e,...t},n)=>{const r=o.useRef(),i=n||r;return o.useEffect((()=>{i.current.indeterminate=e}),[i,e]),(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)("input",{type:"checkbox",ref:i,...t})})})),wE=({rowData:e,canonicalHeaders:t,nameMap:n,selectedRows:r,updateSelectedRows:i,updateNameMap:s,students:a})=>{const l=(0,o.useMemo)((()=>{const e=t.filter((e=>e&&e.startsWith("friend"))).length,n=[...Array(e)].map(((e,t)=>({Header:`Friend ${t+1}`,Cell:jE,accessor:`friend_${t+1}`,headerClassName:"friendship-column",className:"friend-cell"})));return[{Header:"Student",Cell:jE,accessor:"student"},...n]}),[t]),c=(0,o.useMemo)((()=>e),[e]),{getTableProps:u,getTableBodyProps:d,headerGroups:h,rows:p,prepareRow:f,state:{selectedRowIds:m}}=(0,GC.useTable)({columns:l,data:c,initialState:{nameMap:n,studentOptions:SE(a),selectedRowIds:_E(r),updateNameMap:s},autoResetSelectedRows:!1},GC.useRowSelect,(e=>{e.visibleColumns.push((e=>[{id:"selection",Header:e=>{const{getToggleAllRowsSelectedProps:t}=e;return(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center",children:(0,pr.jsx)(xE,{...t()})})},Cell:e=>{const{row:t}=e;return(0,pr.jsx)("div",{className:"d-flex flex-column align-items-center",children:(0,pr.jsx)(xE,{...t.getToggleRowSelectedProps()})})}},...e]))})),g=(0,GC.useAsyncDebounce)(i,200);return(0,o.useEffect)((()=>{g(kE(m))}),[g,m]),(0,pr.jsx)("div",{className:"friendship-preferences-import-table",children:(0,pr.jsxs)("table",{...u(),children:[(0,pr.jsx)("thead",{children:h.map((e=>(0,pr.jsx)("tr",{...e.getHeaderGroupProps(),children:e.headers.map((e=>(0,pr.jsx)("th",{...e.getHeaderProps(),className:e.headerClassName,children:e.render("Header")})))})))}),(0,pr.jsx)("tbody",{...d(),children:p.map((e=>(f(e),(0,pr.jsx)("tr",{...e.getRowProps(),children:e.cells.map((e=>(0,pr.jsx)("td",{...e.getCellProps(),className:e.column.className,children:e.render("Cell")})))}))))})]})})},SE=e=>[{value:"",label:"--- IGNORED ---"},...e.map((e=>{const t=e.currentClass?`${Uh(e)} (${e.currentClass.label})`:`${Uh(e)}`;return{value:e.id,label:t}}))],CE=e=>t=>(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Jb.MenuList,{...t,children:t.children}),(0,pr.jsx)("div",{className:"pl-2 py-2 border-top font-size-14 text-danger",children:e})]}),jE=e=>{const{value:t,initialState:{nameMap:n,studentOptions:r,updateNameMap:o},row:{isSelected:i,toggleRowSelected:s},column:{id:a}}=e,l=n[t],c=""===t,u=!c&&t in n&&l,d=!c&&t in n&&!l,h=!c&&!(t in n),p=!i||c;let f;d&&i&&"student"===a&&s(),u?f={value:l.id,label:(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsx)("div",{className:"mr-3",children:Uh(l)}),l.currentClass&&(0,pr.jsx)(gm,{label:l.currentClass.label,className:`${p&&"c-class-badge--disabled"}`})]})}:d?f={value:"",label:(0,pr.jsx)("div",{className:"text-center align-center",children:"--- IGNORED ---"})}:h?f={value:"",label:(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[t,!p&&(0,pr.jsx)("i",{className:"ml-3 fa fa-warning text-danger"})]})}:c&&(f={value:"",label:null});const m=h&&!p?"border border-danger":"";return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)(Xx,{name:"nameMapping",className:`${m}`,options:r,value:f,onChange:({value:e})=>o(t,e),components:{MenuList:CE(t),IndicatorSeparator:null,DropdownIndicator:null},isDisabled:p,styles:{control:e=>({...e,backgroundColor:null,borderStyle:null})}})})},_E=e=>Object.fromEntries(e.map((e=>[e,!0]))),kE=e=>Object.keys(e).map((e=>parseInt(e))),NE=e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error importing your file. Please try importing again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]}),EE=({currentUploadJob:e,schoolId:t})=>{const n=vl();(0,o.useEffect)((()=>{e||n("/Students")}));const r=null===e||void 0===e?void 0:e.id,[i,s]=(0,o.useState)(!1),{data:a,loading:l}=Gm(me,{variables:{schoolId:t}}),{fetch:[c,{loading:u,error:d}],update:[h],cancel:[p],import:[f,{loading:m,error:g}]}=bE(r),v=(0,o.useCallback)((()=>p().then((()=>{n("/Students")}))),[p,n]),y=(0,o.useCallback)((()=>{s((e=>!e))}),[]);if(l||u)return(0,pr.jsx)(qk,{});if(d)return(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Friendship Preferences",jobId:r,toggle:v,actions:[{color:"warning",onClick:v,text:"Ok"}],children:NE(d)});const b=e=>{const t={meta:JSON.stringify(e),overwriteMeta:!1};return h(t)},x=a.students,w=OE(c),S=IE(w,x),C=RE(w),{rows:j,canonicalHeaders:_}=c.uploadedFile.csvData,k=j.map((e=>JSON.parse(e))),N=[...Array(j.length).keys()].filter((e=>!C.includes(e)));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"d-flex flex-column my-3 ml-3",children:[(0,pr.jsxs)("div",{className:"d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Match Student Names"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:y,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:i,toggle:y,jobId:r,onSentNotification:y,type:"FriendshipPreferencesImport"})]}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsxs)("p",{className:"mb-0",children:["We were unable to match some of the students in your file to the student names in Class Solver. ",(0,pr.jsx)("br",{}),"Please click on these students and type the student's name listed in Class Solver. When you are finished, click Import."]}),(0,pr.jsx)(Ef,{buttonText:"Import Friends",onButtonClick:()=>{f().then((()=>{n("/Students")}))},onCancelClick:v,disabled:!TE(k,S,C)||m})]})]}),m?(0,pr.jsx)(qk,{}):(0,pr.jsx)(wE,{rowData:k,canonicalHeaders:_,nameMap:S,selectedRows:N,updateSelectedRows:e=>{const t=[...Array(j.length).keys()].filter((t=>!e.includes(t)));gw(t,C)||b({...w,ignored_rows:t})},updateNameMap:(e,t)=>{const n=""===t?"":parseInt(t);b({...w,name_map:{...w.name_map,[e]:n}})},students:x})]}),g&&(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Friendship Preferences",jobId:r,toggle:v,actions:[{color:"warning",onClick:v,text:"Ok"}],children:NE(g)})]})},TE=(e,t,n)=>{const r=Object.keys(t),o=e.filter(((e,t)=>!n.includes(t)));return 0!==o.length&&o.flatMap((e=>Object.values(e))).filter((e=>""!==e)).every((e=>r.includes(e)))},OE=e=>JSON.parse(e.meta)||{name_map:{},ignored_rows:[]},IE=(e,t)=>Object.fromEntries(Object.entries(e.name_map).map((([e,n])=>[e,t.find((e=>parseInt(e.id)===n))]))),RE=e=>e.ignored_rows,AE=({currentUploadJob:e})=>{const t=vl();(0,o.useEffect)((()=>{e&&t("/Students/FriendshipPreferences/MapStudents")}));const n=uw(),[r,i]=(0,o.useState)(void 0),[s,{loading:a}]=pE(),l=e=>{i(e.target.files[0])},[c,u]=(0,o.useState)(),[d,{loading:h}]=Km(yE),[p,f,m]=c&&c.graphQLErrors.length>0?[c.graphQLErrors[0].message,c.graphQLErrors[0].details,c.graphQLErrors[0].job_id]:[void 0,void 0,void 0],g=(0,o.useCallback)((()=>s({variables:{schoolId:n,file:r,type:"FRIENDSHIP_PREFERENCE"}}).then((e=>{if(e.data&&e.data.createBulkUploadJob){const n=e.data.createBulkUploadJob;(e=>{const t=OE(e),n=IE(t,[]),r=RE(t),o=e.uploadedFile.csvData.rows.map((e=>JSON.parse(e)));return TE(o,n,r)})(n)?d({variables:{jobId:n.id}}).then((()=>{t("/Students")})).catch((e=>{u(e)})):t("/Students/FriendshipPreferences/MapStudents")}})).catch((e=>{u(e)}))),[s,r,t,n,d]),v=()=>t("/Students");return void 0===r?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Friendship Preferences"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/kb-fp/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"1. Download and complete the friendship preferences template"}),(0,pr.jsx)("p",{className:"py-2 text-center",children:(0,pr.jsx)("a",{href:mE,download:"friendship_preferences_template.csv",children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary",children:"Download Template"})})}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"2. Then upload the completed file"}),(0,pr.jsx)("input",{type:"file",id:"uploadedFile",name:"uploadedFile",onChange:l,hidden:!0}),(0,pr.jsx)("p",{className:"py-2 mb-0 text-center",children:(0,pr.jsx)("a",{href:"#",children:(0,pr.jsx)(Qg,{htmlFor:"uploadedFile",className:"btn-200-width btn-secondary",children:"Upload Completed File"})})}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:v,children:"< Back to Students page"})]})})})})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Friendship Preferences"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/kb-fp/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-75 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:r.name}),h&&(0,pr.jsx)("div",{children:(0,pr.jsx)(qk,{className:"loader-container-relative"})}),(0,pr.jsx)("button",{onClick:g,disabled:a||h,className:"btn btn-primary m-2",children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",onChange:l,hidden:!0}),(0,pr.jsx)("label",{htmlFor:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:v,children:"< Back to Students page"}),(0,pr.jsxs)("div",{className:"c-note d-flex flex-column mx-auto my-3",children:[(0,pr.jsxs)("div",{className:"my-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("b",{children:"Important"})]}),(0,pr.jsxs)("p",{children:[(0,pr.jsx)("span",{className:"font-weight-bold",children:"Same names: "}),"This function may not work properly if you have two or more students with ",(0,pr.jsx)("u",{children:"exactly"})," the same first name and surname at your school. If this is the case, please let us know at",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"})," ","and we will assist you with the import."]}),(0,pr.jsxs)("p",{children:[(0,pr.jsxs)("span",{className:"font-weight-bold",children:["Column headings:"," "]}),"Please ensure the imported file contains the column headings as shown in the template."]}),(0,pr.jsxs)("p",{children:[(0,pr.jsxs)("span",{className:"font-weight-bold",children:["Replacing friends:"," "]}),"If friendship preferences have already been entered into Class Solver, this function will over-write existing friendship preferences for the imported student."]}),(0,pr.jsxs)("p",{children:[(0,pr.jsx)("span",{className:"font-weight-bold",children:"File format: "}),"If you are using a PC, please make sure the file is saved as Comma delimited (.csv). If you are using a Mac, please save the file as UTF-8 (.csv)."]})]}),c&&(0,pr.jsx)(Jj,{isOpen:!0,title:bC[p].title,type:"Friendship Preferences",jobId:m,toggle:()=>u(void 0),actions:bC[p].actions(),children:bC[p].body("Friendship Preferences",f)})]})]})})})})]})},ME=e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error with your uploaded file. Please try uploading again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]}),PE=({characteristics:e,isCharacteristicsLoading:t,navigate:n,uploadJob:r,updateBulkUploadJob:i,isUpdatingJob:s,cancelUploadJob:a})=>{const l=o.useMemo((()=>({student_code:["student id","student_code","eq id","eq_id"]})),[]),[c,u]=o.useState(!1),[d,h]=o.useState(Yk),p=o.useMemo((()=>r&&r.fileSummary?r.fileSummary.headers:[]),[r]),[f,m]=o.useState((()=>Object.entries(l).reduce(((e,[t,n])=>{const r=p.find((e=>{const t=e.toLowerCase(),r=e.replace(/\s/g,"");return n.includes(e)||n.includes(t)||n.includes(r)}));return r?{...e,[t]:r}:e}),{}))),g=o.useMemo((()=>Object.keys(f).length>=2&&d!==Yk),[f,d]),v=o.useCallback((()=>{const e=JSON.stringify({characteristic_id:d,student_code_column:f.student_code,characteristic_responses_column:f.characteristic_column_name,ignore_student_code_errors:!1});return i({meta:e,overwriteMeta:!1}).then((e=>{e.data&&e.data.updateBulkUploadJob&&n("/Students/Characteristics/MapResponseLabels",{state:{jobId:e.data.updateBulkUploadJob.id}})})).catch((()=>{}))}),[i,f,d,n]),y=o.useCallback((()=>a().then((()=>{n("/Students")}))),[a,n]),b=o.useCallback((()=>{u((e=>!e))}),[]),x=o.useCallback((e=>{h(e.target.value)}),[]),w=o.useCallback((({selectedOption:e,mapTo:t})=>{m((n=>({...n,[t]:e})))}),[]),S=o.useCallback((e=>{m((t=>(delete t[e],{...t})))}),[]),C={student_code:"Student ID",characteristic_column_name:{placeholderText:"-- Please select a characteristic --",selectableRowItems:e,selectedId:d,handleChange:x,isSelectableRowItemsLoading:t}};return(0,pr.jsx)(Vk,{importType:"Characteristics",handleToggleHelpModal:b,showHelpModal:c,uploadJob:r,requiredColumns:C,mappedColumns:f,options:p,handleColumnMapped:w,handleColumnClear:S,isMappingComplete:g,isUpdatingJob:s,handleContinue:v,handleCancel:y})},DE={body:e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error importing your data. Please try again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]})},FE={"duplicate-column-value":{body:({details:e})=>{const t=e.column_key,n=Object.keys(e.rows[0]).find((e=>e!==t)),r=e.rows.map((e=>`${e[t]},${e[n]}`)).join("\n");return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The following rows were duplicated in your file. Please double check and remove them from the CSV file."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("pre",{className:"mb-0",children:r})})]})}},"file-has-no-data":{body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"There is no data to import. Please double check your response label matchings and try again."})})},"student-code-does-not-exist":{body:({details:e})=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The file you uploaded contains Student IDs that are not listed in Class Solver:"}),(0,pr.jsx)("p",{children:e.missing_student_codes.join(", ")}),(0,pr.jsx)("p",{children:"This is likely because the students have not yet been added to Class Solver (eg. new students)."}),(0,pr.jsxs)("p",{children:["Would you like to ",(0,pr.jsx)("b",{children:"Import"})," the file for students where we found matching Student IDs (if any), or ",(0,pr.jsx)("b",{children:"Cancel"})," and check the csv file?"]})]})}},LE=n.p+"static/media/student_notes_template.367559b23ca532b35ffb.csv",BE={body:e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error importing your data. Please try again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]})},UE={"duplicate-column-value":{body:({details:e})=>{const t=e.column_key,n=Object.keys(e.rows[0]).find((e=>e!==t)),r=e.rows.map((e=>`${e[t]},${e[n]}`)).join("\n");return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The following rows were duplicated in your file. Please double check and remove them from the CSV file."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("pre",{className:"mb-0",children:r})})]})}},"file-has-no-data":{body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"There is no data to import."})})},"student-code-does-not-exist":{title:"Student IDs Not Found",body:({details:e})=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The file you uploaded contains Student IDs that are not listed in Class Solver:"}),(0,pr.jsx)("p",{children:e.missing_student_codes.join(", ")}),(0,pr.jsx)("p",{children:"This is likely because the students have not yet been added to Class Solver (eg. new students)."}),(0,pr.jsxs)("p",{children:["Would you like to ",(0,pr.jsx)("b",{children:"Import"})," the file for students where we found matching Student IDs (if any), or ",(0,pr.jsx)("b",{children:"Cancel"})," and check the csv file?"]})]})}},GE=({navigate:e,uploadJob:t,isUpdatingJob:n,isImportingJob:r,updateBulkUploadJob:i,importBulkUploadJob:s,handleCancel:a})=>{const[l,c]=o.useState(),{fileSummary:u}=t,d=o.useMemo((()=>({student_code:["student id","student_code","eq id","eq_id"],comments:["notes","comments"]})),[]),h=o.useMemo((()=>({student_code:"Student ID",comments:"Notes / Comments"})),[]),[p,f]=o.useState((()=>{const e={};return Object.keys(h).forEach((t=>{const n=d[t];u.headers.forEach((r=>{const o=r.toLowerCase(),i=o.replace(/\s/g,"");(n.includes(r)||n.includes(o)||n.includes(i)||n.some((e=>{var t=new RegExp(`${e}`,"i");return r.match(t)})))&&(e[t]=r)}))})),e})),[m,g]=o.useState(!1),v=o.useMemo((()=>{const e=Object.keys(p),t=Object.keys(h);return e.length>=t.length&&t.every((t=>e.includes(t)))}),[p,h]),y=o.useCallback((()=>{g((e=>!e))}),[]),b=o.useCallback((({selectedOption:e,mapTo:t})=>{f((n=>({...n,[t]:e})))}),[]),x=o.useCallback((e=>{f((t=>(delete t[e],{...t})))}),[]),w=o.useCallback((()=>{const t=JSON.stringify({student_code_column:p.student_code,student_notes_column:p.notes,ignore_student_code_errors:!1});return i({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&s().then((()=>{e("/Students")})).catch((e=>{c(e.graphQLErrors[0])}))}))}),[p,i,e,s]),S=o.useCallback((()=>{const t=JSON.stringify({student_code_column:p.student_code,student_notes_column:p.notes,ignore_student_code_errors:!0});return i({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&s().then((()=>{e("/Students")})).catch((e=>{c(e.graphQLErrors[0])}))}))}),[p,i,e,s]),C=l&&"student-code-does-not-exist"===l.message?[{color:"link",onClick:a,text:"Cancel"},{color:"primary",onClick:S,text:"Import",disabled:n||r}]:[{color:"link",onClick:a,text:"Cancel"}];return(0,pr.jsx)(Vk,{importType:"StudentNotes",handleToggleHelpModal:y,showHelpModal:m,uploadJob:t,requiredColumns:h,mappedColumns:p,fileSummary:u,options:u?u.headers:[],handleColumnMapped:b,handleColumnClear:x,isMappingComplete:v,isUpdatingJob:n,isImportingJob:r,handleContinue:w,handleCancel:a,uploadError:l,errorType:"Student Notes",setUploadError:c,knownWarnings:UE,defaultWarning:BE,errorModalActions:C})},$E=n.p+"static/media/class_list_template.9cc820f1f6cd78cf71c4.csv",qE={body:e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error importing your data. Please try again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]})},zE={"duplicate-column-value":{body:({details:e})=>{const t=e.column_key,n=Object.keys(e.rows[0]).find((e=>e!==t)),r=e.rows.map((e=>`${e[t]},${e[n]}`)).join("\n");return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The following rows were duplicated in your file. Please double check and remove them from the CSV file."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("pre",{className:"mb-0",children:r})})]})}},"file-has-no-data":{body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"There is no data to import."})})},"student-code-does-not-exist":{title:"Student IDs Not Found",body:({details:e})=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The file you uploaded contains Student IDs that are not listed in Class Solver:"}),(0,pr.jsx)("p",{children:e.missing_student_codes.join(", ")}),(0,pr.jsx)("p",{children:"This is likely because the students have not yet been added to Class Solver (eg. new students)."}),(0,pr.jsxs)("p",{children:["Would you like to ",(0,pr.jsx)("b",{children:"Import"})," the file for students where we found matching Student IDs (if any), or ",(0,pr.jsx)("b",{children:"Cancel"})," and check the csv file?"]})]})}},VE=({navigate:e,uploadJob:t,isUpdatingJob:n,isImportingJob:r,updateBulkUploadJob:i,importBulkUploadJob:s,handleCancel:a})=>{const[l,c]=o.useState(),{fileSummary:u}=t,d=o.useMemo((()=>({student_code:["student id","student_code","eq id","eq_id"],new_class_label:["new_class_label","new class label","new class"]})),[]),h=o.useMemo((()=>({student_code:"Student ID",new_class_label:"New Class Label"})),[]),p=o.useMemo((()=>({locked:"Locked"})),[]),[f,m]=o.useState((()=>{const e={};return Object.keys(h).forEach((t=>{const n=d[t];u.headers.forEach((r=>{const o=r.toLowerCase(),i=o.replace(/\s/g,"");(n.includes(r)||n.includes(o)||n.includes(i))&&(e[t]=r)}))})),e})),[g,v]=o.useState(!1),y=o.useMemo((()=>{const e=Object.keys(f),t=Object.keys(h);return e.length>=t.length&&t.every((t=>e.includes(t)))}),[f,h]),b=o.useCallback((()=>{v((e=>!e))}),[]),x=o.useCallback((({selectedOption:e,mapTo:t})=>{m((n=>({...n,[t]:e})))}),[]),w=o.useCallback((e=>{m((t=>(delete t[e],{...t})))}),[]),S=o.useCallback((()=>{const t=JSON.stringify({student_code_column:f.student_code,ignore_student_code_errors:!1});return i({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&s().then((()=>{e(-2)})).catch((e=>{c(e.graphQLErrors[0])}))}))}),[f,i,e,s]),C=o.useCallback((()=>{const t=JSON.stringify({student_code_column:f.student_code,ignore_student_code_errors:!0});return i({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&s().then((()=>{e(-2)})).catch((e=>{c(e.graphQLErrors[0])}))}))}),[f,i,e,s]),j=l&&"student-code-does-not-exist"===l.message?[{color:"link",onClick:a,text:"Cancel"},{color:"primary",onClick:C,text:"Import"}]:[{color:"link",onClick:a,text:"Cancel"}];return(0,pr.jsx)(Vk,{importType:"Solutions",handleToggleHelpModal:b,showHelpModal:g,uploadJob:t,requiredColumns:h,optionalColumns:p,mappedColumns:f,fileSummary:u,options:u?u.headers:[],handleColumnMapped:x,handleColumnClear:w,isMappingComplete:y,isUpdatingJob:n,isImportingJob:r,handleContinue:S,handleCancel:a,uploadError:l,errorType:"Solution",setUploadError:c,knownWarnings:zE,defaultWarning:qE,errorModalActions:j})},HE=({className:e=""})=>(0,pr.jsxs)("div",{className:`c-modal-note c-modal-note--request-admin ${e}`,children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Note: You are currently in \u2018Admin Only Request Mode\u2019, enabling you as an Administrator to create and view sensitive Requests that are only visible when this mode is turned on.  Untick the checkbox below if you would like this Request to still be visible when Admin Only Request Mode is turned off."]});let WE={textarea:{height:122,maxHeight:122,minHeight:122}};const YE=({edit:e,loading:t,addSuccessful:n,modal:r,errors:i,toggleDeleteModal:s,adminMode:a,saveRequest:l,students:c,studentsToExclude:u,teachers:d,studentFrom:h,studentFromName:p,personToName:f,inputGeneric:m,inputChangeStudentFrom:g,inputChangePersonTo:v,mandatory:y,pair:b,description:x,adminOnly:w,closeRequestModal:S})=>{const[C,j]=(0,o.useState)(!1),_=()=>{j(!C)};return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Yf,{isOpen:r,className:"modal-dialog-centered",children:(0,pr.jsxs)(b_,{children:[(0,pr.jsx)(Kk,{title:(e?"Edit":"Add")+" Request",toggle:S,toggle2:_,className:"px-5 py-4"}),a?(0,pr.jsx)(HE,{className:"px-5"}):null,n?(0,pr.jsx)(Zk,{className:"px-5",text:"Request saved successfully!"}):null,t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"pt-0 pl-5 pr-5",children:[a&&(0,pr.jsx)("div",{className:"row",children:(0,pr.jsxs)("div",{className:"col-12 mt-4",children:[(0,pr.jsx)(Zg,{type:"checkbox",className:"ml-0",name:"adminOnly",id:"adminOnly",checked:w,onChange:m}),(0,pr.jsx)(Qg,{htmlFor:"adminOnly",className:"ml-4",children:"Admin only Request"})]})}),(0,pr.jsxs)("div",{className:"row text-right justify-content-end",children:[(0,pr.jsxs)("div",{className:"col-6 pr-4 pt-4",children:[(0,pr.jsxs)(Gg,{className:"text-left",children:[(0,pr.jsx)(Qg,{htmlFor:"StudentId",children:"Student"}),(0,pr.jsx)(Lk,{nameVal:"studentFromName",changeHandler:m,selectedValue:p,selectFunction:g,placeholder:"Type to select a student...",students:c,studentsToExclude:u}),(0,pr.jsx)($k,{text:i.studentFrom})]}),(0,pr.jsxs)(Gg,{className:"text-left",children:[(0,pr.jsx)(Qg,{htmlFor:"pairToggle",children:"Pair/Separate"}),(0,pr.jsx)(hN,{fullWidth:!0,nameForId:"pair",trueValue:"Pair",defaultState:b,falseValue:"Separate",changeFunction:m})]}),(0,pr.jsxs)(Gg,{className:"text-left",children:[(0,pr.jsx)(Qg,{htmlFor:"studentTeacher",children:"Student/Teacher"}),(0,pr.jsx)(Lk,{nameVal:"personToName",changeHandler:m,selectedValue:f,selectFunction:v,placeholder:"Type to select a student/teacher...",students:c,teachers:d,studentsToExclude:[h]}),(0,pr.jsx)($k,{text:i.personTo})]})]}),(0,pr.jsxs)("div",{className:"col-6 pt-4",children:[(0,pr.jsxs)(Gg,{className:"text-left",children:[(0,pr.jsx)(Qg,{htmlFor:"mandatory",children:"Importance"}),(0,pr.jsx)(hN,{fullWidth:!0,nameForId:"mandatory",defaultState:y,trueValue:"Mandatory",falseValue:"Important",changeFunction:m})]}),(0,pr.jsxs)(Gg,{className:"text-left",children:[(0,pr.jsx)(Qg,{htmlFor:"description",children:"Comment (optional - max 255 characters)"}),(0,pr.jsx)(Zg,{type:"textarea",name:"description",id:"description",placeholder:"Add comment...",value:x||"",onChange:m,style:WE.textarea,maxLength:255})]})]})]}),(0,pr.jsxs)("div",{className:"row my-4 justify-content-end align-items-center",children:[e?(0,pr.jsx)("span",{className:"text-primary col-3 cursor-pointer",onClick:s,children:"Delete Request"}):null,(0,pr.jsxs)("div",{className:"col-9 d-flex justify-content-end align-items-center",children:[(0,pr.jsx)("span",{className:"text-primary px-4 cursor-pointer",onClick:S,children:"Cancel"}),(0,pr.jsx)(ld,{className:"ml-2",onClick:()=>l(!1),color:"primary",children:"Save Request"}),e?null:(0,pr.jsx)(ld,{className:"ml-2",onClick:()=>l(!0),color:"primary",children:"Save & Add Another Request"})]})]}),(0,pr.jsx)($k,{text:i.mutation})]})]})}),C&&(0,pr.jsx)(vN,{toggle:_,videoUrl:"https://player.vimeo.com/video/853263793?h=9d7a2985c5",title:"Instruction Step 1"})]})},QE={"duplicate-column-value":{body:({details:e})=>{const t=e.column_key,n=Object.keys(e.rows[0]).find((e=>e!==t)),r=e.rows.map((e=>`${e[t]},${e[n]}`)).join("\n");return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The following rows were duplicated in your file. Please double check and remove them from the CSV file."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("pre",{className:"mb-0",children:r})})]})}},"file-has-no-data":{body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"There is no data to import."})})},"student-code-does-not-exist":{title:"Student IDs Not Found",body:({details:e})=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The file you uploaded includes requests for students that are not listed in Class Solver:"}),(0,pr.jsx)("p",{children:e.missing_student_codes.join(", ")}),(0,pr.jsx)("p",{children:"These students need to be added to Class Solver, with their correct Student ID, before importing their requests."}),(0,pr.jsxs)("p",{children:["Would you like to ",(0,pr.jsx)("b",{children:"Import"})," the other requests in your file (if any) or ",(0,pr.jsx)("b",{children:"Cancel"})," the import and add the students or fix the csv file?"]})]}),missingErrorMessage:!0},"teacher-email-does-not-exist":{title:"Teacher Emails Not Found",body:({details:e})=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The file you uploaded includes requests for teachers that are not listed in Class Solver:"}),(0,pr.jsx)("p",{children:e.missing_teacher_emails.join(", ")}),(0,pr.jsx)("p",{children:"These teachers need to be added to Class Solver, with their correct email address, before importing their requests."}),(0,pr.jsxs)("p",{children:["Would you like to ",(0,pr.jsx)("b",{children:"Import"})," the other requests in your file (if any) or ",(0,pr.jsx)("b",{children:"Cancel"})," the import and add the teachers or fix the csv file?"]})]}),missingErrorMessage:!0}},JE=({buttonImportText:e,buttonExportText:t,exportType:n,genericErrorMessage:r,title:i,loading:s,navigate:a,importRequestsFileMutation:l,children:c})=>{const u=uw(),d=nu(),[h,p]=o.useState(void 0),[f,m]=o.useState(!1),[g,v]=o.useState(),[y,b]=o.useState(),[x,w]=o.useState(),S=e=>{p(e.target.files[0])},C=e=>{const t={file:h,schoolId:uw(),ignoreMissingIndividualsErrors:e};l({variables:t}).then((()=>{a(-1)})).catch((e=>{m(!0),b(e.graphQLErrors&&e.graphQLErrors[0]),v(e.graphQLErrors.length>0?e.graphQLErrors[0].message:"generic")}))},j=()=>{m(!1),b(null),v(null),p(void 0)},_=async()=>{w(null);const[e,t]=await zw(n,u,d,!1);t&&w(`Error: ${e.status} - ${t}`)},k=y&&QE[g]&&QE[g].missingErrorMessage?[{color:"link",onClick:j,text:"Cancel"},{color:"primary",onClick:()=>C(!0),text:"Import"}]:[{color:"link",onClick:j,text:"Cancel"}];if(s)return(0,pr.jsx)(pN,{});let N;return N=h?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to import:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-100 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:h.name}),(0,pr.jsx)("div",{className:"btn btn-200-width btn-primary m-2",onClick:()=>C(!1),children:"Confirm and Import"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",hidden:!0,onChange:S}),(0,pr.jsx)(Qg,{for:"fileUpload",className:"btn btn-secondary btn-200-width m-2",children:"Choose Another File"}),(0,pr.jsx)(ld,{color:"link",onClick:()=>a(-1),children:"< Back to Settings Page"})]})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2 pt-4",children:"1. Go to the account containing the requests and export the request file"}),(0,pr.jsxs)("a",{children:[(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary m-2",onClick:_,children:t}),x&&(0,pr.jsx)($k,{className:"mx-3",text:x})]}),(0,pr.jsx)("h2",{className:"m-2 pt-4",children:"2. Go to the destination account and import the request file"}),(0,pr.jsxs)("div",{className:"py-2",children:[(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",hidden:!0,onChange:S}),(0,pr.jsx)(Qg,{for:"fileUpload",className:"btn-200-width btn-secondary m-2",children:h?"Choose Another File":e})]}),(0,pr.jsx)(ld,{color:"link",onClick:()=>a(-1),children:"< Back to Settings Page"})]}),(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"row m-4",children:(0,pr.jsx)("h1",{className:"mx-4",children:i})}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"flex-column text-center",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[N,c]}),((e,t)=>e&&t&&t[e])(g,QE)?(0,pr.jsx)(Jj,{title:QE[g].title,isOpen:f,jobId:y&&y.job_id,actions:k,children:QE[g].body(y)}):(0,pr.jsx)(Jj,{isOpen:f,actions:k,children:(0,pr.jsxs)("p",{children:[r,(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),'Please click "Need help importing?" to let us know and we will upload the file for you.']})})]})})})})]})},KE={pairing:{name:"PAIRING/SEPARATING"},requestDetails:{name:"REQUEST DETAILS"}},XE=[{name:"Student",id:"studentName",section:"pairing",headerClass:"requests-header-studentName",dataClass:"requests-data-studentName"},{name:"",id:"studentClass",section:"pairing",headerClass:"requests-header-studentClass",dataClass:"requests-data-studentClass"},{name:"Pair / Separate",id:"studentPair",section:"pairing",headerClass:"requests-header-studentPair",dataClass:"requests-data-studentPair"},{name:"Student/Teacher",id:"studentTo",section:"pairing",headerClass:"requests-header-studentTo",dataClass:"requests-data-studentTo"},{name:"",id:"studentToClass",section:"pairing",headerClass:"requests-header-studentToClass",dataClass:"requests-data-studentToClass"},{name:"Importance",id:"studentRequestImportance",section:"pairing",headerClass:"requests-header-studentRequestImportance",dataClass:"requests-data-studentRequestImportance"},{name:"Comments",id:"studentDescription",section:"pairing",headerClass:"requests-header-studentDescription",dataClass:"requests-data-studentDescription"},{name:"Input By",id:"studentRequestInputBy",section:"requestDetails",headerClass:"requests-header-inputBy",dataClass:"requests-data-inputBy"},{name:"Input On",id:"studentRequestInputOn",section:"requestDetails",headerClass:"requests-header-inputOn",dataClass:"requests-data-inputOn"},{name:"Status",id:"studentRequestStatus",section:"requestDetails",headerClass:"requests-header-requestStatus",dataClass:"requests-data-requestStatus"}],ZE=e=>{const t=Uh(e);return e.currentClass?`${t} (${e.currentClass.label})`:t},eT={constraintId:void 0,studentFrom:"",studentFromName:"",personTo:{},personToName:"",pair:!0,mandatory:!1,description:"",errors:{}};class tT extends o.Component{constructor(e){super(e),this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error)},this.closeRequestModal=()=>{this.setState({requestModal:!this.state.requestModal,...eT})},this.toggleRequestModal=()=>{this.setState({requestModal:!this.state.requestModal,addSuccessful:!1,errors:{}})},this.toggleDeleteModal=()=>{this.setState({deleteModal:!this.state.deleteModal})},this.addClick=()=>{this.setState({constraintId:void 0,studentFromName:"",personToName:""}),this.toggleRequestModal()},this.searchChange=e=>{void 0===e?this.setState({search:""}):this.setState({search:e.target.value})},this.inputGeneric=e=>{let t=e.target.value,n=e.target.name;"true"!==t&&"false"!==t&&"on"!==t&&"off"!==t?this.setState({[n]:t}):this.setState({[n]:!this.state[n]})},this.inputChangeStudentFrom=e=>{e?this.setState({studentFrom:e.id,studentFromName:ZE(e)}):this.setState({studentFrom:"",studentFromName:""})},this.inputChangePersonTo=e=>{e?this.setState({personToName:ZE(e),personTo:{isTeacher:"Teacher"===e.__typename,id:e.id}}):this.setState({personToName:"",personTo:{isTeacher:!1,id:""}})},this.rowClick=e=>{su(e.constraintId)&&this.setState({mandatory:e.studentPair.props.mandatory,description:e.studentDescription,studentFrom:e.studentFromId,studentFromName:e.studentFromName,pair:e.studentPair.props.pair,personTo:e.personTo,personToName:e.personToName,adminOnly:e.adminOnly,constraintId:e.constraintId}),this.toggleRequestModal()},this.onSuccessfulRequest=e=>{const{settings:t}=this.props;this.setState({requestModal:e,addSuccessful:e,loading:!1,studentFrom:"",studentFromName:"",personTo:"",personToName:"",pair:!0,mandatory:!1,adminOnly:t.adminOnlyRequests,description:"",constraintId:void 0})},this.onErrorRequest=e=>{aw(e),this.setState({loading:!1,errors:{mutation:kj(e.message)}})},this.saveRequest=e=>{const{myprofile:t,settings:n,teacherRequestMutation:r,studentRequestMutation:o,requestsData:i}=this.props,{studentFrom:s}=this.state,a=uw(),l=[{query:ve,variables:{id:s,adminOnly:n.adminOnlyRequests}},{query:Nw,variables:{adminOnly:n.adminOnlyRequests,schoolId:a}},{query:Mw,variables:{adminOnly:n.adminOnlyRequests,schoolId:a}}],c=this.validateRequest(this.state);if(this.setState({errors:c}),0===Object.keys(c).length){const{studentFrom:s,personTo:c,description:u,mandatory:d,pair:h,constraintId:p,adminOnly:f}=this.state;this.setState({loading:!0});let m={schoolId:a,studentFromId:s,mandatory:d,pair:h,constraintId:p,adminOnly:f,inputByName:Uh(t)};const g=(c.isTeacher?i.constraintsTeacher:i.constraintsStudent).find((e=>e.id===p));g&&!Ej(g.description,u)||(m={...m,description:u}),c.isTeacher?(m={...m,teacherToId:c.id},r({variables:m,refetchQueries:l}).then((()=>{this.onSuccessfulRequest(e)})).catch((e=>{this.onErrorRequest(e)}))):(m={...m,studentToId:c.id},l.push({query:ve,variables:{id:c.id,adminOnly:n.adminOnlyRequests}}),o({variables:m,refetchQueries:l}).then((()=>{this.onSuccessfulRequest(e)})).catch((e=>{this.onErrorRequest(e)})))}},this.onFilterChange=e=>{this.props.setCurrentGrade(e.target.value)},this.onSuccessfulDelete=()=>{this.setState({loading:!1,deleteModal:!1,requestModal:!1,studentFrom:"",studentFromName:"",personTo:"",personToName:"",pair:!0,mandatory:!1,description:"",constraintId:void 0})},this.onErrorDelete=e=>{aw(e),this.setState({loading:!1,errors:{delete:"Can not delete Request"}})},this.deleteRequest=()=>{const{deleteConstraintsStudent:e,deleteConstraintsTeacher:t,settings:n}=this.props,{constraintId:r,studentFrom:o,personTo:{id:i,isTeacher:s}}=this.state,a=uw();this.setState({loading:!0});const l=[{query:ve,variables:{id:o,adminOnly:n.adminOnlyRequests}},{query:Nw,variables:{adminOnly:n.adminOnlyRequests,schoolId:a}}],c={constraintId:r};s?t({variables:c,refetchQueries:l,awaitRefetchQueries:!0}).then((()=>{this.onSuccessfulDelete()})).catch((e=>{this.onErrorDelete(e)})):(l.push({query:ve,variables:{id:i,adminOnly:n.adminOnlyRequests}}),e({variables:c,refetchQueries:l,awaitRefetchQueries:!0}).then((()=>{this.onSuccessfulDelete()})).catch((e=>{this.onErrorDelete(e)})))},this.state={loading:!1,search:"",requestModal:!1,addSuccessful:!1,adminOnly:this.props.settings.adminOnlyRequests,showDeleteAllRequestConstraints:!1,showExportStudentRequests:!1,showExportTeacherRequests:!1,...eT}}validateRequest(e){const{studentFrom:t,personTo:n}=e,r={};return aC(t)||(r.studentFrom="Must select a student"),aC(ou(n,"id"))||(r.personTo="Must select a student or teacher"),r}render(){const{requestsData:e,notMetRequests:t,currentSchoolGrades:n,students:r,teachers:o,settings:i,currentGrade:s}=this.props,{loading:a,requestModal:l,addSuccessful:c,search:u,deleteModal:d,errors:h,constraintId:p,studentFrom:f,studentFromName:m,personTo:g,personToName:v,description:y,mandatory:b,pair:x,adminOnly:w,showDeleteAllRequestConstraints:S,showExportStudentRequests:C,showExportTeacherRequests:j}=this.state,_=i.adminOnlyRequests,k=g.isTeacher?[]:[g.id];let N=e.constraintsStudent,E=e.constraintsTeacher,T=N.length+E.length,O=[];N.forEach((e=>(O.push({studentName:`${e.studentFrom.firstName} ${e.studentFrom.lastName}`,studentFromName:ZE(e.studentFrom),studentFromId:e.studentFrom.id,studentClass:(0,pr.jsx)(gm,{label:ou(e,"studentFrom.currentClass.label")}),studentPair:(0,pr.jsx)(xk,{mandatory:e.mandatory,pair:e.pair}),studentTo:`${e.studentTo.firstName} ${e.studentTo.lastName}`,personToName:ZE(e.studentTo),personTo:{id:e.studentTo.id,isTeacher:!1},studentToClass:(0,pr.jsx)(gm,{label:ou(e,"studentTo.currentClass.label")}),studentRequestImportance:e.mandatory?"Mandatory":"Important",studentDescription:e.description,studentRequestInputBy:e.inputByName||"",studentRequestInputOn:qh(e.insertedAt)||"",studentRequestStatus:e.status&&"invalid"===e.status.status?Nj(e.status):t.includes(e.constraintId)?(0,pr.jsx)("span",{className:"color-requests-mandatory u-font-weight-medium",children:"Request Not Met"}):"-",constraintId:e.constraintId,rowClassName:e.adminOnly?"bg-admin":"",studentFromLastName:e.studentFrom.lastName,personToLastName:e.studentTo.lastName,studentToGrade:ou(e,"studentTo.currentGrade.id"),studentFromGrade:ou(e,"studentFrom.currentGrade.id"),adminOnly:e.adminOnly}),null))),E.forEach((e=>(O.push({studentName:`${e.studentFrom.firstName} ${e.studentFrom.lastName}`,studentFromName:ZE(e.studentFrom),studentFromId:e.studentFrom.id,studentClass:(0,pr.jsx)(gm,{label:ou(e,"studentFrom.currentClass.label")}),studentPair:(0,pr.jsx)(xk,{mandatory:e.mandatory,pair:e.pair}),studentTo:`${e.teacherTo.firstName} ${e.teacherTo.lastName}`,personToName:ZE(e.teacherTo),personTo:{id:e.teacherTo.id,isTeacher:!0},studentToClass:(0,pr.jsx)("span",{children:"Teacher"}),studentRequestImportance:!0===e.mandatory?"Mandatory":"Important",studentDescription:e.description,studentRequestInputBy:e.inputByName||"",studentRequestInputOn:qh(e.insertedAt)||"",studentRequestStatus:e.status&&"invalid"===e.status.status?Nj(e.status):t.includes(e.constraintId)?(0,pr.jsx)("span",{className:"color-requests-mandatory u-font-weight-medium",children:"Request Not Met"}):"-",constraintId:e.constraintId,rowClassName:e.adminOnly?"bg-admin":"",studentFromLastName:e.studentFrom.lastName,personToLastName:e.teacherTo.lastName,studentFromGrade:ou(e,"studentFrom.currentGrade.id"),adminOnly:e.adminOnly}),null)));const I=(0,pr.jsx)(Sk,{onChange:this.onFilterChange,value:s,currentSchoolGrades:n}),R=e=>e&&e.props?e.props.label:e;O=O.filter((e=>"all-grades"===s?-1!==Object.values(e).map((e=>R(e))).join().toLowerCase().indexOf(u.toLowerCase()):-1!==Object.values(e).map((e=>R(e))).join().toLowerCase().indexOf(u.toLowerCase())&&(e.studentFromGrade===s||e.studentToGrade===s))),O.sort(((e,t)=>{let n=e.studentFromLastName.localeCompare(t.studentFromLastName);return 0===n&&(n=e.personToLastName.localeCompare(t.personToLastName)),n}));const A=O.length;O.length||O.push({studentName:"",studentClass:"",studentPair:"",studentTo:"",studentToClass:"",studentRequestImportance:"",studentDescription:"",studentRequestInputBy:""});const M=uw(),P=this.context,D=e=>{let t,n;return"student_requests"===e?(t=()=>this.setState({showExportStudentRequests:!1}),n=()=>this.setState({errors:{exportStudentRequests:"Error exporting student requests"}})):"teacher_requests"===e&&(t=()=>this.setState({showExportTeacherRequests:!1}),n=()=>this.setState({errors:{exportTeacherRequests:"Error exporting teacher requests"}})),async r=>{const[o,i]=await zw(e,M,P,!this.props.settings.adminOnlyRequests,r);o.ok?t():n()}},F=[{onClick:()=>this.setState({showExportStudentRequests:!0}),text:"Export Student Requests",icon:"fa-download"},{onClick:()=>this.setState({showExportTeacherRequests:!0}),text:"Export Teacher Requests",icon:"fa-download"},{onClick:()=>this.setState({showDeleteAllRequestConstraints:!0}),text:"Remove Requests",icon:"fa-trash"}];return(0,pr.jsxs)("div",{className:"c-requests",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fg,{children:(0,pr.jsx)(Fh,{searchPlaceholder:"Search Requests...",onAddClick:()=>this.addClick(),onSearchChange:this.searchChange,searchValue:u,addText:"Add Request",adminMode:_,filterComponent:I,additionalActions:F})}),(0,pr.jsx)(Fg,{children:(0,pr.jsx)("div",{className:"requests-table",children:(0,pr.jsx)(uN,{tableName:"requests",sections:KE,headers:XE,data:O,rowCount:!0,stickyHeaderCount:1,leftStickyColumnCount:0,borderWidth:"inherit",rowClick:this.rowClick})})}),"all-grades"!==s||""!==u?(0,pr.jsx)("div",{className:"u-total-text my-2 ml-2",children:`Total - ${A}/${T} Requests`}):(0,pr.jsx)("div",{className:"u-total-text my-2 ml-2",children:`Total - ${T} Requests`})]}),(0,pr.jsx)(YE,{edit:su(p),addSuccessful:c,loading:a,errors:h,modal:l,closeRequestModal:this.closeRequestModal,toggleDeleteModal:this.toggleDeleteModal,adminMode:_,saveRequest:this.saveRequest,students:r,studentsToExclude:k,teachers:o,studentFrom:f,studentFromName:m,personTo:g,personToName:v,inputGeneric:this.inputGeneric,inputChangeStudentFrom:this.inputChangeStudentFrom,inputChangePersonTo:this.inputChangePersonTo,mandatory:b,pair:x,description:y,adminOnly:w}),(0,pr.jsx)(Ck,{isOpen:d,toggle:this.toggleDeleteModal,loading:a,heading:"Delete Request?",text:"Are you sure you want to delete this request?",buttonText:"Yes, delete",onButtonClick:this.deleteRequest,error:h.delete}),S&&(0,pr.jsx)(O_,{schoolId:uw(),toggle:()=>this.setState({showDeleteAllRequestConstraints:!1}),title:"Remove Requests",description:"This function removes the Requests for students in the Current Grade/s you have selected.  Students in Current Grade/s not selected will not be affected.",cautionHeading:"Remove Requests",cautionText:"You can not 'undo' this operation. Are you sure you would like to permanently remove all Requests by grade?",removeButtonText:"Remove Requests",cautionButtonText:"Yes, Proceed",successMessage:"Requests by grade have been removed.",errorMessage:"Could not remove data",refetchQueries:[{query:Nw,variables:{adminOnly:i.adminOnlyRequests,schoolId:uw()}}],removeByGradesMutation:Rw}),C&&(0,pr.jsx)(u_,{schoolId:uw(),toggle:()=>this.setState({showExportStudentRequests:!1,errors:{}}),title:"Export Student Requests by Current Grade",description:"This function exports student requests based on the Current Grade/s that you select below.",primaryButtonText:"Export Student Requests",exportFunction:D("student_requests"),errorMessage:this.state.errors.exportStudentRequests}),j&&(0,pr.jsx)(u_,{schoolId:uw(),toggle:()=>this.setState({showExportTeacherRequests:!1,errors:{}}),title:"Export Teacher Requests by Current Grade",description:"This function exports teacher requests based on the Current Grade/s that you select below.",primaryButtonText:"Export Teacher Requests",exportFunction:D("teacher_requests"),errorMessage:this.state.errors.exportTeacherRequests})]})}}tT.contextType=tu;const nT=e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error with your uploaded file. Please try uploading again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]}),rT=({navigate:e,uploadJob:t,updateBulkUploadJob:n,isUpdatingJob:r,cancelUploadJob:i})=>{const s=o.useMemo((()=>{var e,n;const r={first_name:["first name","first_name"],last_name:["last name","last_name","surname"],email:["email"]},o=(null===t||void 0===t||null===(e=t.fileSummary)||void 0===e||null===(n=e.headers)||void 0===n?void 0:n.length)||0,i=Math.max(o-Object.keys(r).length,0),s=Object.fromEntries(Array(i).fill().map(((e,t)=>{const n=t+1;return[`current_class_${n}`,1===n?["current class",`current class ${n}`,`current_class_${n}`]:[`current class ${n}`,`current_class_${n}`]]})));return{...r,...s}}),[t]),[a,l]=o.useState(!1),c=o.useMemo((()=>t&&t.fileSummary?t.fileSummary.headers:[]),[t]),[u,d]=o.useState((()=>Object.entries(s).reduce(((e,[t,n])=>{const r=c.find((e=>{const t=e.toLowerCase(),r=e.replace(/\s/g,"");return n.includes(e)||n.includes(t)||n.includes(r)}));return r?{...e,[t]:r}:e}),{}))),h=o.useMemo((()=>({first_name:"First Name ID",last_name:"Last Name ID",email:"Email"})),[]),p=Math.max(c.length-Object.keys(h).length,0),f=Object.fromEntries(Array(p).fill().map(((e,t)=>[`current_class_${t+1}`,`Current Class ${t+1}`]))),m=o.useMemo((()=>{const e=Object.keys(u),t=Object.keys(h);return e.length>=t.length&&t.every((t=>e.includes(t)))}),[u,h]),g=o.useCallback((()=>{const t=JSON.stringify({mapped_columns:u});return n({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&e("/Teachers/MapClassLabels",{state:{jobId:t.data.updateBulkUploadJob.id}})})).catch((()=>{}))}),[n,e,u]),v=o.useCallback((()=>i().then((()=>{e("/Teachers")}))),[i,e]),y=o.useCallback((()=>{l((e=>!e))}),[]),b=o.useCallback((({selectedOption:e,mapTo:t})=>{d((n=>({...n,[t]:e})))}),[]),x=o.useCallback((e=>{d((t=>(delete t[e],{...t})))}),[]);return(0,pr.jsx)(Vk,{importType:"Teachers",handleToggleHelpModal:y,showHelpModal:a,uploadJob:t,requiredColumns:h,optionalColumns:f,mappedColumns:u,options:c,handleColumnMapped:b,handleColumnClear:x,isMappingComplete:m,isUpdatingJob:r,handleContinue:g,handleCancel:v})},oT={body:e=>(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:'Sorry, there was an error importing your data. Please try again and if the error persists, please contact us by clicking "Need help importing?" with the following error details:'}),(0,pr.jsx)("pre",{children:e.message})]})},iT={"duplicate-column-value":{body:({details:e})=>{const t=e.column_key,n=Object.keys(e.rows[0]).find((e=>e!==t)),r=e.rows.map((e=>`${e[t]},${e[n]}`)).join("\n");return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{children:"The following rows were duplicated in your file. Please double check and remove them from the CSV file."}),(0,pr.jsx)("div",{children:(0,pr.jsx)("pre",{className:"mb-0",children:r})})]})}},"file-has-no-data":{body:()=>(0,pr.jsx)("div",{children:(0,pr.jsx)("p",{children:"There is no data to import. Please double check your class label matchings and try again."})})}},sT=n.p+"static/media/teachers_template.0a782e83d290af2add71.csv",aT=({toggleTeacherModal:e})=>{const[t,n]=o.useState(void 0),[r,i]=o.useState(!1),[s,{loading:a}]=pE(),l=vl(),c=e=>{n(e.target.files[0])},[u,d]=o.useState(),[h,p,f]=u&&u.graphQLErrors.length>0?[u.graphQLErrors[0].message,u.graphQLErrors[0].details,u.graphQLErrors[0].job_id]:[void 0,void 0,void 0],m=o.useCallback((()=>s({variables:{file:t,schoolId:uw(),type:"TEACHER"}}).then((e=>{if(e.data&&e.data.createBulkUploadJob){const t=e.data.createBulkUploadJob.id;l("/Teachers/MapColumns",{state:{jobId:t}})}})).catch((e=>{d(e)}))),[s,t,l]),g=()=>l("/Teachers");return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Teachers"}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:()=>i(!0),children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2 pl-2"}),"Watch Video"]})})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),t?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-75 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:t.name}),(0,pr.jsx)("button",{onClick:m,disabled:a,className:"btn btn-primary m-2",children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",onChange:c,hidden:!0}),(0,pr.jsx)("label",{htmlFor:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:g,children:"< Back to Teachers page"}),(0,pr.jsxs)(gN,{className:"my-3",heading:"Important Tips",children:["Please ensure your file contains column headings.",(0,pr.jsx)("p",{className:"mt-2 mb-0 text-uppercase",style:{fonSize:"12px"},children:"Required Column Headers"}),(0,pr.jsx)("pre",{className:"mb-2",children:"First Name,Surname,Email,Current Class 1".replaceAll(",",", ")}),"If you are using a Mac, please save the file format as CSV UTF-8 (.csv)"]}),u&&(0,pr.jsx)(Jj,{isOpen:!0,title:bC[h].title,type:"Teachers",jobId:f,toggle:()=>d(void 0),actions:bC[h].actions(),children:bC[h].body("Teachers",p)})]})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"my-2 text-center",children:"1. Download and complete the teachers template"}),(0,pr.jsx)("p",{className:"py-2 text-center",children:(0,pr.jsx)("a",{href:sT,download:"teachers_template.csv",children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary",children:"Download Template"})})}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"2. Then upload the completed file"}),(0,pr.jsx)("input",{type:"file",id:"teacherCSV",name:"teacherCSV",onChange:c,hidden:!0}),(0,pr.jsx)("p",{className:"py-2 mb-0 text-center",children:(0,pr.jsx)("a",{href:"#",children:(0,pr.jsx)(Qg,{htmlFor:"teacherCSV",className:"btn-200-width btn-secondary",children:"Upload Completed File"})})}),e?(0,pr.jsxs)("span",{className:"m-2",children:["\xa0 Alternatively, you can also\xa0",(0,pr.jsx)("span",{className:"text-primary cursor-pointer",onClick:e,children:"Add Teachers Manually"})]}):(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:g,children:"< Back to Teachers page"})]})]})})})}),r&&(0,pr.jsx)(vN,{toggle:()=>i(!1),videoUrl:"https://player.vimeo.com/video/853258945?h=0381d55f76",title:"Import Teachers"})]})};class lT extends o.Component{constructor(...e){super(...e),this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error)}}render(){const e=uw();return(0,pr.jsx)(Pw,{schoolId:e,userRefetchQueries:[{query:$e,variables:{schoolId:e,filterRole:iS}},{query:ht,variables:{schoolId:e}},{query:Le,variables:{schoolId:e}}],...this.props})}}const cT=ng()(eg(O,{props:({data:{myprofile:e}})=>({myprofile:e})}),eg($e,{options:()=>({variables:{schoolId:uw(),filterRole:iS}}),props:({data:{users:e,loading:t,error:n}})=>({loadingAdmins:t,error:n,users:e})}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{schoolSettings:e,loading:t}})=>({loadingPreferences:t,schoolSettings:e})}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0}}),props:({data:{currentSchoolGrades:e,loading:t}})=>({loadingSchoolGrades:t,currentSchoolGrades:e})}),eg(Le,{options:()=>({variables:{schoolId:uw()},errorPolicy:"all"}),props:({data:{school:e,loading:t}})=>({loadingSchool:t,school:e})}),eg(ht,{options:()=>({variables:{schoolId:uw()}}),props:({data:{invitationsForSchool:e,loading:t}})=>({loadingInvitations:t,invitations:e})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(qe,{name:"updateSchoolSettingMutation"}),eg(ut,{name:"bulkUploadMiscMutation"}),eg(et,{name:"updateSettings"}),eg(ft,{name:"revokeSchoolInvitationMutation"}),eg(Ye,{name:"removeUserFromSchoolsMutation"}),eg(dt,{name:"createOrUpdateSisConfigPowerschoolMutation",options:()=>({refetchQueries:[{query:Le,variables:{schoolId:uw()}}]})}))(lj(lT)),uT=({toggle:e,school:t})=>{const[n,r]=(0,o.useState)(t.billingEmailAddresses?$h(t.billingEmailAddresses.split(";")):[""]),[i,{error:s,loading:a}]=Km(Qe,{onError:()=>{},refetchQueries:[{query:TC,variables:{schoolId:t.id}}]}),l=$h(n),c=!l.every((e=>lC(e)));return(0,pr.jsx)(bN,{toggle:e,loading:a,inputs:n,setInput:r,onSave:()=>{const n={school:{id:t.id,billingEmailAddresses:l.join("; ")}};i({variables:n}).then((()=>{e()}))},saveDisabled:c,saveErrors:s,title:"Edit Billing Email Addresses",description:"Add the email address or addresses to send billing related correspondence.",addButtonText:"Add another email"})},dT=()=>{const{data:e,loading:t}=Gm(Le,{variables:{schoolId:uw()},errorPolicy:"all"}),[n,r]=(0,o.useState)(!1),i=()=>r((e=>!e)),s=e&&e.school;return(0,pr.jsxs)("div",{className:"c-account-details",children:[(0,pr.jsx)("h2",{className:"mb-3 u-blue-primary",children:"Billing Email Addresses"}),t?(0,pr.jsx)("div",{className:"position-relative",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{className:"my-1 ml-3",children:[(0,pr.jsx)("div",{className:"d-flex flex-column justify-content-start",children:(0,pr.jsx)("div",{children:s.billingEmailAddresses})}),(0,pr.jsx)("a",{className:"c-account-details__edit text-primary",onClick:i,children:s.billingEmailAddresses?"Edit":"Add"})]}),n&&(0,pr.jsx)(uT,{toggle:i,school:s})]})]})},hT=e=>(0,pr.jsx)("div",{className:"c-account-details__referal",children:(0,pr.jsxs)("div",{className:"c-account-details__referal__left",children:[(0,pr.jsx)("h3",{className:"u-bold u-text-18 text-uppercase",children:e.heading}),(0,pr.jsx)("p",{className:"mb-0",children:e.message}),e.button&&(0,pr.jsx)("a",{href:e.button.link,target:"blank",className:"mt-2 btn btn-primary",children:e.button.title})]})});class pT extends o.Component{constructor(...e){super(...e),this.increasePriority=e=>{if(0===e)return;const{characteristicResponses:t,onCharacteristicResponsesChange:n}=this.props;n(fw(t,e,e-1))},this.decreasePriority=e=>{const{characteristicResponses:t,onCharacteristicResponsesChange:n}=this.props;mw(t,e)||n(fw(t,e,e+1))},this.onColourChange=(e,t)=>{const{characteristicResponses:n,onCharacteristicResponsesChange:r}=this.props,o=Array.from(n);o[e]={...n[e],colour:t},r(o)},this.addResponse=()=>{const{characteristicResponses:e,onCharacteristicResponsesChange:t}=this.props,n=e.map((({colour:e})=>e));t([...e,{description:"",label:"",colour:this.uniqueColour(n,ej)}])},this.removeResponse=e=>{const{characteristicResponses:t,onCharacteristicResponsesChange:n}=this.props,r=Array.from(t);r.splice(e,1),n(r)},this.onResponseChange=(e,t)=>{const{characteristicResponses:n,onCharacteristicResponsesChange:r}=this.props,o=Array.from(n);o.splice(t,1,{...o[t],[e.target.name]:e.target.value}),r(o)},this.uniqueColour=(e,t)=>t.find((t=>!e.includes(t)))}render(){const{characteristicResponses:e,displayColourPicker:t,toggleColourPicker:n}=this.props;return(0,pr.jsxs)("div",{children:[e.map(((e,r,o)=>(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsx)("div",{className:"c-chars__body-item",children:(0,pr.jsx)("div",{className:"d-flex align-items-center m-3",children:(0,pr.jsx)(UD,{last:mw(o,r),index:r,onDecreasePriorityClick:()=>this.decreasePriority(r),onIncreasePriorityClick:()=>this.increasePriority(r)})})}),(0,pr.jsx)(BD,{className:"align-self-center",colour:e.colour,displayColourPicker:t===r,onChange:e=>this.onColourChange(r,e),onToggleColourPicker:()=>n(r)}),(0,pr.jsx)("input",{className:"c-chars__input mr-2",value:e.label,type:"text",name:"label",onChange:e=>{this.onResponseChange(e,r)}}),(0,pr.jsx)("input",{className:"c-chars__input",placeholder:"Add description (optional)",type:"text",name:"description",value:null===e.description?"":e.description,onChange:e=>{this.onResponseChange(e,r)}}),(0,pr.jsx)("i",{className:"fa fa-times student-upload-list__item__icon student-upload-list__item__icon--times m-2",onClick:()=>this.removeResponse(r)})]},r))),(0,pr.jsx)(Lh,{text:"Add response",onClick:this.addResponse})]})}}const fT=({toggle:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{title:"Gender already included",toggle:e,className:"p-3"}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h2",{children:"Why can\u2019t I add Gender here?"}),(0,pr.jsx)("p",{children:"Gender is a default Characteristic when you import your students and therefore does not need to be added here."}),(0,pr.jsx)("h2",{children:"How do I check if I included the Gender of each student when I imported them?"}),(0,pr.jsx)("p",{children:"1) Click on the Students tab"}),(0,pr.jsx)("p",{children:"2) Select a grade using the Filter (towards the top right)"}),(0,pr.jsx)("p",{children:"3) Check that 4th column has a Gender for students"}),(0,pr.jsx)("h2",{children:"What if there is no Gender for students?"}),(0,pr.jsx)("p",{children:"Repeat the process of importing Students using our template (covered in the Step 1 video), ensuring that there is a gender for each student."}),(0,pr.jsx)("p",{children:"This process will not delete information, or duplicate students, if you use the same student ID."})]})]})}),(0,pr.jsx)(Yj,{children:(0,pr.jsx)(ld,{color:"link",onClick:e,children:"Close"})})]}),mT=({toggle:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{title:"Use Current Class field for Feeder School",toggle:e,className:"p-3"}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h2",{children:"What is the Current Class field?"}),(0,pr.jsx)("p",{children:"Current Class is a default field in Class Solver and is bulk imported in Step 1.\xa0 This field is also used to define the students that each teacher will complete a survey for (e.g. Mrs Smith completes a survey on the 1A students, as she is currently teaching 1A)."}),(0,pr.jsx)("h2",{children:"Why should I put Feeder Schools in the Current Class field?"}),(0,pr.jsx)("p",{children:"If you are sending surveys to feeder schools, you only want to send a survey of the students at their school.\xa0 So, by using the Current Class field, you will be able to define which feeder school gets which students (e.g. the email recipient at Smithville Primary will only get a survey on the Smithville Primary students)."}),(0,pr.jsx)("h2",{children:"How do I put the Feeder School for each student in the Current Class field?"}),(0,pr.jsx)("p",{children:"Using the Student template, reimport the list of your students, and include the Feeder School in the Current Class column."}),(0,pr.jsx)("p",{children:"This process will not delete information, or duplicate students, if you use the same student ID."}),(0,pr.jsxs)("p",{children:["If you have any hesitation or are unsure about this, please contact us at"," ",(0,pr.jsx)("a",{className:"u-underline u-font-weight-medium u-blue-mid",href:"mailto: support@classsolver.com",children:"support@classsolver.com"}),"."]})]})]})}),(0,pr.jsx)(Yj,{children:(0,pr.jsx)(ld,{color:"link",onClick:e,children:"Close"})})]}),gT=({toggle:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{title:"Setting Friendship Nominations",toggle:e,className:"p-3"}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h2",{children:"Why don\u2019t I add \u201cfriends\u201d as a Characteristic?"}),(0,pr.jsxs)("p",{children:["The Characteristics settings is where you add information used for "," ",(0,pr.jsx)("b",{children:"balancing"})," "," your class lists (not friends).\xa0 This includes information that describes a student, e.g. academic, behavior, social/emotional."]}),(0,pr.jsx)("h2",{children:"Where do we add friends to Class Solver?"}),(0,pr.jsxs)("p",{children:["The default number of friends is five.\xa0 You can change (or check) this by clicking on "," ",(0,pr.jsx)("b",{children:"Settings"})," ","and scrolling down to "," ",(0,pr.jsx)("b",{children:"Friendship Preferences"}),"."]})]})]})}),(0,pr.jsx)(Yj,{children:(0,pr.jsx)(ld,{color:"link",onClick:e,children:"Close"})})]});class vT extends o.Component{constructor(...e){super(...e),this.state={showGenderMoreInfo:!1,showFeederSchoolMoreInfo:!1,showFriendMoreInfo:!1},this.displayColourPicker=()=>{const{index:e,displayColourPicker:t}=this.props;if(Array.isArray(t)&&t[0]===e)return t[1]},this.toggleGenderMoreInfoModal=()=>{this.setState({showGenderMoreInfo:!this.state.showGenderMoreInfo})},this.toggleFeederSchoolMoreInfoModal=()=>{this.setState({showFeederSchoolMoreInfo:!this.state.showFeederSchoolMoreInfo})},this.toggleFriendMoreInfoModal=()=>{this.setState({showFriendMoreInfo:!this.state.showFriendMoreInfo})}}render(){const{index:e,last:t,characteristic:n,onCharacteristicChange:r,onIncreasePriorityClick:o,onDecreasePriorityClick:i,onDeleteCharacteristicClick:s,toggleColourPicker:a,toggleAdminOnly:l,toggleTagOnly:c}=this.props,{showGenderMoreInfo:u,showFeederSchoolMoreInfo:d,showFriendMoreInfo:h}=this.state,p=(e=>{const t=e.toLowerCase();return"gender"===t||"sex"===t})(n.name),f=(e=>{const t=e.toLowerCase();return t.includes("feeder")||t.includes("school")})(n.name),m=n.name.toLowerCase().includes("friend");return(0,pr.jsxs)("div",{className:"c-chars__body row pb-5",children:[(0,pr.jsx)("i",{className:"fa fa-trash c-chars__delete-icon",onClick:s}),(0,pr.jsx)("div",{className:"c-chars__body-item col-md-1 pr-0",children:(0,pr.jsxs)("div",{className:"d-flex align-items-center mt-3",children:[(0,pr.jsx)("div",{className:"c-chars__icon",children:n.priority}),(0,pr.jsx)(UD,{index:e,last:t,onDecreasePriorityClick:i,onIncreasePriorityClick:o})]})}),(0,pr.jsxs)(Gg,{className:"c-chars__body-item col-md-3",children:[(0,pr.jsx)(Qg,{children:"Characteristic Name"}),(0,pr.jsx)(Zg,{placeholder:"Characteristic name",type:"text",name:"name",onChange:e=>{r({...n,name:e.target.value})},value:n.name}),(0,pr.jsx)(Nf,{id:`characteristic-tag-only-${e}`,badgeType:n.tag_only?"tag-only":"",onClick:c,labelText:"Tag Only",tooltipHeader:"Use this Characteristic as a Tag Only",tooltipBody:"Turn this on if you would like to use this Characteristic as a tag only, rather than for balancing your classes."}),(0,pr.jsx)(Nf,{id:`characteristic-admin-only-${e}`,badgeType:n.sensitive?"admin-only":"",onClick:l,labelText:"Admin Only",tooltipHeader:"Allow teachers to see this Characteristic",tooltipBody:"Turn this on if you don't want teachers to see this Characteristic in surveys or when sharing class lists."}),p&&(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("p",{className:"mx-2 text-danger",children:["Gender is already included by default and does not need to be added here."," ",(0,pr.jsx)("span",{className:"cursor-pointer u-underline",onClick:this.toggleGenderMoreInfoModal,children:"Learn more"})]}),u&&(0,pr.jsx)(fT,{toggle:this.toggleGenderMoreInfoModal})]}),f&&(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("p",{className:"mx-2 text-danger",children:["If you would like to send feeder school surveys please use the Current Class field."," ",(0,pr.jsx)("span",{className:"cursor-pointer u-underline",onClick:this.toggleFeederSchoolMoreInfoModal,children:"Learn more"})]}),d&&(0,pr.jsx)(mT,{toggle:this.toggleFeederSchoolMoreInfoModal})]}),m&&(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("p",{className:"mx-2 text-danger",children:["\u2018Friends\u2019 are not captured here as a Characteristic.\xa0 Please go to the Surveys Settings."," ",(0,pr.jsx)("span",{className:"cursor-pointer u-underline",onClick:this.toggleFriendMoreInfoModal,children:"Learn more"})]}),h&&(0,pr.jsx)(gT,{toggle:this.toggleFriendMoreInfoModal})]})]}),(0,pr.jsx)("div",{className:"c-chars__body-item col-md d-flex",children:(0,pr.jsxs)("div",{className:"w-100",children:[(0,pr.jsx)("div",{className:"w-100 d-flex justify-content-between",children:(0,pr.jsx)(Qg,{children:"Response Labels"})}),(0,pr.jsx)("div",{children:(0,pr.jsx)("div",{className:"d-flex flex-column",children:(0,pr.jsx)(pT,{characteristicResponses:n.characteristicResponses,onCharacteristicResponsesChange:e=>{r({...n,characteristicResponses:e})},displayColourPicker:this.displayColourPicker(),toggleColourPicker:t=>{a([e,t])}})})})]})})]})}}class yT extends o.Component{constructor(){super(),this.toggleColourPicker=e=>{this.setState((t=>({displayColourPicker:gw(e,t.displayColourPicker)?null:e})))},this.resetPriorities=e=>e.map(((e,t)=>({...e,priority:t+1}))),this.addCharacteristic=()=>{const{characteristics:e,onCharacteristicsChange:t}=this.props,n=ej[e.length%XC.length];t(this.resetPriorities([...e,{name:"",characteristicResponses:[{label:"Yes",colour:n},{label:"No (Neutral)"}]}]))},this.deleteCharacteristic=e=>{const{characteristics:t,onCharacteristicsChange:n}=this.props,r=Array.from(t);r.splice(e,1),n(this.resetPriorities(r))},this.onCharacteristicChange=(e,t)=>{const{characteristics:n,onCharacteristicsChange:r}=this.props,o=Array.from(n);o[e]=t,r(o)},this.increasePriority=e=>{if(0===e)return;const{characteristics:t,onCharacteristicsChange:n}=this.props;n(this.resetPriorities(fw(t,e,e-1)))},this.decreasePriority=e=>{const{characteristics:t,onCharacteristicsChange:n}=this.props;mw(t,e)||n(this.resetPriorities(fw(t,e,e+1)))},this.toggleAdminOnly=e=>{const{characteristics:t,onCharacteristicsChange:n}=this.props,r=Array.from(t),o=r[e];r[e]={...o,sensitive:!o.sensitive},n(r)},this.toggleTagOnly=e=>{const{characteristics:t,onCharacteristicsChange:n}=this.props,r=Array.from(t),o=r[e];r[e]={...o,tag_only:!o.tag_only},n(r)},this.state={displayColourPicker:null},this.listBottomRef=(0,o.createRef)()}render(){const{characteristics:e}=this.props,{displayColourPicker:t}=this.state;return(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-5 mb-3",children:[(0,pr.jsx)(Lh,{text:"Add characteristic",onClick:()=>{this.addCharacteristic(),this.listBottomRef.current.scrollIntoView()}}),(0,pr.jsx)("div",{className:"c-chars mt-3",children:(0,pr.jsxs)("div",{className:"c-chars__header pb-2 row",children:[(0,pr.jsx)("div",{className:"c-chars__header-item col-md-1",children:(0,pr.jsx)("div",{children:"Priority"})}),(0,pr.jsx)("div",{className:"c-chars__header-item col-md-3",children:(0,pr.jsx)("div",{children:"Characteristic"})}),(0,pr.jsx)("div",{className:"c-chars__header-item col-md-8",children:(0,pr.jsx)("div",{children:"Responses"})})]})}),(0,pr.jsx)("div",{className:"mb-3",children:e.map(((e,n)=>(0,pr.jsx)(vT,{index:n,characteristic:e,onCharacteristicChange:e=>this.onCharacteristicChange(n,e),onIncreasePriorityClick:()=>this.increasePriority(n),onDecreasePriorityClick:()=>this.decreasePriority(n),onDeleteCharacteristicClick:()=>{this.deleteCharacteristic(n)},displayColourPicker:t,toggleColourPicker:this.toggleColourPicker,toggleAdminOnly:()=>this.toggleAdminOnly(n),toggleTagOnly:()=>this.toggleTagOnly(n)},n)))}),(0,pr.jsx)("div",{ref:this.listBottomRef}),(0,pr.jsx)(Lh,{text:"Add characteristic",onClick:()=>{this.addCharacteristic(),this.listBottomRef.current.scrollIntoView()}})]})}}const bT=({characteristics:e,updateSchoolCharacteristicsMutation:t,refetchCharacteristics:n,navFrom:r})=>{const i=vl(),[s,a]=(0,o.useState)(e),[l,c]=(0,o.useState)({}),[u,d]=(0,o.useState)(!1),[h,p]=(0,o.useState)(!1),[f,m]=(0,o.useState)(!1),[g,v]=(0,o.useState)(!1),y=()=>{d(!u)},b=()=>{p(!h)},x=()=>{i(r||"/AccountSettings")},w=()=>{!((e,t)=>{const n=nj(e),r=nj(t);return Object.entries(n).every((([e,t])=>{const n=r[e];return n&&t.every((e=>n.includes(e)))}))})(e,s)?b():S()},S=()=>{m(!0);const e=s.map((e=>{let t=[];return e.characteristicResponses.length>0&&(t=e.characteristicResponses.map((e=>({id:e.id,label:e.label,description:e.description,colour:e.colour})))),{id:e.id,name:e.name,sensitive:e.sensitive,tag_only:e.tag_only,characteristicResponses:t}}));t({variables:{schoolCharacteristics:e,schoolId:uw()},refetchQueries:n}).then((()=>{m(!1),v(!0),x()})).catch((()=>{m(!1),p(!1),c({mutation:"There was an error saving characteristic settings"})}))};if(f)return(0,pr.jsx)(qk,{});let C;s.forEach((e=>{if(""===e.name)C="Characteristic Name Cannot be Blank";else{const t=e.characteristicResponses.map((e=>e.label.trim()));e.characteristicResponses.some((e=>""===e.label))?C="Characteristic Response Label Cannot be Blank":vw(t)&&(C="Characteristic Responses cannot have duplicate labels")}})),vw(s.map((e=>e.name.trim())))&&(C="Characteristics cannot have duplicate names"),s.sort(((e,t)=>e.priority-t.priority));const j=!iu(s,e);return(0,pr.jsxs)("div",{className:"container o-component",children:[l.mutation&&(0,pr.jsx)("div",{className:"mb-4",children:(0,pr.jsx)($k,{text:l.mutation})}),(0,pr.jsxs)("div",{className:"mt-5 mb-5 u-blue-primary",style:{display:"flex",justifyContent:"space-between"},children:[(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsx)("h2",{className:"m-0",children:"Characteristics & Responses"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:y,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Watch Video"]})]}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-end",children:[(0,pr.jsx)(Ef,{buttonText:"Save Settings",onCancelClick:x,onButtonClick:w,disabled:C}),(0,pr.jsx)($k,{text:C}),(0,pr.jsx)($k,{text:l.mutation})]})]}),(0,pr.jsx)(yT,{characteristics:s,onCharacteristicsChange:a}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-end w-100",children:[(0,pr.jsx)(Ef,{buttonText:"Save Settings",onCancelClick:x,onButtonClick:w,disabled:C}),(0,pr.jsx)($k,{text:C}),(0,pr.jsx)($k,{text:l.mutation})]}),h&&(0,pr.jsx)(GD,{isOpen:!0,toggle:b,heading:"Change Settings?",text:"If survey information has been entered by teachers, Selecting Save Settings will delete any responses for ALL students for the Characteristics that you are changing. ",buttonText:"Save Settings",onButtonClick:()=>S()}),j&&!g&&(0,pr.jsx)(yN,{message:"Characteristic settings have not been saved, are you sure you want to leave?"}),u&&(0,pr.jsx)(vN,{toggle:y,videoUrl:"https://player.vimeo.com/video/853261432?h=b5dab326ca",title:"Instruction Step 1"})]})};var xT=n(7514),wT={},ST=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(wT[o])return wT[o];var i=function(e,t,n,r){if("undefined"===typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null}(e,t,n,r);return wT[o]=i,i},CT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jT=function(e){var t=e.white,n=e.grey,r=e.size,i=e.renderers,s=e.borderRadius,a=e.boxShadow,l=e.children,c=(0,xT.Ay)({default:{grid:{borderRadius:s,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+ST(t,n,r,i.canvas)+") center left"}}});return(0,o.isValidElement)(l)?o.cloneElement(l,CT({},l.props,{style:CT({},l.props.style,c.grid)})):o.createElement("div",{style:c.grid})};jT.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};const _T=jT;var kT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NT=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function ET(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var TT=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=ET(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=function(e,t,n,r,o){var i=o.clientWidth,s=o.clientHeight,a="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(o.getBoundingClientRect().left+window.pageXOffset),u=l-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=u<0?0:u>s?1:Math.round(100*u/s)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var h=void 0;if(r!==(h=c<0?0:c>i?1:Math.round(100*c/i)/100))return{h:t.h,s:t.s,l:t.l,a:h,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},ET(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),NT(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,xT.Ay)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:kT({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return o.createElement("div",{style:n.alpha},o.createElement("div",{style:n.checkboard},o.createElement(_T,{renderers:this.props.renderers})),o.createElement("div",{style:n.gradient}),o.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.createElement("div",{style:n.pointer},this.props.pointer?o.createElement(this.props.pointer,this.props):o.createElement("div",{style:n.slider}))))}}]),t}(o.PureComponent||o.Component);const OT=TT;var IT=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var RT=[38,40],AT=1,MT=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,RT.indexOf(t)>-1)){var o=n.getArrowOffset(),i=38===e.keyCode?r+o:r-o;n.setUpdatedValue(i,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+AT++,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),IT(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,xT.Ay)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.createElement("div",{style:t.wrap},o.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(o.PureComponent||o.Component);const PT=MT;var DT=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function FT(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var LT=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=FT(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=function(e,t,n,r){var o=r.clientWidth,i=r.clientHeight,s="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,a="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(r.getBoundingClientRect().left+window.pageXOffset),c=a-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(u=c<0?359:c>i?0:360*(-100*c/i+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=l<0?0:l>o?359:100*l/o*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},FT(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),DT(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,xT.Ay)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return o.createElement("div",{style:r.hue},o.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.createElement("style",null,"\n            .hue-horizontal {\n              background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n                33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n                17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n\n            .hue-vertical {\n              background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n                #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n                #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n          "),o.createElement("div",{style:r.pointer},this.props.pointer?o.createElement(this.props.pointer,this.props):o.createElement("div",{style:r.slider}))))}}]),t}(o.PureComponent||o.Component);const BT=LT;const UT=function(){this.__data__=[],this.size=0};const GT=function(e,t){return e===t||e!==e&&t!==t};const $T=function(e,t){for(var n=e.length;n--;)if(GT(e[n][0],t))return n;return-1};var qT=Array.prototype.splice;const zT=function(e){var t=this.__data__,n=$T(t,e);return!(n<0)&&(n==t.length-1?t.pop():qT.call(t,n,1),--this.size,!0)};const VT=function(e){var t=this.__data__,n=$T(t,e);return n<0?void 0:t[n][1]};const HT=function(e){return $T(this.__data__,e)>-1};const WT=function(e,t){var n=this.__data__,r=$T(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function YT(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YT.prototype.clear=UT,YT.prototype.delete=zT,YT.prototype.get=VT,YT.prototype.has=HT,YT.prototype.set=WT;const QT=YT;const JT=function(){this.__data__=new QT,this.size=0};const KT=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const XT=function(e){return this.__data__.get(e)};const ZT=function(e){return this.__data__.has(e)};const eO="object"==typeof global&&global&&global.Object===Object&&global;var tO="object"==typeof self&&self&&self.Object===Object&&self;const nO=eO||tO||Function("return this")();const rO=nO.Symbol;var oO=Object.prototype,iO=oO.hasOwnProperty,sO=oO.toString,aO=rO?rO.toStringTag:void 0;const lO=function(e){var t=iO.call(e,aO),n=e[aO];try{e[aO]=void 0;var r=!0}catch(BK){}var o=sO.call(e);return r&&(t?e[aO]=n:delete e[aO]),o};var cO=Object.prototype.toString;const uO=function(e){return cO.call(e)};var dO=rO?rO.toStringTag:void 0;const hO=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":dO&&dO in Object(e)?lO(e):uO(e)};const pO=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const fO=function(e){if(!pO(e))return!1;var t=hO(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const mO=nO["__core-js_shared__"];var gO=function(){var e=/[^.]+$/.exec(mO&&mO.keys&&mO.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const vO=function(e){return!!gO&&gO in e};var yO=Function.prototype.toString;const bO=function(e){if(null!=e){try{return yO.call(e)}catch(BK){}try{return e+""}catch(BK){}}return""};var xO=/^\[object .+?Constructor\]$/,wO=Function.prototype,SO=Object.prototype,CO=wO.toString,jO=SO.hasOwnProperty,_O=RegExp("^"+CO.call(jO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const kO=function(e){return!(!pO(e)||vO(e))&&(fO(e)?_O:xO).test(bO(e))};const NO=function(e,t){return null==e?void 0:e[t]};const EO=function(e,t){var n=NO(e,t);return kO(n)?n:void 0};const TO=EO(nO,"Map");const OO=EO(Object,"create");const IO=function(){this.__data__=OO?OO(null):{},this.size=0};const RO=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var AO=Object.prototype.hasOwnProperty;const MO=function(e){var t=this.__data__;if(OO){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return AO.call(t,e)?t[e]:void 0};var PO=Object.prototype.hasOwnProperty;const DO=function(e){var t=this.__data__;return OO?void 0!==t[e]:PO.call(t,e)};const FO=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=OO&&void 0===t?"__lodash_hash_undefined__":t,this};function LO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}LO.prototype.clear=IO,LO.prototype.delete=RO,LO.prototype.get=MO,LO.prototype.has=DO,LO.prototype.set=FO;const BO=LO;const UO=function(){this.size=0,this.__data__={hash:new BO,map:new(TO||QT),string:new BO}};const GO=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const $O=function(e,t){var n=e.__data__;return GO(t)?n["string"==typeof t?"string":"hash"]:n.map};const qO=function(e){var t=$O(this,e).delete(e);return this.size-=t?1:0,t};const zO=function(e){return $O(this,e).get(e)};const VO=function(e){return $O(this,e).has(e)};const HO=function(e,t){var n=$O(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function WO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}WO.prototype.clear=UO,WO.prototype.delete=qO,WO.prototype.get=zO,WO.prototype.has=VO,WO.prototype.set=HO;const YO=WO;const QO=function(e,t){var n=this.__data__;if(n instanceof QT){var r=n.__data__;if(!TO||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new YO(r)}return n.set(e,t),this.size=n.size,this};function JO(e){var t=this.__data__=new QT(e);this.size=t.size}JO.prototype.clear=JT,JO.prototype.delete=KT,JO.prototype.get=XT,JO.prototype.has=ZT,JO.prototype.set=QO;const KO=JO;const XO=function(){try{var e=EO(Object,"defineProperty");return e({},"",{}),e}catch(BK){}}();const ZO=function(e,t,n){"__proto__"==t&&XO?XO(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};const eI=function(e,t,n){(void 0!==n&&!GT(e[t],n)||void 0===n&&!(t in e))&&ZO(e,t,n)};const tI=function(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}};const nI=tI();var rI="object"==typeof exports&&exports&&!exports.nodeType&&exports,oI=rI&&"object"==typeof module&&module&&!module.nodeType&&module,iI=oI&&oI.exports===rI?nO.Buffer:void 0,sI=iI?iI.allocUnsafe:void 0;const aI=function(e,t){if(t)return e.slice();var n=e.length,r=sI?sI(n):new e.constructor(n);return e.copy(r),r};const lI=nO.Uint8Array;const cI=function(e){var t=new e.constructor(e.byteLength);return new lI(t).set(new lI(e)),t};const uI=function(e,t){var n=t?cI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const dI=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var hI=Object.create;const pI=function(){function e(){}return function(t){if(!pO(t))return{};if(hI)return hI(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const fI=function(e,t){return function(n){return e(t(n))}};const mI=fI(Object.getPrototypeOf,Object);var gI=Object.prototype;const vI=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||gI)};const yI=function(e){return"function"!=typeof e.constructor||vI(e)?{}:pI(mI(e))};const bI=function(e){return null!=e&&"object"==typeof e};const xI=function(e){return bI(e)&&"[object Arguments]"==hO(e)};var wI=Object.prototype,SI=wI.hasOwnProperty,CI=wI.propertyIsEnumerable;const jI=xI(function(){return arguments}())?xI:function(e){return bI(e)&&SI.call(e,"callee")&&!CI.call(e,"callee")};const _I=Array.isArray;const kI=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};const NI=function(e){return null!=e&&kI(e.length)&&!fO(e)};const EI=function(e){return bI(e)&&NI(e)};const TI=function(){return!1};var OI="object"==typeof exports&&exports&&!exports.nodeType&&exports,II=OI&&"object"==typeof module&&module&&!module.nodeType&&module,RI=II&&II.exports===OI?nO.Buffer:void 0;const AI=(RI?RI.isBuffer:void 0)||TI;var MI=Function.prototype,PI=Object.prototype,DI=MI.toString,FI=PI.hasOwnProperty,LI=DI.call(Object);const BI=function(e){if(!bI(e)||"[object Object]"!=hO(e))return!1;var t=mI(e);if(null===t)return!0;var n=FI.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&DI.call(n)==LI};var UI={};UI["[object Float32Array]"]=UI["[object Float64Array]"]=UI["[object Int8Array]"]=UI["[object Int16Array]"]=UI["[object Int32Array]"]=UI["[object Uint8Array]"]=UI["[object Uint8ClampedArray]"]=UI["[object Uint16Array]"]=UI["[object Uint32Array]"]=!0,UI["[object Arguments]"]=UI["[object Array]"]=UI["[object ArrayBuffer]"]=UI["[object Boolean]"]=UI["[object DataView]"]=UI["[object Date]"]=UI["[object Error]"]=UI["[object Function]"]=UI["[object Map]"]=UI["[object Number]"]=UI["[object Object]"]=UI["[object RegExp]"]=UI["[object Set]"]=UI["[object String]"]=UI["[object WeakMap]"]=!1;const GI=function(e){return bI(e)&&kI(e.length)&&!!UI[hO(e)]};const $I=function(e){return function(t){return e(t)}};var qI="object"==typeof exports&&exports&&!exports.nodeType&&exports,zI=qI&&"object"==typeof module&&module&&!module.nodeType&&module,VI=zI&&zI.exports===qI&&eO.process,HI=function(){try{var e=zI&&zI.require&&zI.require("util").types;return e||VI&&VI.binding&&VI.binding("util")}catch(BK){}}();var WI=HI&&HI.isTypedArray;const YI=WI?$I(WI):GI;const QI=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]};var JI=Object.prototype.hasOwnProperty;const KI=function(e,t,n){var r=e[t];JI.call(e,t)&&GT(r,n)&&(void 0!==n||t in e)||ZO(e,t,n)};const XI=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),o?ZO(n,a,l):KI(n,a,l)}return n};const ZI=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var eR=/^(?:0|[1-9]\d*)$/;const tR=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&eR.test(e))&&e>-1&&e%1==0&&e<t};var nR=Object.prototype.hasOwnProperty;const rR=function(e,t){var n=_I(e),r=!n&&jI(e),o=!n&&!r&&AI(e),i=!n&&!r&&!o&&YI(e),s=n||r||o||i,a=s?ZI(e.length,String):[],l=a.length;for(var c in e)!t&&!nR.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||tR(c,l))||a.push(c);return a};const oR=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var iR=Object.prototype.hasOwnProperty;const sR=function(e){if(!pO(e))return oR(e);var t=vI(e),n=[];for(var r in e)("constructor"!=r||!t&&iR.call(e,r))&&n.push(r);return n};const aR=function(e){return NI(e)?rR(e,!0):sR(e)};const lR=function(e){return XI(e,aR(e))};const cR=function(e,t,n,r,o,i,s){var a=QI(e,n),l=QI(t,n),c=s.get(l);if(c)eI(e,n,c);else{var u=i?i(a,l,n+"",e,t,s):void 0,d=void 0===u;if(d){var h=_I(l),p=!h&&AI(l),f=!h&&!p&&YI(l);u=l,h||p||f?_I(a)?u=a:EI(a)?u=dI(a):p?(d=!1,u=aI(l,!0)):f?(d=!1,u=uI(l,!0)):u=[]:BI(l)||jI(l)?(u=a,jI(a)?u=lR(a):pO(a)&&!fO(a)||(u=yI(l))):d=!1}d&&(s.set(l,u),o(u,l,r,i,s),s.delete(l)),eI(e,n,u)}};const uR=function e(t,n,r,o,i){t!==n&&nI(n,(function(s,a){if(i||(i=new KO),pO(s))cR(t,n,a,r,e,o,i);else{var l=o?o(QI(t,a),s,a+"",t,n,i):void 0;void 0===l&&(l=s),eI(t,a,l)}}),aR)};const dR=function(e){return e};const hR=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var pR=Math.max;const fR=function(e,t,n){return t=pR(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=pR(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),hR(e,this,a)}};const mR=function(e){return function(){return e}};var gR=XO?function(e,t){return XO(e,"toString",{configurable:!0,enumerable:!1,value:mR(t),writable:!0})}:dR;const vR=gR;var yR=Date.now;const bR=function(e){var t=0,n=0;return function(){var r=yR(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const xR=bR(vR);const wR=function(e,t){return xR(fR(e,t,dR),e+"")};const SR=function(e,t,n){if(!pO(n))return!1;var r=typeof t;return!!("number"==r?NI(n)&&tR(t,n.length):"string"==r&&t in n)&&GT(n[t],e)};const CR=function(e){return wR((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&SR(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var a=n[r];a&&e(t,a,r,i)}return t}))};const jR=CR((function(e,t,n){uR(e,t,n)}));var _R=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,s=e.styles,a=void 0===s?{}:s,l=(0,xT.Ay)(jR({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},a),{"zDepth-1":1===t});return o.createElement("div",{style:l.wrap},o.createElement("div",{style:l.bg}),o.createElement("div",{style:l.content},i))};_R.propTypes={background:pu().string,zDepth:pu().oneOf([0,1,2,3,4,5]),radius:pu().number,styles:pu().object},_R.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};const kR=_R;const NR=function(){return nO.Date.now()};var ER=/\s/;const TR=function(e){for(var t=e.length;t--&&ER.test(e.charAt(t)););return t};var OR=/^\s+/;const IR=function(e){return e?e.slice(0,TR(e)+1).replace(OR,""):e};const RR=function(e){return"symbol"==typeof e||bI(e)&&"[object Symbol]"==hO(e)};var AR=/^[-+]0x[0-9a-f]+$/i,MR=/^0b[01]+$/i,PR=/^0o[0-7]+$/i,DR=parseInt;const FR=function(e){if("number"==typeof e)return e;if(RR(e))return NaN;if(pO(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=pO(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=IR(e);var n=MR.test(e);return n||PR.test(e)?DR(e.slice(2),n?2:8):AR.test(e)?NaN:+e};var LR=Math.max,BR=Math.min;const UR=function(e,t,n){var r,o,i,s,a,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,c=t,s=e.apply(i,n)}function f(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=NR();if(f(e))return g(e);a=setTimeout(m,function(e){var n=t-(e-l);return d?BR(n,i-(e-c)):n}(e))}function g(e){return a=void 0,h&&r?p(e):(r=o=void 0,s)}function v(){var e=NR(),n=f(e);if(r=arguments,o=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(m,t),u?p(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(m,t),p(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=FR(t)||0,pO(n)&&(u=!!n.leading,i=(d="maxWait"in n)?LR(FR(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=o=a=void 0},v.flush=function(){return void 0===a?s:g(NR())},v};const GR=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return pO(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),UR(e,t,{leading:r,maxWait:t,trailing:o})};var $R=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var qR=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"===typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),o=r.width,i=r.height,s="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,a="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(n.getBoundingClientRect().left+window.pageXOffset),c=a-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),c<0?c=0:c>i&&(c=i);var u=l/o,d=1-c/i;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=GR((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),$R(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,s=t.pointer,a=t.circle,l=(0,xT.Ay)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n            0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:s,circle:a}},{custom:!!this.props.style});return o.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.createElement("style",null,"\n          .saturation-white {\n            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n            background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n          }\n          .saturation-black {\n            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n            background: linear-gradient(to top, #000, rgba(0,0,0,0));\n          }\n        "),o.createElement("div",{style:l.white,className:"saturation-white"},o.createElement("div",{style:l.black,className:"saturation-black"}),o.createElement("div",{style:l.pointer},this.props.pointer?o.createElement(this.props.pointer,this.props):o.createElement("div",{style:l.circle}))))}}]),t}(o.PureComponent||o.Component);const zR=qR;const VR=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};const HR=fI(Object.keys,Object);var WR=Object.prototype.hasOwnProperty;const YR=function(e){if(!vI(e))return HR(e);var t=[];for(var n in Object(e))WR.call(e,n)&&"constructor"!=n&&t.push(n);return t};const QR=function(e){return NI(e)?rR(e):YR(e)};const JR=function(e,t){return function(n,r){if(null==n)return n;if(!NI(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}};const KR=JR((function(e,t){return e&&nI(e,t,QR)}));const XR=function(e){return"function"==typeof e?e:dR};const ZR=function(e,t){return(_I(e)?VR:KR)(e,XR(t))};function eA(e){return eA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eA(e)}var tA=/^\s+/,nA=/\s+$/;function rA(e,t){if(t=t||{},(e=e||"")instanceof rA)return e;if(!(this instanceof rA))return new rA(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,s=!1,a=!1;"string"==typeof e&&(e=function(e){e=e.replace(tA,"").replace(nA,"").toLowerCase();var t,n=!1;if(xA[e])e=xA[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=OA.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=OA.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=OA.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=OA.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=OA.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=OA.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=OA.hex8.exec(e))return{r:_A(t[1]),g:_A(t[2]),b:_A(t[3]),a:TA(t[4]),format:n?"name":"hex8"};if(t=OA.hex6.exec(e))return{r:_A(t[1]),g:_A(t[2]),b:_A(t[3]),format:n?"name":"hex"};if(t=OA.hex4.exec(e))return{r:_A(t[1]+""+t[1]),g:_A(t[2]+""+t[2]),b:_A(t[3]+""+t[3]),a:TA(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=OA.hex3.exec(e))return{r:_A(t[1]+""+t[1]),g:_A(t[2]+""+t[2]),b:_A(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==eA(e)&&(IA(e.r)&&IA(e.g)&&IA(e.b)?(t=function(e,t,n){return{r:255*CA(e,255),g:255*CA(t,255),b:255*CA(n,255)}}(e.r,e.g,e.b),s=!0,a="%"===String(e.r).substr(-1)?"prgb":"rgb"):IA(e.h)&&IA(e.s)&&IA(e.v)?(r=NA(e.s),o=NA(e.v),t=function(e,t,n){e=6*CA(e,360),t=CA(t,100),n=CA(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),s=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,c=[n,s,i,i,a,n][l],u=[a,n,n,s,i,i][l],d=[i,i,a,n,n,s][l];return{r:255*c,g:255*u,b:255*d}}(e.h,r,o),s=!0,a="hsv"):IA(e.h)&&IA(e.s)&&IA(e.l)&&(r=NA(e.s),i=NA(e.l),t=function(e,t,n){var r,o,i;function s(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=CA(e,360),t=CA(t,100),n=CA(n,100),0===t)r=o=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=s(l,a,e+1/3),o=s(l,a,e),i=s(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),s=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=SA(n),{ok:s,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function oA(e,t,n){e=CA(e,255),t=CA(t,255),n=CA(n,255);var r,o,i=Math.max(e,t,n),s=Math.min(e,t,n),a=(i+s)/2;if(i==s)r=o=0;else{var l=i-s;switch(o=a>.5?l/(2-i-s):l/(i+s),i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function iA(e,t,n){e=CA(e,255),t=CA(t,255),n=CA(n,255);var r,o,i=Math.max(e,t,n),s=Math.min(e,t,n),a=i,l=i-s;if(o=0===i?0:l/i,i==s)r=0;else{switch(i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function sA(e,t,n,r){var o=[kA(Math.round(e).toString(16)),kA(Math.round(t).toString(16)),kA(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function aA(e,t,n,r){return[kA(EA(r)),kA(Math.round(e).toString(16)),kA(Math.round(t).toString(16)),kA(Math.round(n).toString(16))].join("")}function lA(e,t){t=0===t?0:t||10;var n=rA(e).toHsl();return n.s-=t/100,n.s=jA(n.s),rA(n)}function cA(e,t){t=0===t?0:t||10;var n=rA(e).toHsl();return n.s+=t/100,n.s=jA(n.s),rA(n)}function uA(e){return rA(e).desaturate(100)}function dA(e,t){t=0===t?0:t||10;var n=rA(e).toHsl();return n.l+=t/100,n.l=jA(n.l),rA(n)}function hA(e,t){t=0===t?0:t||10;var n=rA(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),rA(n)}function pA(e,t){t=0===t?0:t||10;var n=rA(e).toHsl();return n.l-=t/100,n.l=jA(n.l),rA(n)}function fA(e,t){var n=rA(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,rA(n)}function mA(e){var t=rA(e).toHsl();return t.h=(t.h+180)%360,rA(t)}function gA(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=rA(e).toHsl(),r=[rA(e)],o=360/t,i=1;i<t;i++)r.push(rA({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function vA(e){var t=rA(e).toHsl(),n=t.h;return[rA(e),rA({h:(n+72)%360,s:t.s,l:t.l}),rA({h:(n+216)%360,s:t.s,l:t.l})]}function yA(e,t,n){t=t||6,n=n||30;var r=rA(e).toHsl(),o=360/n,i=[rA(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(rA(r));return i}function bA(e,t){t=t||6;for(var n=rA(e).toHsv(),r=n.h,o=n.s,i=n.v,s=[],a=1/t;t--;)s.push(rA({h:r,s:o,v:i})),i=(i+a)%1;return s}rA.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=SA(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=iA(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=iA(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=oA(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=oA(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return sA(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[kA(Math.round(e).toString(16)),kA(Math.round(t).toString(16)),kA(Math.round(n).toString(16)),kA(EA(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*CA(this._r,255))+"%",g:Math.round(100*CA(this._g,255))+"%",b:Math.round(100*CA(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*CA(this._r,255))+"%, "+Math.round(100*CA(this._g,255))+"%, "+Math.round(100*CA(this._b,255))+"%)":"rgba("+Math.round(100*CA(this._r,255))+"%, "+Math.round(100*CA(this._g,255))+"%, "+Math.round(100*CA(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(wA[sA(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+aA(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=rA(e);n="#"+aA(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return rA(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(dA,arguments)},brighten:function(){return this._applyModification(hA,arguments)},darken:function(){return this._applyModification(pA,arguments)},desaturate:function(){return this._applyModification(lA,arguments)},saturate:function(){return this._applyModification(cA,arguments)},greyscale:function(){return this._applyModification(uA,arguments)},spin:function(){return this._applyModification(fA,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(yA,arguments)},complement:function(){return this._applyCombination(mA,arguments)},monochromatic:function(){return this._applyCombination(bA,arguments)},splitcomplement:function(){return this._applyCombination(vA,arguments)},triad:function(){return this._applyCombination(gA,[3])},tetrad:function(){return this._applyCombination(gA,[4])}},rA.fromRatio=function(e,t){if("object"==eA(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:NA(e[r]));e=n}return rA(e,t)},rA.equals=function(e,t){return!(!e||!t)&&rA(e).toRgbString()==rA(t).toRgbString()},rA.random=function(){return rA.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},rA.mix=function(e,t,n){n=0===n?0:n||50;var r=rA(e).toRgb(),o=rA(t).toRgb(),i=n/100;return rA({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},rA.readability=function(e,t){var n=rA(e),r=rA(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},rA.isReadable=function(e,t,n){var r,o,i=rA.readability(e,t);switch(o=!1,r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},rA.mostReadable=function(e,t,n){var r,o,i,s,a=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,s=n.size;for(var c=0;c<t.length;c++)(r=rA.readability(e,t[c]))>l&&(l=r,a=rA(t[c]));return rA.isReadable(e,a,{level:i,size:s})||!o?a:(n.includeFallbackColors=!1,rA.mostReadable(e,["#fff","#000"],n))};var xA=rA.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},wA=rA.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(xA);function SA(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function CA(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function jA(e){return Math.min(1,Math.max(0,e))}function _A(e){return parseInt(e,16)}function kA(e){return 1==e.length?"0"+e:""+e}function NA(e){return e<=1&&(e=100*e+"%"),e}function EA(e){return Math.round(255*parseFloat(e)).toString(16)}function TA(e){return _A(e)/255}var OA=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function IA(e){return!!OA.CSS_UNIT.exec(e)}var RA=function(e){var t=0,n=0;return ZR(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},AA=function(e,t){var n=e.hex?rA(e.hex):rA(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),s=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===s&&0===i.a?"transparent":"#"+s,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},MA=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&rA(e).isValid()},PA=function(e){if(!e)return"#fff";var t=AA(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},DA=function(e,t){return rA(t+" ("+e.replace("\xb0","")+")")._ok},FA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LA=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();const BA=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(RA(e)){var r=AA(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(RA(e)){var r=AA(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=FA({},AA(e.color,0)),t.debounce=UR((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),LA(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),o.createElement(e,FA({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return FA({},AA(e.color,t.oldHue))}}]),n}(o.PureComponent||o.Component);return t.propTypes=FA({},e.propTypes),t.defaultProps=FA({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};var UA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GA=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function $A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var qA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};const zA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=n=$A(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},$A(n,t)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),GA(r,[{key:"render",value:function(){return o.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},o.createElement(e,UA({},this.props,this.state)))}}]),r}(o.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,i=void 0===r?function(){}:r,s=e.onHover,a=e.title,l=void 0===a?t:a,c=e.children,u=e.focus,d=e.focusStyle,h=void 0===d?{}:d,p="transparent"===t,f=(0,xT.Ay)({default:{swatch:qA({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?h:{})}}),m={};return s&&(m.onMouseOver=function(e){return s(t,e)}),o.createElement("div",qA({style:f.swatch,onClick:function(e){return i(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},m),c,p&&o.createElement(_T,{borderRadius:f.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))}));const VA=function(e){var t=e.direction,n=(0,xT.Ay)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.createElement("div",{style:n.picker})};var HA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WA=function(e){var t=e.rgb,n=e.hsl,r=e.width,i=e.height,s=e.onChange,a=e.direction,l=e.style,c=e.renderers,u=e.pointer,d=e.className,h=void 0===d?"":d,p=(0,xT.Ay)({default:{picker:{position:"relative",width:r,height:i},alpha:{radius:"2px",style:l}}});return o.createElement("div",{style:p.picker,className:"alpha-picker "+h},o.createElement(OT,HA({},p.alpha,{rgb:t,hsl:n,pointer:u,renderers:c,onChange:s,direction:a})))};WA.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:VA};BA(WA);const YA=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};const QA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const JA=function(e){return this.__data__.has(e)};function KA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new YO;++t<n;)this.add(e[t])}KA.prototype.add=KA.prototype.push=QA,KA.prototype.has=JA;const XA=KA;const ZA=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};const eM=function(e,t){return e.has(t)};const tM=function(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new XA:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var f=e[d],m=t[d];if(r)var g=s?r(m,f,d,t,e,i):r(f,m,d,e,t,i);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!ZA(t,(function(e,t){if(!eM(p,t)&&(f===e||o(f,e,n,r,i)))return p.push(t)}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};const nM=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};const rM=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var oM=rO?rO.prototype:void 0,iM=oM?oM.valueOf:void 0;const sM=function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new lI(e),new lI(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return GT(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=nM;case"[object Set]":var l=1&r;if(a||(a=rM),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var u=tM(a(e),a(t),r,o,i,s);return s.delete(e),u;case"[object Symbol]":if(iM)return iM.call(e)==iM.call(t)}return!1};const aM=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};const lM=function(e,t,n){var r=t(e);return _I(e)?r:aM(r,n(e))};const cM=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i};const uM=function(){return[]};var dM=Object.prototype.propertyIsEnumerable,hM=Object.getOwnPropertySymbols;const pM=hM?function(e){return null==e?[]:(e=Object(e),cM(hM(e),(function(t){return dM.call(e,t)})))}:uM;const fM=function(e){return lM(e,QR,pM)};var mM=Object.prototype.hasOwnProperty;const gM=function(e,t,n,r,o,i){var s=1&n,a=fM(e),l=a.length;if(l!=fM(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:mM.call(t,u)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=s;++c<l;){var m=e[u=a[c]],g=t[u];if(r)var v=s?r(g,m,u,t,e,i):r(m,g,u,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(e),i.delete(t),p};const vM=EO(nO,"DataView");const yM=EO(nO,"Promise");const bM=EO(nO,"Set");const xM=EO(nO,"WeakMap");var wM="[object Map]",SM="[object Promise]",CM="[object Set]",jM="[object WeakMap]",_M="[object DataView]",kM=bO(vM),NM=bO(TO),EM=bO(yM),TM=bO(bM),OM=bO(xM),IM=hO;(vM&&IM(new vM(new ArrayBuffer(1)))!=_M||TO&&IM(new TO)!=wM||yM&&IM(yM.resolve())!=SM||bM&&IM(new bM)!=CM||xM&&IM(new xM)!=jM)&&(IM=function(e){var t=hO(e),n="[object Object]"==t?e.constructor:void 0,r=n?bO(n):"";if(r)switch(r){case kM:return _M;case NM:return wM;case EM:return SM;case TM:return CM;case OM:return jM}return t});const RM=IM;var AM="[object Arguments]",MM="[object Array]",PM="[object Object]",DM=Object.prototype.hasOwnProperty;const FM=function(e,t,n,r,o,i){var s=_I(e),a=_I(t),l=s?MM:RM(e),c=a?MM:RM(t),u=(l=l==AM?PM:l)==PM,d=(c=c==AM?PM:c)==PM,h=l==c;if(h&&AI(e)){if(!AI(t))return!1;s=!0,u=!1}if(h&&!u)return i||(i=new KO),s||YI(e)?tM(e,t,n,r,o,i):sM(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&DM.call(e,"__wrapped__"),f=d&&DM.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,g=f?t.value():t;return i||(i=new KO),o(m,g,n,r,i)}}return!!h&&(i||(i=new KO),gM(e,t,n,r,o,i))};const LM=function e(t,n,r,o,i){return t===n||(null==t||null==n||!bI(t)&&!bI(n)?t!==t&&n!==n:FM(t,n,r,o,e,i))};const BM=function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var l=(a=n[o])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var d=new KO;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?LM(u,c,3,r,d):h))return!1}}return!0};const UM=function(e){return e===e&&!pO(e)};const GM=function(e){for(var t=QR(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,UM(o)]}return t};const $M=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};const qM=function(e){var t=GM(e);return 1==t.length&&t[0][2]?$M(t[0][0],t[0][1]):function(n){return n===e||BM(n,e,t)}};var zM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VM=/^\w*$/;const HM=function(e,t){if(_I(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!RR(e))||(VM.test(e)||!zM.test(e)||null!=t&&e in Object(t))};function WM(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(WM.Cache||YO),n}WM.Cache=YO;const YM=WM;const QM=function(e){var t=YM(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t};var JM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,KM=/\\(\\)?/g,XM=QM((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(JM,(function(e,n,r,o){t.push(r?o.replace(KM,"$1"):n||e)})),t}));const ZM=XM;var eP=rO?rO.prototype:void 0,tP=eP?eP.toString:void 0;const nP=function e(t){if("string"==typeof t)return t;if(_I(t))return YA(t,e)+"";if(RR(t))return tP?tP.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};const rP=function(e){return null==e?"":nP(e)};const oP=function(e,t){return _I(e)?e:HM(e,t)?[e]:ZM(rP(e))};const iP=function(e){if("string"==typeof e||RR(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const sP=function(e,t){for(var n=0,r=(t=oP(t,e)).length;null!=e&&n<r;)e=e[iP(t[n++])];return n&&n==r?e:void 0};const aP=function(e,t,n){var r=null==e?void 0:sP(e,t);return void 0===r?n:r};const lP=function(e,t){return null!=e&&t in Object(e)};const cP=function(e,t,n){for(var r=-1,o=(t=oP(t,e)).length,i=!1;++r<o;){var s=iP(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&kI(o)&&tR(s,o)&&(_I(e)||jI(e))};const uP=function(e,t){return null!=e&&cP(e,t,lP)};const dP=function(e,t){return HM(e)&&UM(t)?$M(iP(e),t):function(n){var r=aP(n,e);return void 0===r&&r===t?uP(n,e):LM(t,r,3)}};const hP=function(e){return function(t){return null==t?void 0:t[e]}};const pP=function(e){return function(t){return sP(t,e)}};const fP=function(e){return HM(e)?hP(iP(e)):pP(e)};const mP=function(e){return"function"==typeof e?e:null==e?dR:"object"==typeof e?_I(e)?dP(e[0],e[1]):qM(e):fP(e)};const gP=function(e,t){var n=-1,r=NI(e)?Array(e.length):[];return KR(e,(function(e,o,i){r[++n]=t(e,o,i)})),r};const vP=function(e,t){return(_I(e)?YA:gP)(e,mP(t,3))};const yP=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,i=(0,xT.Ay)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return o.createElement("div",{style:i.swatches},vP(t,(function(e){return o.createElement(zA,{key:e,color:e,style:i.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.createElement("div",{style:i.clear}))};var bP=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,a=e.triangle,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h="transparent"===r,p=function(e,n){MA(e)&&t({hex:e,source:"hex"},n)},f=(0,xT.Ay)(jR({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:PA(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":"hide"===a});return o.createElement("div",{style:f.card,className:"block-picker "+d},o.createElement("div",{style:f.triangle}),o.createElement("div",{style:f.head},h&&o.createElement(_T,{borderRadius:"6px 6px 0 0"}),o.createElement("div",{style:f.label},r)),o.createElement("div",{style:f.body},o.createElement(yP,{colors:i,onClick:p,onSwatchHover:n}),o.createElement(PT,{style:{input:f.input},value:r,onChange:p})))};bP.propTypes={width:pu().oneOfType([pu().string,pu().number]),colors:pu().arrayOf(pu().string),triangle:pu().oneOf(["top","hide"]),styles:pu().object},bP.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};BA(bP);var xP={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},wP={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},SP={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},CP={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},jP={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},_P={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},kP={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},NP={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},EP={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},TP={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},OP={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},IP={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},RP={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},AP={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},MP={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},PP={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},DP={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},FP={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"};var LP=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,i=e.hover,s=e.active,a=e.circleSize,l=e.circleSpacing,c=(0,xT.Ay)({default:{swatch:{width:a,height:a,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(a/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:s});return o.createElement("div",{style:c.swatch},o.createElement(zA,{style:c.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+t}}))};LP.defaultProps={circleSize:28,circleSpacing:14};const BP=(0,xT.H8)(LP);var UP=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,a=e.circleSize,l=e.styles,c=void 0===l?{}:l,u=e.circleSpacing,d=e.className,h=void 0===d?"":d,p=(0,xT.Ay)(jR({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-u,marginBottom:-u}}},c)),f=function(e,t){return n({hex:e,source:"hex"},t)};return o.createElement("div",{style:p.card,className:"circle-picker "+h},vP(i,(function(e){return o.createElement(BP,{key:e,color:e,onClick:f,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:a,circleSpacing:u})})))};UP.propTypes={width:pu().oneOfType([pu().string,pu().number]),circleSize:pu().number,circleSpacing:pu().number,styles:pu().object},UP.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[xP[500],wP[500],SP[500],CP[500],jP[500],_P[500],kP[500],NP[500],EP[500],TP[500],OP[500],IP[500],RP[500],AP[500],MP[500],PP[500],DP[500],FP[500]],styles:{}};BA(UP);const GP=function(e){return void 0===e};var $P=n(9128),qP=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var zP=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?MA(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(GP(e.s)?n.props.hsl.s:e.s),l:Number(GP(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),qP(t,[{key:"render",value:function(){var e=this,t=(0,xT.Ay)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=o.createElement("div",{style:t.fields,className:"flexbox-fix"},o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=o.createElement("div",{style:t.fields,className:"flexbox-fix"},o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.createElement("div",{style:t.alpha},o.createElement(PT,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=o.createElement("div",{style:t.fields,className:"flexbox-fix"},o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.createElement("div",{style:t.field},o.createElement(PT,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.createElement("div",{style:t.alpha},o.createElement(PT,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,o.createElement("div",{style:t.toggle},o.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.createElement($P.A,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.Component);zP.defaultProps={view:"hex"};const VP=zP;const HP=function(){var e=(0,xT.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.createElement("div",{style:e.picker})};const WP=function(){var e=(0,xT.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.createElement("div",{style:e.picker})};var YP=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,i=e.rgb,s=e.hsl,a=e.hsv,l=e.hex,c=e.renderers,u=e.styles,d=void 0===u?{}:u,h=e.className,p=void 0===h?"":h,f=e.defaultView,m=(0,xT.Ay)(jR({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return o.createElement("div",{style:m.picker,className:"chrome-picker "+p},o.createElement("div",{style:m.saturation},o.createElement(zR,{style:m.Saturation,hsl:s,hsv:a,pointer:WP,onChange:n})),o.createElement("div",{style:m.body},o.createElement("div",{style:m.controls,className:"flexbox-fix"},o.createElement("div",{style:m.color},o.createElement("div",{style:m.swatch},o.createElement("div",{style:m.active}),o.createElement(_T,{renderers:c}))),o.createElement("div",{style:m.toggles},o.createElement("div",{style:m.hue},o.createElement(BT,{style:m.Hue,hsl:s,pointer:HP,onChange:n})),o.createElement("div",{style:m.alpha},o.createElement(OT,{style:m.Alpha,rgb:i,hsl:s,pointer:HP,renderers:c,onChange:n})))),o.createElement(VP,{rgb:i,hsl:s,hex:l,view:f,onChange:n,disableAlpha:r})))};YP.propTypes={width:pu().oneOfType([pu().string,pu().number]),disableAlpha:pu().bool,styles:pu().object,defaultView:pu().oneOf(["hex","rgb","hsl"])},YP.defaultProps={width:225,disableAlpha:!1,styles:{}};BA(YP);const QP=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.active,a=(0,xT.Ay)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:PA(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.createElement(zA,{style:a.color,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.createElement("div",{style:a.dot}))};const JP=function(e){var t=e.hex,n=e.rgb,r=e.onChange,i=(0,xT.Ay)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return o.createElement("div",{style:i.fields,className:"flexbox-fix"},o.createElement("div",{style:i.active}),o.createElement(PT,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:s}),o.createElement(PT,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),o.createElement(PT,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),o.createElement(PT,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}))};var KP=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,i=e.hex,s=e.rgb,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,d=(0,xT.Ay)(jR({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),h=function(e,n){e.hex?MA(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return o.createElement(kR,{style:d.Compact,styles:l},o.createElement("div",{style:d.compact,className:"compact-picker "+u},o.createElement("div",null,vP(r,(function(e){return o.createElement(QP,{key:e,color:e,active:e.toLowerCase()===i,onClick:h,onSwatchHover:n})})),o.createElement("div",{style:d.clear})),o.createElement(JP,{hex:i,rgb:s,onChange:h})))};KP.propTypes={colors:pu().arrayOf(pu().string),styles:pu().object},KP.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};BA(KP);const XP=(0,xT.H8)((function(e){var t=e.hover,n=e.color,r=e.onClick,i=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=(0,xT.Ay)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return o.createElement("div",{style:a.swatch},o.createElement(zA,{color:n,onClick:r,onHover:i,focusStyle:s}))}));var ZP=function(e){var t=e.width,n=e.colors,r=e.onChange,i=e.onSwatchHover,s=e.triangle,a=e.styles,l=void 0===a?{}:a,c=e.className,u=void 0===c?"":c,d=(0,xT.Ay)(jR({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),h=function(e,t){return r({hex:e,source:"hex"},t)};return o.createElement("div",{style:d.card,className:"github-picker "+u},o.createElement("div",{style:d.triangleShadow}),o.createElement("div",{style:d.triangle}),vP(n,(function(e){return o.createElement(XP,{color:e,key:e,onClick:h,onSwatchHover:i})})))};ZP.propTypes={width:pu().oneOfType([pu().string,pu().number]),colors:pu().arrayOf(pu().string),triangle:pu().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:pu().object},ZP.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};const eD=BA(ZP);const tD=function(e){var t=e.direction,n=(0,xT.Ay)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.createElement("div",{style:n.picker})};var nD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rD=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.hsl,s=e.direction,a=e.pointer,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h=(0,xT.Ay)(jR({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},c));return o.createElement("div",{style:h.picker,className:"hue-picker "+d},o.createElement(BT,nD({},h.hue,{hsl:i,pointer:a,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};rD.propTypes={styles:pu().object},rD.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:tD,styles:{}};BA(rD);BA((function(e){var t=e.onChange,n=e.hex,r=e.rgb,i=e.styles,s=void 0===i?{}:i,a=e.className,l=void 0===a?"":a,c=(0,xT.Ay)(jR({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),u=function(e,n){e.hex?MA(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return o.createElement(kR,{styles:s},o.createElement("div",{style:c.material,className:"material-picker "+l},o.createElement(PT,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:u}),o.createElement("div",{style:c.split,className:"flexbox-fix"},o.createElement("div",{style:c.third},o.createElement(PT,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:r.r,onChange:u})),o.createElement("div",{style:c.third},o.createElement(PT,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:r.g,onChange:u})),o.createElement("div",{style:c.third},o.createElement(PT,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:r.b,onChange:u})))))}));const oD=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,i=e.hex,s=(0,xT.Ay)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),a=function(e,o){e["#"]?MA(e["#"])&&t({hex:e["#"],source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},o):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},o)};return o.createElement("div",{style:s.fields},o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:a}),o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:a}),o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:a}),o.createElement("div",{style:s.divider}),o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:a}),o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:a}),o.createElement(PT,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:a}),o.createElement("div",{style:s.divider}),o.createElement(PT,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:i.replace("#",""),onChange:a}),o.createElement("div",{style:s.fieldSymbols},o.createElement("div",{style:s.symbol},"\xb0"),o.createElement("div",{style:s.symbol},"%"),o.createElement("div",{style:s.symbol},"%")))};const iD=function(e){var t=e.hsl,n=(0,xT.Ay)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return o.createElement("div",{style:n.picker})};const sD=function(){var e=(0,xT.Ay)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.createElement("div",{style:e.pointer},o.createElement("div",{style:e.left},o.createElement("div",{style:e.leftInside})),o.createElement("div",{style:e.right},o.createElement("div",{style:e.rightInside})))};const aD=function(e){var t=e.onClick,n=e.label,r=e.children,i=e.active,s=(0,xT.Ay)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return o.createElement("div",{style:s.button,onClick:t},n||r)};const lD=function(e){var t=e.rgb,n=e.currentColor,r=(0,xT.Ay)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.createElement("div",null,o.createElement("div",{style:r.label},"new"),o.createElement("div",{style:r.swatches},o.createElement("div",{style:r.new}),o.createElement("div",{style:r.current})),o.createElement("div",{style:r.label},"current"))};var cD=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var uD=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),cD(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,i=void 0===r?"":r,s=(0,xT.Ay)(jR({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return o.createElement("div",{style:s.picker,className:"photoshop-picker "+i},o.createElement("div",{style:s.head},this.props.header),o.createElement("div",{style:s.body,className:"flexbox-fix"},o.createElement("div",{style:s.saturation},o.createElement(zR,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:iD,onChange:this.props.onChange})),o.createElement("div",{style:s.hue},o.createElement(BT,{direction:"vertical",hsl:this.props.hsl,pointer:sD,onChange:this.props.onChange})),o.createElement("div",{style:s.controls},o.createElement("div",{style:s.top,className:"flexbox-fix"},o.createElement("div",{style:s.previews},o.createElement(lD,{rgb:this.props.rgb,currentColor:this.state.currentColor})),o.createElement("div",{style:s.actions},o.createElement(aD,{label:"OK",onClick:this.props.onAccept,active:!0}),o.createElement(aD,{label:"Cancel",onClick:this.props.onCancel}),o.createElement(oD,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(o.Component);uD.propTypes={header:pu().string,styles:pu().object},uD.defaultProps={header:"Color Picker",styles:{}};BA(uD);const dD=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.disableAlpha,a=(0,xT.Ay)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(e,o){e.hex?MA(e.hex)&&t({hex:e.hex,source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},o):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return o.createElement("div",{style:a.fields,className:"flexbox-fix"},o.createElement("div",{style:a.double},o.createElement(PT,{style:{input:a.input,label:a.label},label:"hex",value:i.replace("#",""),onChange:l})),o.createElement("div",{style:a.single},o.createElement(PT,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),o.createElement("div",{style:a.single},o.createElement(PT,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),o.createElement("div",{style:a.single},o.createElement(PT,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),o.createElement("div",{style:a.alpha},o.createElement(PT,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))};var hD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pD=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=(0,xT.Ay)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),a=function(e,t){r({hex:e,source:"hex"},t)};return o.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"===typeof e?{color:e}:e,n=""+t.color+(t.title||"");return o.createElement("div",{key:n,style:s.swatchWrap},o.createElement(zA,hD({},t,{style:s.swatch,onClick:a,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};pD.propTypes={colors:pu().arrayOf(pu().oneOfType([pu().string,pu().shape({color:pu().string,title:pu().string})])).isRequired};const fD=pD;var mD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gD=function(e){var t=e.width,n=e.rgb,r=e.hex,i=e.hsv,s=e.hsl,a=e.onChange,l=e.onSwatchHover,c=e.disableAlpha,u=e.presetColors,d=e.renderers,h=e.styles,p=void 0===h?{}:h,f=e.className,m=void 0===f?"":f,g=(0,xT.Ay)(jR({default:mD({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},p),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},p),{disableAlpha:c});return o.createElement("div",{style:g.picker,className:"sketch-picker "+m},o.createElement("div",{style:g.saturation},o.createElement(zR,{style:g.Saturation,hsl:s,hsv:i,onChange:a})),o.createElement("div",{style:g.controls,className:"flexbox-fix"},o.createElement("div",{style:g.sliders},o.createElement("div",{style:g.hue},o.createElement(BT,{style:g.Hue,hsl:s,onChange:a})),o.createElement("div",{style:g.alpha},o.createElement(OT,{style:g.Alpha,rgb:n,hsl:s,renderers:d,onChange:a}))),o.createElement("div",{style:g.color},o.createElement(_T,null),o.createElement("div",{style:g.activeColor}))),o.createElement(dD,{rgb:n,hsl:s,hex:r,onChange:a,disableAlpha:c}),o.createElement(fD,{colors:u,onClick:a,onSwatchHover:l}))};gD.propTypes={disableAlpha:pu().bool,width:pu().oneOfType([pu().string,pu().number]),styles:pu().object},gD.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};BA(gD);const vD=function(e){var t=e.hsl,n=e.offset,r=e.onClick,i=void 0===r?function(){}:r,s=e.active,a=e.first,l=e.last,c=(0,xT.Ay)({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:a,last:l});return o.createElement("div",{style:c.swatch,onClick:function(e){return i({h:t.h,s:.5,l:n,source:"hsl"},e)}})};const yD=function(e){var t=e.onClick,n=e.hsl,r=(0,xT.Ay)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return o.createElement("div",{style:r.swatches},o.createElement("div",{style:r.swatch},o.createElement(vD,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<i&&Math.abs(n.s-.5)<i,onClick:t,first:!0})),o.createElement("div",{style:r.swatch},o.createElement(vD,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<i&&Math.abs(n.s-.5)<i,onClick:t})),o.createElement("div",{style:r.swatch},o.createElement(vD,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<i&&Math.abs(n.s-.5)<i,onClick:t})),o.createElement("div",{style:r.swatch},o.createElement(vD,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<i&&Math.abs(n.s-.5)<i,onClick:t})),o.createElement("div",{style:r.swatch},o.createElement(vD,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<i&&Math.abs(n.s-.5)<i,onClick:t,last:!0})),o.createElement("div",{style:r.clear}))};const bD=function(){var e=(0,xT.Ay)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.createElement("div",{style:e.picker})};var xD=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,i=e.styles,s=void 0===i?{}:i,a=e.className,l=void 0===a?"":a,c=(0,xT.Ay)(jR({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return o.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},o.createElement("div",{style:c.hue},o.createElement(BT,{style:c.Hue,hsl:t,pointer:r,onChange:n})),o.createElement("div",{style:c.swatches},o.createElement(yD,{hsl:t,onClick:n})))};xD.propTypes={styles:pu().object},xD.defaultProps={pointer:bD,styles:{}};BA(xD);var wD=n(4371);const SD=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.first,a=e.last,l=e.active,c=(0,xT.Ay)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:PA(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:a,active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.createElement(zA,{color:t,style:c.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.createElement("div",{style:c.check},o.createElement(wD.A,null)))};const CD=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,i=e.active,s=(0,xT.Ay)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return o.createElement("div",{style:s.group},vP(r,(function(e,s){return o.createElement(SD,{key:e,color:e,active:e.toLowerCase()===i,first:0===s,last:s===r.length-1,onClick:t,onSwatchHover:n})})))};var jD=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.onSwatchHover,s=e.colors,a=e.hex,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h=(0,xT.Ay)(jR({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),p=function(e,t){return r({hex:e,source:"hex"},t)};return o.createElement("div",{style:h.picker,className:"swatches-picker "+d},o.createElement(kR,null,o.createElement("div",{style:h.overflow},o.createElement("div",{style:h.body},vP(s,(function(e){return o.createElement(CD,{key:e.toString(),group:e,active:a,onClick:p,onSwatchHover:i})})),o.createElement("div",{style:h.clear})))))};jD.propTypes={width:pu().oneOfType([pu().string,pu().number]),height:pu().oneOfType([pu().string,pu().number]),colors:pu().arrayOf(pu().arrayOf(pu().string)),styles:pu().object},jD.defaultProps={width:320,height:240,colors:[[xP[900],xP[700],xP[500],xP[300],xP[100]],[wP[900],wP[700],wP[500],wP[300],wP[100]],[SP[900],SP[700],SP[500],SP[300],SP[100]],[CP[900],CP[700],CP[500],CP[300],CP[100]],[jP[900],jP[700],jP[500],jP[300],jP[100]],[_P[900],_P[700],_P[500],_P[300],_P[100]],[kP[900],kP[700],kP[500],kP[300],kP[100]],[NP[900],NP[700],NP[500],NP[300],NP[100]],[EP[900],EP[700],EP[500],EP[300],EP[100]],["#194D33",TP[700],TP[500],TP[300],TP[100]],[OP[900],OP[700],OP[500],OP[300],OP[100]],[IP[900],IP[700],IP[500],IP[300],IP[100]],[RP[900],RP[700],RP[500],RP[300],RP[100]],[AP[900],AP[700],AP[500],AP[300],AP[100]],[MP[900],MP[700],MP[500],MP[300],MP[100]],[PP[900],PP[700],PP[500],PP[300],PP[100]],[DP[900],DP[700],DP[500],DP[300],DP[100]],[FP[900],FP[700],FP[500],FP[300],FP[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};BA(jD);var _D=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,a=e.triangle,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,h=(0,xT.Ay)(jR({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a}),p=function(e,n){MA(e)&&t({hex:e,source:"hex"},n)};return o.createElement("div",{style:h.card,className:"twitter-picker "+d},o.createElement("div",{style:h.triangleShadow}),o.createElement("div",{style:h.triangle}),o.createElement("div",{style:h.body},vP(i,(function(e,t){return o.createElement(zA,{key:t,color:e,hex:e,style:h.swatch,onClick:p,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.createElement("div",{style:h.hash},"#"),o.createElement(PT,{label:null,style:{input:h.input},value:r.replace("#",""),onChange:p}),o.createElement("div",{style:h.clear})))};_D.propTypes={width:pu().oneOfType([pu().string,pu().number]),triangle:pu().oneOf(["hide","top-left","top-right"]),colors:pu().arrayOf(pu().string),styles:pu().object},_D.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};BA(_D);var kD=function(e){var t=(0,xT.Ay)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return o.createElement("div",{style:t.picker})};kD.propTypes={hsl:pu().shape({h:pu().number,s:pu().number,l:pu().number,a:pu().number})},kD.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const ND=kD;var ED=function(e){var t=(0,xT.Ay)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return o.createElement("div",{style:t.picker})};ED.propTypes={hsl:pu().shape({h:pu().number,s:pu().number,l:pu().number,a:pu().number})},ED.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const TD=ED;const OD=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.hsv,a=function(e,n){if(e.hex)MA(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");DA(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var o=e.hsv.split(",");DA(e.hsv,"hsv")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("\xb0",""),1==o[1]?o[1]=.01:1==o[2]&&(o[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsv"},n))}else if(e.hsl){var i=e.hsl.split(",");DA(e.hsl,"hsl")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("\xb0",""),1==d[1]?d[1]=.01:1==d[2]&&(d[2]=.01),t({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsl"},n))}},l=(0,xT.Ay)({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,u=Math.round(r.h)+"\xb0, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",d=Math.round(s.h)+"\xb0, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return o.createElement("div",{style:l.wrap,className:"flexbox-fix"},o.createElement("div",{style:l.fields},o.createElement("div",{style:l.double},o.createElement(PT,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:a})),o.createElement("div",{style:l.column},o.createElement("div",{style:l.single},o.createElement(PT,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:a})),o.createElement("div",{style:l.single},o.createElement(PT,{style:{input:l.input2,label:l.label2},label:"hsv",value:d,onChange:a})),o.createElement("div",{style:l.single},o.createElement(PT,{style:{input:l.input2,label:l.label2},label:"hsl",value:u,onChange:a})))))};var ID=function(e){var t=e.width,n=e.onChange,r=e.rgb,i=e.hsl,s=e.hsv,a=e.hex,l=e.header,c=e.styles,u=void 0===c?{}:c,d=e.className,h=void 0===d?"":d,p=(0,xT.Ay)(jR({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return o.createElement("div",{style:p.picker,className:"google-picker "+h},o.createElement("div",{style:p.head},l),o.createElement("div",{style:p.swatch}),o.createElement("div",{style:p.saturation},o.createElement(zR,{hsl:i,hsv:s,pointer:ND,onChange:n})),o.createElement("div",{style:p.body},o.createElement("div",{style:p.controls,className:"flexbox-fix"},o.createElement("div",{style:p.hue},o.createElement(BT,{style:p.Hue,hsl:i,radius:"4px",pointer:TD,onChange:n}))),o.createElement(OD,{rgb:r,hsl:i,hex:a,hsv:s,onChange:n})))};ID.propTypes={width:pu().oneOfType([pu().string,pu().number]),styles:pu().object,header:pu().string},ID.defaultProps={width:652,styles:{},header:"Color picker"};BA(ID);const RD=e=>{if(!e)return null;const t=e.substring(7,9);return""===t?255:parseInt(t,16)},AD=e=>e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d]?)$/i,((e,t,n,r,o)=>"#"+t+t+n+n+r+r+o+o)).padEnd(9,"f").substring(1,9).match(/.{2}/g).map((e=>parseInt(e,16))),MD=(e,t,n)=>{const r=[e,t,n].map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*r[0]+.7152*r[1]+.0722*r[2]},PD=(e,t)=>{const n=MD(e[0],e[1],e[2])+.05,r=MD(t[0],t[1],t[2])+.05;return Math.max(n,r)/Math.min(n,r)},DD=([e,t,n,r])=>{const[o,i,s]=[1,1,1],[a,l,c,u]=[e,t,n,r].map((e=>e/255));return[(1-u)*o+u*a,(1-u)*i+u*l,(1-u)*s+u*c].map((e=>Math.floor(255*e)))},FD=([e,t,n])=>"#"+[e,t,n].map((e=>{const t=e.toString(16);return 1===t.length?"0"+t:t})).join(""),LD=e=>[["color-black",[0,0,0]],["color-white",[255,255,255]]].map((t=>[...t,PD(t[1],e)])).reduce(((e,t)=>e[2]>t[2]?e:t))[0];class BD extends o.Component{constructor(...e){super(...e),this.handleColourChange=e=>{this.onChange(e.hex+Math.round(255*e.rgb.a).toString(16).padStart(2,"0"))},this.onChange=e=>{this.props.onChange&&this.props.onChange(e)},this.toggleColourPicker=()=>{this.props.onToggleColourPicker&&this.props.onToggleColourPicker()}}componentDidUpdate(e){e.displayColourPicker&&e.colour!==this.props.colour&&this.toggleColourPicker()}render(){const{displayColourPicker:e,colour:t}=this.props,n=RD(t),r=t&&0!==n,o={backgroundColor:t,border:r?"none":"#bfbfbf solid 1px"},i={color:r?"inherit":"#bfbfbf"};return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-chars__dropdown m-2",style:o,onClick:this.toggleColourPicker,children:(0,pr.jsx)("i",{className:"fa fa-chevron-down",style:i})}),e&&(0,pr.jsx)("div",{className:"c-colour-palette",children:(0,pr.jsx)(eD,{onChange:this.handleColourChange,triangle:"hide",colors:ej,width:"215px"})})]})}}const UD=({index:e,last:t,onDecreasePriorityClick:n,onIncreasePriorityClick:r})=>(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)("i",{className:`c-chars__arrow-icon fa fa-arrow-down font-size-16 cursor-pointer ${t&&"invisible"}`,onClick:n}),(0,pr.jsx)("i",{className:`c-chars__arrow-icon fa fa-arrow-up font-size-16 cursor-pointer ${0===e&&"invisible"}`,onClick:r})]}),GD=({isOpen:e,loading:t,toggle:n,heading:r,text:o,buttonText:i,onButtonClick:s,showCancel:a=!0,error:l})=>(0,pr.jsxs)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{className:"p-4",title:r,toggle:n}),t?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-4 d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"text-primary mb-3",children:"IMPORTANT NOTICE"}),(0,pr.jsx)("div",{children:o})]})]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:s,children:i}),a&&(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:n,children:"Cancel"}),(0,pr.jsx)($k,{text:l})]})]}),$D=ng()(eg(Dw,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loading:e,schoolCharacteristics:t})}),eg(Fw,{name:"updateSchoolCharacteristicsMutation"}))((({loading:e,schoolCharacteristics:t,updateSchoolCharacteristicsMutation:n})=>{const{state:r}=ml();if(e)return(0,pr.jsx)(qk,{});const o=uw(),i=t?Array.from(t):[],s=[{query:Dw,variables:{schoolId:o}},{query:mg,variables:{schoolId:o}}];return(0,pr.jsx)(bT,{characteristics:i,updateSchoolCharacteristicsMutation:n,refetchCharacteristics:s,navFrom:r&&r.navFrom})})),qD=e=>e.map((e=>e.code)).join(" & "),zD=(e,t)=>{const n=e.characteristicResponse.value;return t.characteristicResponse.value-n};class VD extends o.Component{constructor(...e){super(...e),this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error)}}render(){const{loadingClasses:e,loadingTwo:t,loadingThree:n,newClasses:r,settings:o,...i}=this.props;if(e||t||n)return(0,pr.jsx)(qk,{});const s=uw(),a=[{query:mg,variables:{schoolId:s}},{query:ee,variables:{schoolId:s}},{query:Mw,variables:{schoolId:s,adminOnly:o.adminOnlyRequests}}],l=r.map((e=>{const t=e.teachers.map((e=>e.firstName.concat(" ",e.lastName))).join(", "),n=Array.from(e.schoolGrades);n.sort(((e,t)=>e.order-t.order));const r=[...e.entryCriteriaCharacteristicResponse].sort(zD);return{...e,entryCriteriaCharacteristicResponse:r,schoolGrades:n,labelElement:(0,pr.jsx)(gm,{label:e.label}),grades:qD(n),teacherNames:t}}));return(e=>{e.sort(qS)})(l),(0,pr.jsx)(ok,{refetchQueries:a,newClasses:l,settings:o,...i})}}const HD=ng()(eg(mg,{options:()=>({variables:{schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{loading:e,error:t,newClasses:n}})=>({loadingClasses:e,error:t,newClasses:n})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Dw,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loadingTwo:e,schoolCharacteristics:t})}),eg(gg,{options:()=>({variables:{schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{loading:e,activeCurrentClasses:t}})=>({loadingThree:e,currentClasses:t})}),eg(Ng,{name:"deleteAllNewClasses",options:()=>({variables:{schoolId:uw()},refetchQueries:[{query:mg,variables:{schoolId:uw()}}]})}))(VD),WD=({dashboard:e={},myprofile:t,settings:n})=>{const[r,i]=(0,o.useState)(!1),[s,a]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1),u=()=>i((e=>!e)),d=()=>a((e=>!e)),h=()=>c((e=>!e)),p=n.adminOnlyRequests,{newClassCount:f=0,requestCount:m=0,studentCount:g=0,teacherCount:v=0,studentsPlacedCount:y=0,surveySentCount:b=0,surveyCompletedCount:x=0,newAccountLock:w}=e,S=g>0,C=S&&v>0,j=S||v>0,_=f>0,k=_&&y>0,N=b>0,E=m>0||N,T=m>0&&N,O=m>0&&x>0,I=N?Math.round(x/b*100):0,R="overrideSolverLock"in e&&!e.overrideSolverLock,A=o.useContext(Cw).gettextObj;return(0,pr.jsxs)("div",{className:"row c-dashboard",children:[R&&(0,pr.jsx)(ZD,{}),p&&(0,pr.jsx)("div",{className:"c-dashboard__admin-banner"}),(0,pr.jsx)("div",{className:"c-dashboard__banner w-100 pb-5",children:(0,pr.jsxs)("div",{className:"container mb-4",children:[(0,pr.jsxs)("h1",{className:"u-bold u-grey-dark mt-4",children:["Welcome to Class Solver",t&&`, ${t.firstName}!`]}),(0,pr.jsxs)("div",{className:"js-dashboard-banner-content d-block",children:[(0,pr.jsxs)("div",{className:"c-dashboard__timeline mt-5",children:[(0,pr.jsx)(KD,{condition:C,content:"1"}),(0,pr.jsx)(QD,{condition:j}),(0,pr.jsx)(JD,{condition:j}),(0,pr.jsx)(QD,{condition:C}),(0,pr.jsx)(JD,{condition:C}),(0,pr.jsx)(QD,{condition:C}),(0,pr.jsx)(KD,{condition:O,content:"2"}),(0,pr.jsx)(QD,{condition:E}),(0,pr.jsx)(JD,{condition:E}),(0,pr.jsx)(QD,{condition:T}),(0,pr.jsx)(JD,{condition:T}),(0,pr.jsx)(QD,{condition:O}),(0,pr.jsx)(KD,{condition:k,content:"3"}),(0,pr.jsx)(QD,{condition:_}),(0,pr.jsx)(JD,{condition:_}),(0,pr.jsx)(QD,{condition:k}),(0,pr.jsx)(JD,{condition:k}),(0,pr.jsx)(QD,{condition:k}),(0,pr.jsx)(JD,{condition:k})]}),(0,pr.jsxs)("div",{className:"row mt-4",children:[(0,pr.jsxs)(nS,{sm:"12",md:{size:4},children:[(0,pr.jsx)("h6",{className:"mt-3 mb-3 u-blue-primary",children:"Import & Setup"}),(0,pr.jsxs)("p",{className:"mb-4",children:["Import your current Students and Teachers. Then setup the Characteristics you use to balance your"," ",A.gettext("classes"),"."]})]}),(0,pr.jsxs)(nS,{sm:"12",md:{size:4},children:[(0,pr.jsx)("h6",{className:"mt-3 mb-3 u-blue-primary",children:"Survey & Requests"}),(0,pr.jsx)("p",{className:"mb-4",children:"Invite your Teachers to complete a Survey about their Students. Add any other Requests (e.g. from parents)."})]}),(0,pr.jsxs)(nS,{sm:"12",md:{size:4},children:[(0,pr.jsxs)("h6",{className:"mt-3 mb-3 u-blue-primary",children:["Solve ",A.gettext("Classes")]}),(0,pr.jsxs)("p",{className:"mb-4",children:["Set the ",A.gettext("class"),' structure and run the Solver. Make manual changes and use "Boost" to fix issues. Print, share or export your lists.']})]})]}),(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsx)("div",{className:"col-4",children:(0,pr.jsxs)("a",{className:"color-blue-mid",onClick:u,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Step 1 Video"]})}),(0,pr.jsx)("div",{className:"col-4",children:(0,pr.jsxs)("a",{className:"color-blue-mid",onClick:d,disabled:w,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Step 2 Video"]})}),(0,pr.jsx)("div",{className:"col-4",children:(0,pr.jsxs)("a",{className:"color-blue-mid",onClick:h,disabled:w,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Step 3 Video"]})})]})]})]})}),(0,pr.jsx)("div",{className:"c-dashboard__stats w-100 pt-5",children:(0,pr.jsx)("div",{className:"container",children:(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsxs)(nS,{className:"c-dashboard__stats-raised c-dashboard__stats-container",sm:"12",md:{size:4},children:[(0,pr.jsx)("h2",{className:"mb-5 c-dashboard__stats-heading",children:"Your School"}),(0,pr.jsx)("h3",{className:"mt-3 mb-2 text-uppercase",children:"Students Added"}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:g}),(0,pr.jsx)("h3",{className:"mt-5 mb-2 text-uppercase",children:"Teachers added"}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:v})]}),(0,pr.jsxs)(nS,{className:"c-dashboard__stats-container",sm:"12",md:{size:4},children:[(0,pr.jsx)("div",{className:"d-flex align-items-top",children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h3",{className:"mt-3 mb-2 text-primary text-uppercase",children:"Survey completed"}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:`${I}%`}),(0,pr.jsx)("div",{className:"c-dashboard__stats-text-small",children:`${b} sent, ${x} completed`})]})}),(0,pr.jsx)("h3",{className:"mt-5 mb-2 text-primary text-uppercase",children:"Requests Submitted"}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:m})]}),(0,pr.jsxs)(nS,{className:"c-dashboard__stats-container",sm:"12",md:{size:4},children:[(0,pr.jsx)("h3",{className:"mt-3 mb-3 text-primary text-uppercase",children:"Students placed"}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:y}),(0,pr.jsx)("h3",{className:"mt-6 mb-2 text-primary text-uppercase",children:A.gettext("Classes")}),(0,pr.jsx)("span",{className:"c-dashboard__stats-text",children:f})]})]})})}),(0,pr.jsx)(YD,{}),r&&(0,pr.jsx)(vN,{toggle:u,videoUrl:"https://player.vimeo.com/video/683706883?h=55fd50b1c2",title:"Instruction Step 1"}),s&&(0,pr.jsx)(vN,{toggle:d,videoUrl:"https://player.vimeo.com/video/683707022?h=c9cf9572c2",title:"Instruction Step 2"}),l&&(0,pr.jsx)(vN,{toggle:h,videoUrl:XS,title:"Instruction Step 3"})]})},YD=({className:e=""})=>(0,pr.jsx)("div",{className:`${e} c-footer container color-footer-text`,children:(0,pr.jsx)("div",{className:"row py-3",children:(0,pr.jsxs)("div",{className:"col-md-8",children:[(0,pr.jsx)("img",{className:"c-footer__logo",src:xN,alt:"Logo"}),(0,pr.jsx)("span",{className:"ml-3 color-footer-text",children:"\xa9 Class Solver. All rights reserved."}),(0,pr.jsx)("a",{href:fS,target:"_blank",rel:"noopener noreferrer",className:"color-footer-text ml-3",children:"Terms of Use"}),(0,pr.jsx)("a",{href:mS,target:"_blank",rel:"noopener noreferrer",className:"color-footer-text ml-3",children:"Privacy Policy"})]})})}),QD=({condition:e})=>(0,pr.jsx)("span",{className:e?"c-dashboard__bar":"c-dashboard__bar c-dashboard__bar--alt"}),JD=({condition:e})=>(0,pr.jsx)("span",{className:e?"c-dashboard__circle-mini":"c-dashboard__circle-mini c-dashboard__circle-mini--alt"}),KD=({condition:e,content:t})=>(0,pr.jsx)("span",{className:e?"c-dashboard__circle":"c-dashboard__circle c-dashboard__circle--alt",children:e?(0,pr.jsx)("i",{className:"fa fa-check"}):(0,pr.jsx)("span",{children:t})}),XD=({toggle:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{title:"Subscription Expired",toggle:e,className:"p-3"}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h2",{children:"How do I renew my subscription?"}),(0,pr.jsxs)("p",{children:["Please email"," ",(0,pr.jsx)("a",{className:"u-underline u-font-weight-medium u-blue-mid",href:"mailto: support@classsolver.com",children:"support@classsolver.com"})," ","with the number of students that you would like to use in the program."]}),(0,pr.jsx)("h2",{children:"Can I still use Class Solver in the meantime?"}),(0,pr.jsx)("p",{children:"Yes, you are welcome to complete Steps 1 and 2, however you will not be able to place students into classes (Step 3) until renewal has been confirmed."})]})]})}),(0,pr.jsx)(Yj,{children:(0,pr.jsx)(ld,{color:"link",onClick:e,children:"Close"})})]}),ZD=()=>{const[e,t]=(0,o.useState)(!1),n=()=>t((e=>!e));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"c-modal-expired-note text-center",children:["Your subscription has expired.\xa0 Please email"," ",(0,pr.jsx)("a",{className:"u-underline u-font-weight-medium u-blue-mid",href:"mailto: support@classsolver.com",children:"support@classsolver.com"})," ","to renew. You can still complete Steps 1 and 2 prior to renewal."," ",(0,pr.jsx)("span",{className:"cursor-pointer text-primary",onClick:n,children:"Learn more"})]}),e&&(0,pr.jsx)(XD,{toggle:n})]})},eF=({schoolCharacteristics:e})=>e.map(((e,t)=>(0,pr.jsxs)("th",{className:"c-reports-table__header__label text-center",children:[e.name,(0,pr.jsx)(tF,{characteristicName:e.name,characteristicResponses:e.characteristicResponses})]},t))),tF=({characteristicName:e,characteristicResponses:t})=>(0,pr.jsx)("div",{className:"d-flex justify-content-center",children:t.map(((t,n)=>{const r={backgroundColor:0===RD(t.colour)||null===t.colour?"#BFBFBF":t.colour},o=`characteristic-${t.id}`;return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-reports-characteristic-colour",style:r,"data-tooltip-id":o}),(0,pr.jsx)(kf,{className:"c-characteristic-tooltip p-0",float:!0,id:o,opacity:1,variant:"light",children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-characteristic-tooltip__header text-primary text-left",children:"Characteristics"}),(0,pr.jsx)("div",{className:"c-characteristic-tooltip__body",children:(0,pr.jsxs)("div",{className:"d-flex align-items-center mt-2",children:[(0,pr.jsx)("span",{className:"u-characteristic-circle mr-2",style:{backgroundColor:r.backgroundColor}}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"u-bold",children:e}),` - ${t.label}`]})]})})]})})]},n)}))});class nF extends o.Component{constructor(e){super(e),this.toggleDropdownReports=()=>{this.setState((e=>({dropdownReportsOpen:!e.dropdownReportsOpen})))},this.toggleDropdownExports=()=>{this.setState((e=>({dropdownExportsOpen:!e.dropdownExportsOpen})))},this.print=()=>{const{setAllClassesExpand:e}=this.props;e?e(!0,(()=>window.print())):window.print()},this.state={dropdownReportsOpen:!1,dropdownExportsOpen:!1}}render(){const{isClassReport:e,gradeId:t,solverGrades:n,onActiveGradeChange:r,csvExport:o,gettextObj:i}=this.props,{dropdownExportsOpen:s,dropdownReportsOpen:a}=this.state;return(0,pr.jsxs)("div",{className:"d-print-none",children:[(0,pr.jsx)(Fg,{children:(0,pr.jsx)("div",{className:"col-12",children:(0,pr.jsx)("div",{className:"py-3 pl-2 pr-3",children:(0,pr.jsxs)(tc,{className:"solve-page-link color-blue-mid font-weight-bold",to:"/Solver",children:[(0,pr.jsx)("i",{className:"fa fa-angle-left pr-2 color-blue-mid font-weight-bold"}),"Back to Solver"]})})})}),(0,pr.jsxs)(Fg,{className:"pb-4 col-12",children:[e&&(0,pr.jsx)("div",{className:"col-sm-4 col-lg-2",children:(0,pr.jsx)(Zg,{type:"select",value:t,onChange:e=>{r(e.target.value)},children:n.map(((e,t)=>(0,pr.jsx)("option",{value:e.id,children:e.label},t)))})}),(0,pr.jsxs)(Ku,{className:"reports mr-2",isOpen:a,toggle:this.toggleDropdownReports,children:[(0,pr.jsx)(hd,{caret:!0,children:this.props.reportTitle}),(0,pr.jsxs)(Ih,{children:[(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsx)(tc,{to:"/SummaryReport/School",children:"School Summary Report"})}),(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsx)(tc,{to:"/SummaryReport/Class",children:`${i.gettext("Class")} Summary Report`})}),(0,pr.jsx)(Ph,{tag:"div",children:(0,pr.jsx)(tc,{to:"/SummaryReport/Sociogram",children:"Sociogram View"})})]})]}),(0,pr.jsxs)(Ku,{className:"reports",isOpen:s,toggle:this.toggleDropdownExports,children:[(0,pr.jsx)(hd,{caret:!0,children:"More ..."}),(0,pr.jsxs)(Ih,{children:[(0,pr.jsx)(Ph,{onClick:this.print,children:"Print"}),e&&(0,pr.jsx)(Ph,{onClick:o,children:"Export"})]})]})]})]})}}const rF=e=>{const t=o.useContext(Cw).gettextObj;return(0,pr.jsx)(nF,{gettextObj:t,...e})},oF=w.J1`
  query ($solution: SolutionParams!, $adminOnly: Boolean) {
    solution(solution: $solution) {
      ... on Solution {
        id
        metrics(adminOnly: $adminOnly) {
          characteristicScores {
            aggregate {
              count
              total
            }
            characteristicMetrics {
              characteristic {
                id
                name
              }
              metric {
                count
                total
              }
            }
          }
          atLeastOneFriend {
            count
            total
          }
          differentTeacher {
            count
            total
          }
          importantRequests {
            count
            total
          }
          mandatoryRequests {
            count
            total
          }
        }
        studentMetrics(adminOnly: $adminOnly) {
          metrics {
            mandatoryRequests {
              count
              total
            }
            importantRequests {
              count
              total
            }
            differentTeacher
            friendshipPreferences {
              count
              total
            }
          }
          requestsMet {
            mandatoryRequests
            importantRequests
            differentTeacher
            friendshipPreferences
          }
          student {
            id
          }
        }
        activeGrade {
          id
          label
          order
        }
        classes {
          classDetails {
            label
            id
            schoolGrades {
              id
              code
            }
          }
          teachers {
            id
            firstName
            lastName
          }
          students {
            id
            firstName
            lastName
            gender
            studentCode
            newGrade {
              id
            }
            currentClass {
              id
              label
            }
            studentConstraints(adminOnly: $adminOnly) {
              id
              constraintId
              description
              mandatory
              pair
              status {
                reason
                status
              }
              studentTo {
                id
                firstName
                lastName
                newClass {
                  id
                }
              }
              studentFrom {
                id
                firstName
                lastName
                newClass {
                  id
                }
              }
            }
            teacherConstraints(adminOnly: $adminOnly) {
              id
              constraintId
              description
              mandatory
              pair
              status {
                reason
                status
              }
              teacherTo {
                id
                firstName
                lastName
              }
            }
            characteristicResponses {
              id
              label
              description
              value
              colour
              characteristic {
                id
                name
              }
            }
          }
          counts {
            total
            genders {
              activeMaleCount
              totalMaleCount
              activeFemaleCount
              totalFemaleCount
              activeNonBinaryCount
              totalNonBinaryCount
            }
          }
        }
      }
      ... on SolutionStatus {
        id
        state
      }
    }
  }
`,iF=w.J1`
  query ($adminOnly: Boolean, $schoolId: ID!) {
    constraints(adminOnly: $adminOnly, schoolId: $schoolId) {
      unmetConstraints {
        __typename
        ... on ConstraintsStudent {
          constraintId
          met
        }
        ... on ConstraintsTeacher {
          constraintId

          met
        }
      }
    }
  }
`;class sF extends o.Component{constructor(...e){super(...e),this.toggleExpanded=()=>{this.props.setExpanded(!this.props.expanded)}}render(){const{data:e,schoolCharacteristics:t,rowLength:n,expanded:r,unmetConstraints:i,hasGenderX:s}=this.props,a=r?"fa-chevron-up":"fa-chevron-down",l=r?"":"d-none",{classDetails:c,counts:u,students:d}=e,h=this.context.gettextObj,p=s?`${u.genders.totalMaleCount}M / ${u.genders.totalFemaleCount}F / ${u.genders.totalNonBinaryCount}X`:`${u.genders.totalMaleCount}M / ${u.genders.totalFemaleCount}F`,f=d.slice().sort(((e,t)=>e.lastName.localeCompare(t.lastName)));let m=t.map((e=>new Array(e.characteristicResponses.length).fill(0)));const g=(e,t,n,r,o)=>`${e} ${t} (${n?"Mandatory":"Important"} ${r?"Pair":"Separate"} - ${o?"Unmet":"Met"})`,v=(e,t)=>{let n=[];return e.studentConstraints.forEach((r=>{const o=t.some((e=>"ConstraintsStudent"===e.__typename&&e.constraintId===r.constraintId));e.id===r.studentFrom.id?n.push(g(r.studentTo.firstName,r.studentTo.lastName,r.mandatory,r.pair,o)):n.push(g(r.studentFrom.firstName,r.studentFrom.lastName,r.mandatory,r.pair,o))})),n.join(", ")},y=(e,t)=>{let n=[];return e.teacherConstraints.forEach((e=>{const r=t.some((t=>"ConstraintsTeacher"===t.__typename&&t.constraintId===e.constraintId));n.push(g(e.teacherTo.firstName,e.teacherTo.lastName,e.mandatory,e.pair,r))})),n.join(", ")};return(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)("tbody",{style:{display:"block"},children:(0,pr.jsx)("tr",{children:(0,pr.jsx)("td",{})})}),(0,pr.jsxs)("tbody",{className:"c-reports-table-body",children:[(0,pr.jsx)("tr",{className:"c-reports-table-body__row--divider bg-table-header",children:(0,pr.jsxs)("td",{colSpan:n,className:"c-reports-table-body__row__class-label",children:[(0,pr.jsx)("i",{className:`fa ${a} cursor-pointer p-2`,onClick:this.toggleExpanded}),`${h.gettext("Class")} ${c.label}`]})}),f.map(((e,n)=>{const{gender:r,characteristicResponses:o}=e;return(0,pr.jsxs)("tr",{className:`c-reports-table-body__row ${l}`,children:[(0,pr.jsx)("td",{className:"c-reports-table-body__row__data text-left pl-3",colSpan:"4",children:Uh(e)}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:(0,pr.jsx)(gm,{className:"m-a",label:ou(e,"currentClass.label")})}),(0,pr.jsx)("td",{className:`c-reports-table-body__row__data u-bold ${IC(r)}`,children:r.toUpperCase()}),t.map(((e,t)=>{const n=o.find((t=>t.characteristic.id===e.id));let r="";for(let o=0;o<e.characteristicResponses.length;o++){const{id:i,label:s}=e.characteristicResponses[o];su(n)&&i===n.id&&n.value>0&&(r=s,m[t][o]++)}return(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:r},t)})),(0,pr.jsxs)("td",{colSpan:"2",className:"c-reports-table-body__row__data c-reports-table-body__row__notes",children:[(0,pr.jsx)("p",{children:v(e,i)}),(0,pr.jsx)("p",{children:y(e,i)})]}),(0,pr.jsx)("td",{colSpan:"2",className:"c-reports-table-body__row__data c-reports-table-body__row__notes",children:e.friends.map((e=>{const t=f.some((t=>t.id===e.studentTo.id));return`${e.studentTo.firstName} ${e.studentTo.lastName} - (${t?"Met":"Unmet"})\n`}))}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data c-reports-table-body__row__notes",children:e.comments})]},n)})),(0,pr.jsxs)("tr",{className:"c-reports-table-body__row--total bg-grey-requests",children:[(0,pr.jsx)("td",{colSpan:"4",className:"text-right pr-2 border-right",children:"Total"}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:u.total}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:p}),(0,pr.jsx)(mF,{data:m}),(0,pr.jsx)("td",{colSpan:"2",className:"c-reports-table-body__row__data"}),(0,pr.jsx)("td",{colSpan:"2",className:"c-reports-table-body__row__data"}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data"})]}),(0,pr.jsx)("tr",{className:"c-reports-table-body__row--empty",children:(0,pr.jsx)("td",{colSpan:n,children:"Empty Row"})})]}),(0,pr.jsx)("tbody",{style:{display:"block",breakAfter:"page"},children:(0,pr.jsx)("tr",{children:(0,pr.jsx)("td",{})})})]})}}sF.contextType=Cw;const aF=({schoolCharacteristics:e})=>(0,pr.jsxs)("thead",{className:"c-reports-table__header bg-table-header",children:[(0,pr.jsxs)("tr",{children:[(0,pr.jsx)("th",{colSpan:"6",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"STUDENT DETAILS"}),(0,pr.jsx)("th",{colSpan:e.length,className:"c-reports-table__header__title color-total-text border-right py-3 pl-3",children:"CHARACTERISTICS"}),(0,pr.jsx)("th",{colSpan:"2",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"REQUESTS"}),(0,pr.jsx)("th",{colSpan:"2",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"FRIENDSHIPS"}),(0,pr.jsx)("th",{colSpan:"1",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"NOTES"})]}),(0,pr.jsxs)("tr",{children:[(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label",children:"Current Class"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-right",children:"Gender"}),(0,pr.jsx)(eF,{schoolCharacteristics:e}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-left"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-left"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-left border-right"})]})]}),lF=["atLeastOneFriend","mandatoryRequests","importantRequests","differentTeacher"];class cF extends o.Component{constructor(e){super(e),this.toggleExpanded=()=>{this.setState({expanded:!this.state.expanded})},this.renderPerformanceCells=e=>lF.map((t=>(0,pr.jsx)(fF,{metric:ou(e,t)},t))),this.state={expanded:!1,formattedData:[]}}componentDidMount(){const{data:e,schoolCharacteristics:t,studentMetrics:n,unmetConstraints:r}=this.props,o=e.activeGrade.id,i=zS(e.classes).reduce(((e,i)=>{const{classDetails:{label:s},counts:{genders:{activeMaleCount:a,activeFemaleCount:l,activeNonBinaryCount:c}}}=i;let u=t.map((e=>new Array(e.characteristicResponses.length).fill(0))),d={atLeastOneFriend:{count:0,total:0},mandatoryRequests:{count:0,total:0},importantRequests:{count:0,total:0},differentTeacher:{count:0,total:0}};return i.students.forEach((e=>{const{studentConstraints:i,teacherConstraints:s,newGrade:a}=e;if(!(a.id===o))return;[...i,...s].forEach((t=>{const{constraintId:n,mandatory:o,studentTo:i,studentFrom:s,status:a}=t;if(a&&"valid"===a.status){const t=o?"mandatoryRequests":"importantRequests",a=!r.includes(n);i&&ou(i,"newClass.id")===ou(s,"newClass.id")?e.id===s.id&&(d[t].total++,a&&d[t].count++):(d[t].total++,a&&d[t].count++)}}));const l=n.find((t=>t.student.id===e.id));if(su(l)){const{metrics:{differentTeacher:e,friendshipPreferences:t}}=l;su(t)&&(d.atLeastOneFriend.total++,t.count>0&&d.atLeastOneFriend.count++),su(e)&&(d.differentTeacher.total++,!0===e&&d.differentTeacher.count++)}t.forEach(((t,n)=>{const r=e.characteristicResponses.find((e=>e.characteristic.id===t.id));for(let e=0;e<t.characteristicResponses.length;e++){const{id:o}=t.characteristicResponses[e];su(r)&&o===r.id&&u[n][e]++}}))})),e.push({label:s,metricTotals:d,characteristicTotals:u,activeFemaleCount:l,activeMaleCount:a,activeNonBinaryCount:c}),e}),[]);this.setState({formattedData:i})}render(){const{data:e,schoolCharacteristics:t,rowLength:n,hasGenderX:r}=this.props,{expanded:o,formattedData:i}=this.state,s=o?"fa-chevron-up":"fa-chevron-down";let a={atLeastOneFriend:{count:0,total:0},mandatoryRequests:{count:0,total:0},importantRequests:{count:0,total:0},differentTeacher:{count:0,total:0}},l=t.map((e=>new Array(e.characteristicResponses.length).fill(0))),c={male:0,female:0,nonBinary:0};return(0,pr.jsxs)("tbody",{className:"c-reports-table-body",children:[(0,pr.jsx)("tr",{className:"c-reports-table-body__row--divider bg-table-header",children:(0,pr.jsxs)("td",{colSpan:n,className:"c-reports-table-body__row__class-label",children:[(0,pr.jsx)("i",{className:`fa ${s} cursor-pointer p-2`,onClick:this.toggleExpanded}),e.activeGrade.label]})}),i?i.map(((e,t)=>{const{label:n,metricTotals:i,characteristicTotals:s,activeFemaleCount:u,activeMaleCount:d,activeNonBinaryCount:h}=e;lF.forEach((e=>{a[e].count+=i[e].count,a[e].total+=i[e].total}));for(let r=0;r<s.length;r++){const e=s[r];for(let t=0;t<e.length;t++)l[r][t]+=e[t]}c.male+=d,c.female+=u,c.nonBinary+=h;const p=o?"":"d-none";return(0,pr.jsxs)("tr",{className:`c-reports-table-body__row ${p}`,children:[(0,pr.jsx)("td",{className:"c-reports-table-body__row__data text-left pl-2",colSpan:4,children:n}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:d}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:u}),r&&(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:h}),this.renderPerformanceCells(i),(0,pr.jsx)(mF,{data:s})]},t)})):null,(0,pr.jsxs)("tr",{className:"c-reports-table-body__row--total bg-grey-requests",children:[(0,pr.jsx)("td",{colSpan:"4",className:"text-right pr-2 border-right",children:"Subtotal"}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:c.male}),(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:c.female}),r&&(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:c.nonBinary}),this.renderPerformanceCells(a),(0,pr.jsx)(mF,{data:l})]}),(0,pr.jsx)("tr",{className:"c-reports-table-body__row--empty",children:(0,pr.jsx)("th",{colSpan:n,children:"Empty Row"})})]})}}const uF=({schoolCharacteristics:e,hasGenderX:t,schoolSettings:n})=>{const r=o.useContext(Cw).gettextObj;return(0,pr.jsxs)("thead",{className:"c-reports-table__header bg-table-header",children:[(0,pr.jsxs)("tr",{children:[(0,pr.jsx)("th",{colSpan:"4",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:`${r.gettext("CLASS")}`}),(0,pr.jsx)("th",{colSpan:t?"3":"2",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"GENDER"}),(0,pr.jsx)("th",{colSpan:"4",className:"c-reports-table__header__title border-right color-total-text py-3 pl-3",children:"PERFORMANCE"}),(0,pr.jsx)("th",{colSpan:e.length,className:"c-reports-table__header__title color-total-text py-3 pl-3",children:"CHARACTERISTICS"})]}),(0,pr.jsxs)("tr",{children:[(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-right"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label",children:"Male"}),t?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("th",{className:"c-reports-table__header__label",children:"Female"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label border-right",children:"Non-Binary"})]}):(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)("th",{className:"c-reports-table__header__label border-right",children:"Female"})}),(0,pr.jsxs)("th",{className:"c-reports-table__header__label c-reports-table__header__label--performance",children:["At Least"," ",Bh(n.minFriendPrefs,"Friend","Friends")]}),(0,pr.jsx)("th",{className:"c-reports-table__header__label c-reports-table__header__label--performance",children:"Mandatory Requests"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label c-reports-table__header__label--performance",children:"Important Requests"}),(0,pr.jsx)("th",{className:"c-reports-table__header__label c-reports-table__header__label--performance border-right",children:"Different Teacher"}),(0,pr.jsx)(eF,{schoolCharacteristics:e})]})]})};class dF extends o.Component{constructor(...e){super(...e),this.state={loadingExtra:!1,studentMetrics:this.props.studentMetrics||[],gradesFetched:0,schoolData:[],unmetConstraints:[]},this.fetchClassReportExtras=()=>{const{client:e,data:t,settings:n,setExpanded:r}=this.props,o=n.adminOnlyRequests,i=uw();zS(t).forEach(((e,t)=>r(t))),e.query({query:iF,variables:{adminOnly:o,schoolId:i},fetchPolicy:"no-cache"}).then((e=>{this.setState({unmetConstraints:e.data.constraints.unmetConstraints})})).catch((e=>{aw(e),this.setState({loadingExtra:!1})}))},this.fetchSchoolReportExtras=()=>{const{client:e,allGradesWithNewClasses:t,settings:n}=this.props;this.setState({loadingExtra:!0});const r=n.adminOnlyRequests,o=uw();e.query({query:iF,variables:{adminOnly:r,schoolId:o},fetchPolicy:"no-cache"}).then((n=>{this.setState({unmetConstraints:n.data.constraints.unmetConstraints?n.data.constraints.unmetConstraints.map((e=>e.constraintId)):[]}),t.forEach((n=>{const i={solution:{gradeId:n.id,schoolId:o},adminOnly:r};e.query({query:oF,variables:i,fetchPolicy:"no-cache"}).then((e=>{this.setState((n=>({loadingExtra:n.gradesFetched+1!==t.length,gradesFetched:n.gradesFetched+1,schoolData:e.data.solution.classes?[...n.schoolData,e.data.solution]:n.schoolData,studentMetrics:e.data.solution.studentMetrics?[...n.studentMetrics,...e.data.solution.studentMetrics]:n.studentMetrics})))})).catch((e=>{aw(e),this.setState((e=>({loadingExtra:e.gradesFetched+1!==t.length,gradesFetched:e.gradesFetched+1})))}))}))})).catch((e=>{aw(e),this.setState({loadingExtra:!1})}))}}componentDidMount(){const{isClassReport:e}=this.props;e?this.fetchClassReportExtras():this.fetchSchoolReportExtras()}render(){const{data:e,loadingCharacteristics:t,loadingSchoolSettings:n,schoolCharacteristics:r,allGradesWithNewClasses:i,isClassReport:s,expanded:a,setExpanded:l,schoolSettings:c}=this.props,{loadingExtra:u,gradesFetched:d,studentMetrics:h,unmetConstraints:p,schoolData:f}=this.state;if(t||u||n)return s?(0,pr.jsx)(qk,{}):(0,pr.jsxs)("div",{className:"position-relative d-flex align-items-center flex-column",children:[(0,pr.jsx)(qk,{}),(0,pr.jsxs)("div",{className:"mt-5 pt-6",children:["Fetching Grades ",d,"/",i.length]})]});let m;f.length>0&&f.sort(((e,t)=>e.activeGrade.order-t.activeGrade.order)),e&&(m=zS(e));const g=f&&f.flatMap((({classes:e})=>e.flatMap((({students:e})=>e)))).some((({gender:e})=>"X"===e)),v=e&&e.flatMap((({students:e})=>e)).some((({gender:e})=>"X"===e));return(0,pr.jsx)("table",{className:"c-reports-table",children:s?(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(aF,{schoolCharacteristics:r}),su(m)&&m.map(((e,t)=>(0,pr.jsx)(sF,{rowLength:11+r.length,data:e,schoolCharacteristics:r,expanded:a[t],setExpanded:e=>l(t,e),unmetConstraints:p,hasGenderX:v},t)))]}):(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(uF,{schoolCharacteristics:r,hasGenderX:g,schoolSettings:c}),su(f)&&f.map(((e,t)=>(0,pr.jsx)(cF,{rowLength:11+r.length,data:e,schoolCharacteristics:r,unmetConstraints:p,studentMetrics:h,hasGenderX:g},t)))]})})}}const hF=ng()(eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolSettings:t}})=>({loadingSchoolSettings:e,schoolSettings:t})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Dw,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loadingCharacteristics:e,schoolCharacteristics:t})}))(dF),pF=e=>su(e)?`${e.count}/${e.total}`:"",fF=({metric:e})=>{const t=e&&0===e.total?"color-grey-mid":"";return(0,pr.jsx)("td",{className:`c-reports-table-body__row__data ${t}`,children:pF(e)})},mF=({data:e})=>e.map(((e,t)=>{const n=e.length>1?e.join(" - "):e[0];return(0,pr.jsx)("td",{className:"c-reports-table-body__row__data",children:n},t)})),gF="no-solution-generated",vF="Error: Grades must have students",yF="no-solutions-found",bF=(e,t,n,r=!1)=>{const o=`${n}.count`,i=ou(e,o),s=ou(t,o);if(su(i)&&su(s)){if(r){const r=`${n}.total`,o=ou(e,r),a=ou(t,r);return Math.floor(s/a*100)-Math.floor(i/o*100)}return s-i}},xF=(e,t,n=!0,r=!0,o="")=>{const i={atLeastOneFriend:n?bF(e,t,"atLeastOneFriend"):"-",mandatoryRequests:bF(e,t,"mandatoryRequests"),importantRequests:bF(e,t,"importantRequests"),genderBalance:bF(e,t,"genderBalance"),differentTeacher:r?bF(e,t,"differentTeacher"):"-",characteristicScores:bF(e,t,"characteristicScores.aggregate",!0)};return""!==o||"all"!==o?{...i,activeCharacteristic:SF(e,t,o)}:i},wF=(e,t=!0,n=!0)=>{const r=ou(e,"new");if(!su(r))return;const o=ou(e,"new.solutionMetrics"),i=ou(e,"old.solutionMetrics");return xF(i,o,t,n)},SF=(e,t,n)=>{const r=t.characteristicScores.characteristicMetrics.find((e=>e.characteristic.id.toString()===n.toString())),o=e.characteristicScores.characteristicMetrics.find((e=>e.characteristic.id.toString()===n.toString()));if(su(r)&&su(o)&&o.metric&&r.metric)return Math.floor(r.metric.count/r.metric.total*100)-Math.floor(o.metric.count/o.metric.total*100)},CF=(e,t)=>{const n=ou(e,"new");if(!su(n))return;const r=ou(e,"new.solutionMetrics"),o=ou(e,"old.solutionMetrics");return SF(o,r,t)},jF=(e,t,n,r=!0)=>{if(!ou(e,"new")||!n)return;const o=e.solution.studentMetrics.find((e=>e.student.id===t)),i=n;let s=0;return i.metrics.differentTeacher!==o.metrics.differentTeacher&&(s=o.metrics.differentTeacher?1:-1),{friendshipPreferences:r?bF(i.metrics,o.metrics,"friendshipPreferences"):"-",mandatoryRequests:bF(i.metrics,o.metrics,"mandatoryRequests"),importantRequests:bF(i.metrics,o.metrics,"importantRequests"),differentTeacher:s}},_F=(e,t,n)=>{const r=Array.from(e),o=Array.from(t),i=n.toReversed();for(const a of i){const[e]=r.splice(a,1);o.push(e)}const s={};return s.sourceClone=r,s.destClone=o,s},kF=e=>ou(e,"studentMetric.student.id"),NF=e=>{const t=(0,j.cloneDeep)(e),n=t.activeGrade.id.toString();t.classes.sort(((e,t)=>e.classDetails.label.localeCompare(t.classDetails.label)));const r=t.classes.map((e=>(LS(n,e.students),e)));return{...t,classes:r}},EF=e=>"SolutionStatus"===e.__typename;class TF extends o.Component{constructor(e){super(e),this.expandAllClasses=()=>this.setAllClassesExpand(!0),this.setAllClassesExpand=(e,t)=>{this.setState((t=>{let n={};return Object.keys(t.expanded).forEach((t=>{n[t]=e})),{expanded:n}}),t)},this.setExpanded=(e,t)=>{this.setState((n=>({expanded:{...n.expanded,[e]:t||!1}})))},this.onActiveGradeChange=e=>{const{updateSolverActiveGrade:t}=this.props;t({variables:{activeGrade:parseInt(e,10)}})},this.csvExport=async()=>{const{solverGrades:e,user:t,settings:n,activeGrade:r}=this.props,o=await this.context.getTokenSilently(),i=uw(),s=t.role;if(!i||!s||!o)return;const a=ou(e[0],"id"),l=r||a,c=`${_s()}/export_class_summary/${i}/${l}?filter_sensitive=${n.adminOnlyRequests?"false":"true"}`,u=await $w(o,c);if(!u.ok){const e=await u.text();aw({message:e}),this.setState({errors:{export:"Network error attempting to export"}})}},this.state={expanded:{}}}componentDidMount(){window.addEventListener("beforeprint",this.expandAllClasses)}componentWillUnmount(){window.removeEventListener("beforeprint",this.expandAllClasses)}render(){const{client:e,loading:t,activeGrade:n,solverGrades:r,gettextObj:o}=this.props;if(t)return(0,pr.jsx)(qk,{});const i={gradeId:""!==n?n.toString():ou(r[0],"id"),schoolId:sessionStorage.getItem(Ht)};return(0,pr.jsx)(Vm,{query:q,variables:{solution:i},fetchPolicy:"network-only",children:({loading:t,error:n,data:s,refetch:a})=>{if(t)return(0,pr.jsx)(qk,{});let l;if(n){if(!n.message.includes(yF))return(0,pr.jsx)(eN,{refetch:a});l=(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"No solution has been generated. Please run the solver for this grade."})})}else l=EF(s.solution)?(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"A solution is currently being generated. Please wait for it to complete."})}):(0,pr.jsx)(hF,{isClassReport:!0,activeGradeId:i.gradeId,client:e,studentMetrics:s.solution.studentMetrics,data:s.solution.classes,expanded:this.state.expanded,setExpanded:this.setExpanded});return(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsx)(rF,{reportTitle:`${o.gettext("Class")} Summary Report`,isClassReport:!0,solverGrades:r,gradeId:i.gradeId,onActiveGradeChange:this.onActiveGradeChange,setAllClassesExpand:this.setAllClassesExpand,csvExport:this.csvExport}),l]})}})}}TF.contextType=tu;const OF=ng()(eg(ee,{options:()=>({variables:{schoolId:sessionStorage.getItem(Ht)}}),props:({data:{loading:e,allGradesWithNewClasses:t}})=>({loading:e,solverGrades:t})}),eg(se,{props:({data:{solver:{activeGrade:e}}})=>({activeGrade:e})}),eg(ce,{name:"updateSolverActiveGrade"}),eg(O,{props:({data:{myprofile:e}})=>({user:e})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}))(lj((e=>{const t=o.useContext(Cw).gettextObj;return(0,pr.jsx)(TF,{gettextObj:t,...e})})));class IF extends o.Component{render(){const{loadingGrades:e,...t}=this.props;return e?(0,pr.jsx)(qk,{}):(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsx)(rF,{reportTitle:"School Summary Report"}),(0,pr.jsx)(hF,{...t})]})}}const RF=ng()(eg(ee,{options:()=>({variables:{schoolId:sessionStorage.getItem(Ht)}}),props:({data:{loading:e,error:t,allGradesWithNewClasses:n}})=>({loadingGrades:e,allGradesWithNewClasses:n,error:t})}))(lj(IF));function AF(){}function MF(e){return null==e?AF:function(){return this.querySelector(e)}}function PF(){return[]}function DF(e){return null==e?PF:function(){return this.querySelectorAll(e)}}function FF(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function LF(e){return function(){return this.matches(e)}}function BF(e){return function(t){return t.matches(e)}}var UF=Array.prototype.find;function GF(){return this.firstElementChild}var $F=Array.prototype.filter;function qF(){return Array.from(this.children)}function zF(e){return new Array(e.length)}function VF(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function HF(e,t,n,r,o,i){for(var s,a=0,l=t.length,c=i.length;a<c;++a)(s=t[a])?(s.__data__=i[a],r[a]=s):n[a]=new VF(e,i[a]);for(;a<l;++a)(s=t[a])&&(o[a]=s)}function WF(e,t,n,r,o,i,s){var a,l,c,u=new Map,d=t.length,h=i.length,p=new Array(d);for(a=0;a<d;++a)(l=t[a])&&(p[a]=c=s.call(l,l.__data__,a,t)+"",u.has(c)?o[a]=l:u.set(c,l));for(a=0;a<h;++a)c=s.call(e,i[a],a,i)+"",(l=u.get(c))?(r[a]=l,l.__data__=i[a],u.delete(c)):n[a]=new VF(e,i[a]);for(a=0;a<d;++a)(l=t[a])&&u.get(p[a])===l&&(o[a]=l)}function YF(e){return e.__data__}function QF(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function JF(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}VF.prototype={constructor:VF,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var KF="http://www.w3.org/1999/xhtml";const XF={svg:"http://www.w3.org/2000/svg",xhtml:KF,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ZF(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),XF.hasOwnProperty(t)?{space:XF[t],local:e}:e}function eL(e){return function(){this.removeAttribute(e)}}function tL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nL(e,t){return function(){this.setAttribute(e,t)}}function rL(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function oL(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function iL(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function sL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function aL(e){return function(){this.style.removeProperty(e)}}function lL(e,t,n){return function(){this.style.setProperty(e,t,n)}}function cL(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function uL(e,t){return e.style.getPropertyValue(t)||sL(e).getComputedStyle(e,null).getPropertyValue(t)}function dL(e){return function(){delete this[e]}}function hL(e,t){return function(){this[e]=t}}function pL(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function fL(e){return e.trim().split(/^|\s+/)}function mL(e){return e.classList||new gL(e)}function gL(e){this._node=e,this._names=fL(e.getAttribute("class")||"")}function vL(e,t){for(var n=mL(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function yL(e,t){for(var n=mL(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function bL(e){return function(){vL(this,e)}}function xL(e){return function(){yL(this,e)}}function wL(e,t){return function(){(t.apply(this,arguments)?vL:yL)(this,e)}}function SL(){this.textContent=""}function CL(e){return function(){this.textContent=e}}function jL(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function _L(){this.innerHTML=""}function kL(e){return function(){this.innerHTML=e}}function NL(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function EL(){this.nextSibling&&this.parentNode.appendChild(this)}function TL(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function OL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===KF&&t.documentElement.namespaceURI===KF?t.createElement(e):t.createElementNS(n,e)}}function IL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function RL(e){var t=ZF(e);return(t.local?IL:OL)(t)}function AL(){return null}function ML(){var e=this.parentNode;e&&e.removeChild(this)}function PL(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function DL(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function FL(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function LL(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var s=0,a=o.length;s<a;++s)if((r=o[s]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function BL(e,t,n){var r=sL(e),o=r.CustomEvent;"function"===typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function UL(e,t){return function(){return BL(this,e,t)}}function GL(e,t){return function(){return BL(this,e,t.apply(this,arguments))}}gL.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var $L=[null];function qL(e,t){this._groups=e,this._parents=t}function zL(){return new qL([[document.documentElement]],$L)}qL.prototype=zL.prototype={constructor:qL,select:function(e){"function"!==typeof e&&(e=MF(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,s,a=t[o],l=a.length,c=r[o]=new Array(l),u=0;u<l;++u)(i=a[u])&&(s=e.call(i,i.__data__,u,a))&&("__data__"in i&&(s.__data__=i.__data__),c[u]=s);return new qL(r,this._parents)},selectAll:function(e){e="function"===typeof e?FF(e):DF(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s,a=t[i],l=a.length,c=0;c<l;++c)(s=a[c])&&(r.push(e.call(s,s.__data__,c,a)),o.push(s));return new qL(r,o)},selectChild:function(e){return this.select(null==e?GF:function(e){return function(){return UF.call(this.children,e)}}("function"===typeof e?e:BF(e)))},selectChildren:function(e){return this.selectAll(null==e?qF:function(e){return function(){return $F.call(this.children,e)}}("function"===typeof e?e:BF(e)))},filter:function(e){"function"!==typeof e&&(e=LF(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,s=t[o],a=s.length,l=r[o]=[],c=0;c<a;++c)(i=s[c])&&e.call(i,i.__data__,c,s)&&l.push(i);return new qL(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,YF);var n=t?WF:HF,r=this._parents,o=this._groups;"function"!==typeof e&&(e=function(e){return function(){return e}}(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],d=o[c],h=d.length,p=QF(e.call(u,u&&u.__data__,c,r)),f=p.length,m=a[c]=new Array(f),g=s[c]=new Array(f);n(u,d,m,g,l[c]=new Array(h),p,t);for(var v,y,b=0,x=0;b<f;++b)if(v=m[b]){for(b>=x&&(x=b+1);!(y=g[x])&&++x<f;);v._next=y||null}}return(s=new qL(s,r))._enter=a,s._exit=l,s},enter:function(){return new qL(this._enter||this._groups.map(zF),this._parents)},exit:function(){return new qL(this._exit||this._groups.map(zF),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c,u=n[l],d=r[l],h=u.length,p=a[l]=new Array(h),f=0;f<h;++f)(c=u[f]||d[f])&&(p[f]=c);for(;l<o;++l)a[l]=n[l];return new qL(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,s=o[i];--i>=0;)(r=o[i])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=JF);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s,a=n[i],l=a.length,c=o[i]=new Array(l),u=0;u<l;++u)(s=a[u])&&(c[u]=s);c.sort(t)}return new qL(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],s=0,a=i.length;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this},attr:function(e,t){var n=ZF(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?tL:eL:"function"===typeof t?n.local?iL:oL:n.local?rL:nL)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?aL:"function"===typeof t?cL:lL)(e,t,null==n?"":n)):uL(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?dL:"function"===typeof t?pL:hL)(e,t)):this.node()[e]},classed:function(e,t){var n=fL(e+"");if(arguments.length<2){for(var r=mL(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"===typeof t?wL:t?bL:xL)(n,t))},text:function(e){return arguments.length?this.each(null==e?SL:("function"===typeof e?jL:CL)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?_L:("function"===typeof e?NL:kL)(e)):this.node().innerHTML},raise:function(){return this.each(EL)},lower:function(){return this.each(TL)},append:function(e){var t="function"===typeof e?e:RL(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:RL(e),r=null==t?AL:"function"===typeof t?t:MF(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ML)},clone:function(e){return this.select(e?DL:PL)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=i.length;if(!(arguments.length<2)){for(a=t?LL:FL,r=0;r<s;++r)this.each(a(i[r],t,n));return this}var a=this.node().__on;if(a)for(var l,c=0,u=a.length;c<u;++c)for(r=0,l=a[c];r<s;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?GL:UL)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,s=o.length;i<s;++i)(r=o[i])&&(yield r)}};const VL=zL;var HL={value:()=>{}};function WL(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new YL(r)}function YL(e){this._=e}function QL(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function JL(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=HL,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}YL.prototype=WL.prototype={constructor:YL,on:function(e,t){var n,r,o=this._,i=(r=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),s=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++s<a;)if(n=(e=i[s]).type)o[n]=JL(o[n],e.name,t);else if(null==t)for(n in o)o[n]=JL(o[n],e.name,null);return this}for(;++s<a;)if((n=(e=i[s]).type)&&(n=QL(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new YL(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};const KL=WL;var XL,ZL,eB=0,tB=0,nB=0,rB=1e3,oB=0,iB=0,sB=0,aB="object"===typeof performance&&performance.now?performance:Date,lB="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cB(){return iB||(lB(uB),iB=aB.now()+sB)}function uB(){iB=0}function dB(){this._call=this._time=this._next=null}function hB(e,t,n){var r=new dB;return r.restart(e,t,n),r}function pB(){iB=(oB=aB.now())+sB,eB=tB=0;try{!function(){cB(),++eB;for(var e,t=XL;t;)(e=iB-t._time)>=0&&t._call.call(void 0,e),t=t._next;--eB}()}finally{eB=0,function(){var e,t,n=XL,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:XL=t);ZL=e,mB(r)}(),iB=0}}function fB(){var e=aB.now(),t=e-oB;t>rB&&(sB-=t,oB=e)}function mB(e){eB||(tB&&(tB=clearTimeout(tB)),e-iB>24?(e<1/0&&(tB=setTimeout(pB,e-aB.now()-sB)),nB&&(nB=clearInterval(nB))):(nB||(oB=aB.now(),nB=setInterval(fB,rB)),eB=1,lB(pB)))}function gB(e,t,n){var r=new dB;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}dB.prototype=hB.prototype={constructor:dB,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?cB():+n)+(null==t?0:+t),this._next||ZL===this||(ZL?ZL._next=this:XL=this,ZL=this),this._call=e,this._time=n,mB()},stop:function(){this._call&&(this._call=null,this._time=1/0,mB())}};var vB=KL("start","end","cancel","interrupt"),yB=[],bB=0,xB=1,wB=2,SB=3,CB=4,jB=5,_B=6;function kB(e,t,n,r,o,i){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=xB,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(i){var c,u,d,h;if(n.state!==xB)return l();for(c in o)if((h=o[c]).name===n.name){if(h.state===SB)return gB(s);h.state===CB?(h.state=_B,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=_B,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(gB((function(){n.state===SB&&(n.state=CB,n.timer.restart(a,n.delay,n.time),a(i))})),n.state=wB,n.on.call("start",e,e.__data__,n.index,n.group),n.state===wB){for(n.state=SB,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=jB,1),i=-1,s=r.length;++i<s;)r[i].call(e,o);n.state===jB&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=_B,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=hB(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:vB,tween:yB,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:bB})}function NB(e,t){var n=TB(e,t);if(n.state>bB)throw new Error("too late; already scheduled");return n}function EB(e,t){var n=TB(e,t);if(n.state>SB)throw new Error("too late; already running");return n}function TB(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function OB(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var IB,RB=180/Math.PI,AB={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function MB(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*RB,skewX:Math.atan(l)*RB,scaleX:s,scaleY:a}}function PB(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,s){var a=[],l=[];return i=e(i),s=e(s),function(e,r,o,i,s,a){if(e!==o||r!==i){var l=s.push("translate(",null,t,null,n);a.push({i:l-4,x:OB(e,o)},{i:l-2,x:OB(r,i)})}else(o||i)&&s.push("translate("+o+t+i+n)}(i.translateX,i.translateY,s.translateX,s.translateY,a,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:OB(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,s.rotate,a,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:OB(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,s.skewX,a,l),function(e,t,n,r,i,s){if(e!==n||t!==r){var a=i.push(o(i)+"scale(",null,",",null,")");s.push({i:a-4,x:OB(e,n)},{i:a-2,x:OB(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,s.scaleX,s.scaleY,a,l),i=s=null,function(e){for(var t,n=-1,r=l.length;++n<r;)a[(t=l[n]).i]=t.x(e);return a.join("")}}}var DB=PB((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?AB:MB(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),FB=PB((function(e){return null==e?AB:(IB||(IB=document.createElementNS("http://www.w3.org/2000/svg","g")),IB.setAttribute("transform",e),(e=IB.transform.baseVal.consolidate())?MB((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):AB)}),", ",")",")");function LB(e,t){var n,r;return function(){var o=EB(this,e),i=o.tween;if(i!==n)for(var s=0,a=(r=n=i).length;s<a;++s)if(r[s].name===t){(r=r.slice()).splice(s,1);break}o.tween=r}}function BB(e,t,n){var r,o;if("function"!==typeof n)throw new Error;return function(){var i=EB(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a;break}l===c&&o.push(a)}i.tween=o}}function UB(e,t,n){var r=e._id;return e.each((function(){var e=EB(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return TB(e,r).value[t]}}function GB(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function $B(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qB(){}var zB=.7,VB=1/zB,HB="\\s*([+-]?\\d+)\\s*",WB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",YB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",QB=/^#([0-9a-f]{3,8})$/,JB=new RegExp(`^rgb\\(${HB},${HB},${HB}\\)$`),KB=new RegExp(`^rgb\\(${YB},${YB},${YB}\\)$`),XB=new RegExp(`^rgba\\(${HB},${HB},${HB},${WB}\\)$`),ZB=new RegExp(`^rgba\\(${YB},${YB},${YB},${WB}\\)$`),eU=new RegExp(`^hsl\\(${WB},${YB},${YB}\\)$`),tU=new RegExp(`^hsla\\(${WB},${YB},${YB},${WB}\\)$`),nU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rU(){return this.rgb().formatHex()}function oU(){return this.rgb().formatRgb()}function iU(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=QB.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?sU(t):3===n?new cU(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?aU(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?aU(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=JB.exec(e))?new cU(t[1],t[2],t[3],1):(t=KB.exec(e))?new cU(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=XB.exec(e))?aU(t[1],t[2],t[3],t[4]):(t=ZB.exec(e))?aU(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=eU.exec(e))?mU(t[1],t[2]/100,t[3]/100,1):(t=tU.exec(e))?mU(t[1],t[2]/100,t[3]/100,t[4]):nU.hasOwnProperty(e)?sU(nU[e]):"transparent"===e?new cU(NaN,NaN,NaN,0):null}function sU(e){return new cU(e>>16&255,e>>8&255,255&e,1)}function aU(e,t,n,r){return r<=0&&(e=t=n=NaN),new cU(e,t,n,r)}function lU(e,t,n,r){return 1===arguments.length?function(e){return e instanceof qB||(e=iU(e)),e?new cU((e=e.rgb()).r,e.g,e.b,e.opacity):new cU}(e):new cU(e,t,n,null==r?1:r)}function cU(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function uU(){return`#${fU(this.r)}${fU(this.g)}${fU(this.b)}`}function dU(){const e=hU(this.opacity);return`${1===e?"rgb(":"rgba("}${pU(this.r)}, ${pU(this.g)}, ${pU(this.b)}${1===e?")":`, ${e})`}`}function hU(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pU(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fU(e){return((e=pU(e))<16?"0":"")+e.toString(16)}function mU(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vU(e,t,n,r)}function gU(e){if(e instanceof vU)return new vU(e.h,e.s,e.l,e.opacity);if(e instanceof qB||(e=iU(e)),!e)return new vU;if(e instanceof vU)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(s=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new vU(s,a,l,e.opacity)}function vU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yU(e){return(e=(e||0)%360)<0?e+360:e}function bU(e){return Math.max(0,Math.min(1,e||0))}function xU(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function wU(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}GB(qB,iU,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rU,formatHex:rU,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gU(this).formatHsl()},formatRgb:oU,toString:oU}),GB(cU,lU,$B(qB,{brighter(e){return e=null==e?VB:Math.pow(VB,e),new cU(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?zB:Math.pow(zB,e),new cU(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cU(pU(this.r),pU(this.g),pU(this.b),hU(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uU,formatHex:uU,formatHex8:function(){return`#${fU(this.r)}${fU(this.g)}${fU(this.b)}${fU(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dU,toString:dU})),GB(vU,(function(e,t,n,r){return 1===arguments.length?gU(e):new vU(e,t,n,null==r?1:r)}),$B(qB,{brighter(e){return e=null==e?VB:Math.pow(VB,e),new vU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?zB:Math.pow(zB,e),new vU(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new cU(xU(e>=240?e-240:e+120,o,r),xU(e,o,r),xU(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new vU(yU(this.h),bU(this.s),bU(this.l),hU(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=hU(this.opacity);return`${1===e?"hsl(":"hsla("}${yU(this.h)}, ${100*bU(this.s)}%, ${100*bU(this.l)}%${1===e?")":`, ${e})`}`}}));const SU=e=>()=>e;function CU(e,t){return function(n){return e+n*t}}function jU(e){return 1===(e=+e)?_U:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):SU(isNaN(t)?n:t)}}function _U(e,t){var n=t-e;return n?CU(e,n):SU(isNaN(e)?t:e)}const kU=function e(t){var n=jU(t);function r(e,t){var r=n((e=lU(e)).r,(t=lU(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),s=_U(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function NU(e){return function(t){var n,r,o=t.length,i=new Array(o),s=new Array(o),a=new Array(o);for(n=0;n<o;++n)r=lU(t[n]),i[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return i=e(i),s=e(s),a=e(a),r.opacity=1,function(e){return r.r=i(e),r.g=s(e),r.b=a(e),r+""}}}NU((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,a=r<t-1?e[r+2]:2*i-o;return wU((n-r/t)*t,s,o,i,a)}})),NU((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return wU((n-r/t)*t,o,i,s,a)}}));var EU=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,TU=new RegExp(EU.source,"g");function OU(e,t){var n,r,o,i=EU.lastIndex=TU.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=EU.exec(e))&&(r=TU.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:OB(n,r)})),i=TU.lastIndex;return i<t.length&&(o=t.slice(i),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}function IU(e,t){var n;return("number"===typeof t?OB:t instanceof iU?kU:(n=iU(t))?(t=n,kU):OU)(e,t)}function RU(e){return function(){this.removeAttribute(e)}}function AU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function MU(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function PU(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function DU(e,t,n){var r,o,i;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttribute(e))===(a=l+"")?null:s===r&&a===o?i:(o=a,i=t(r=s,l));this.removeAttribute(e)}}function FU(e,t,n){var r,o,i;return function(){var s,a,l=n(this);if(null!=l)return(s=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:s===r&&a===o?i:(o=a,i=t(r=s,l));this.removeAttributeNS(e.space,e.local)}}function LU(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function BU(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function UU(e,t){return function(){NB(this,e).delay=+t.apply(this,arguments)}}function GU(e,t){return t=+t,function(){NB(this,e).delay=t}}function $U(e,t){return function(){EB(this,e).duration=+t.apply(this,arguments)}}function qU(e,t){return t=+t,function(){EB(this,e).duration=t}}var zU=VL.prototype.constructor;function VU(e){return function(){this.style.removeProperty(e)}}var HU=0;function WU(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function YU(){return++HU}var QU=VL.prototype;WU.prototype=function(e){return VL().transition(e)}.prototype={constructor:WU,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=MF(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a,l,c=r[s],u=c.length,d=i[s]=new Array(u),h=0;h<u;++h)(a=c[h])&&(l=e.call(a,a.__data__,h,c))&&("__data__"in a&&(l.__data__=a.__data__),d[h]=l,kB(d[h],t,n,h,d,TB(a,n)));return new WU(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=DF(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l,c=r[a],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,p=e.call(l,l.__data__,d,c),f=TB(l,n),m=0,g=p.length;m<g;++m)(h=p[m])&&kB(h,t,n,m,p,f);i.push(p),s.push(l)}return new WU(i,s,t,n)},selectChild:QU.selectChild,selectChildren:QU.selectChildren,filter:function(e){"function"!==typeof e&&(e=LF(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,s=t[o],a=s.length,l=r[o]=[],c=0;c<a;++c)(i=s[c])&&e.call(i,i.__data__,c,s)&&l.push(i);return new WU(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l,c=t[a],u=n[a],d=c.length,h=s[a]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(h[p]=l);for(;a<r;++a)s[a]=t[a];return new WU(s,this._parents,this._name,this._id)},selection:function(){return new zU(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=YU(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s,a=r[i],l=a.length,c=0;c<l;++c)if(s=a[c]){var u=TB(s,t);kB(s,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new WU(r,this._parents,e,n)},call:QU.call,nodes:QU.nodes,node:QU.node,size:QU.size,empty:QU.empty,each:QU.each,on:function(e,t){var n=this._id;return arguments.length<2?TB(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?NB:EB;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=ZF(e),r="transform"===n?FB:IU;return this.attrTween(e,"function"===typeof t?(n.local?FU:DU)(n,r,UB(this,"attr."+e,t)):null==t?(n.local?AU:RU)(n):(n.local?PU:MU)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=ZF(e);return this.tween(n,(r.local?LU:BU)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?DB:IU;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=uL(this,e),s=(this.style.removeProperty(e),uL(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}(e,r)).on("end.style."+e,VU(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var s=uL(this,e),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(e),l=a=uL(this,e)),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}(e,r,UB(this,"style."+e,t))).each(function(e,t){var n,r,o,i,s="style."+t,a="end."+s;return function(){var l=EB(this,e),c=l.on,u=null==l.value[s]?i||(i=VU(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(a,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var s=uL(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,i,n)),r}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(UB(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=TB(this.node(),n).tween,i=0,s=o.length;i<s;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?LB:BB)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?UU:GU)(t,e)):TB(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?$U:qU)(t,e)):TB(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!==typeof t)throw new Error;return function(){EB(this,e).ease=t}}(t,e)):TB(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;EB(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,s){var a={value:s},l={value:function(){0===--o&&i()}};n.each((function(){var n=EB(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:QU[Symbol.iterator]};var JU={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function KU(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}VL.prototype.interrupt=function(e){return this.each((function(){!function(e,t){var n,r,o,i=e.__transition,s=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>wB&&n.state<jB,n.state=_B,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):s=!1;s&&delete e.__transition}}(this,e)}))},VL.prototype.transition=function(e){var t,n;e instanceof WU?(t=e._id,e=e._name):(t=YU(),(n=JU).time=cB(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s,a=r[i],l=a.length,c=0;c<l;++c)(s=a[c])&&kB(s,e,t,c,a,n||KU(s,t));return new WU(r,this._parents,e,t)};const{abs:XU,max:ZU,min:eG}=Math;function tG(e){return[+e[0],+e[1]]}function nG(e){return[tG(e[0]),tG(e[1])]}["w","e"].map(rG),["n","s"].map(rG),["n","w","e","s","nw","ne","sw","se"].map(rG);function rG(e){return{type:e}}function oG(e){return"string"===typeof e?new qL([[document.querySelector(e)]],[document.documentElement]):new qL([[e]],$L)}function iG(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const sG={passive:!1},aG={capture:!0,passive:!1};function lG(e){e.stopImmediatePropagation()}function cG(e){e.preventDefault(),e.stopImmediatePropagation()}const uG=e=>()=>e;function dG(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function hG(e){return!e.ctrlKey&&!e.button}function pG(){return this.parentNode}function fG(e,t){return null==t?{x:e.x,y:e.y}:t}function mG(){return navigator.maxTouchPoints||"ontouchstart"in this}function gG(){var e,t,n,r,o=hG,i=pG,s=fG,a=mG,l={},c=KL("start","drag","end"),u=0,d=0;function h(e){e.on("mousedown.drag",p).filter(a).on("touchstart.drag",g).on("touchmove.drag",v,sG).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&o.call(this,s,a)){var l=b(this,i.call(this,s,a),s,a,"mouse");l&&(oG(s.view).on("mousemove.drag",f,aG).on("mouseup.drag",m,aG),function(e){var t=e.document.documentElement,n=oG(e).on("dragstart.drag",cG,aG);"onselectstart"in t?n.on("selectstart.drag",cG,aG):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(s.view),lG(s),n=!1,e=s.clientX,t=s.clientY,l("start",s))}}function f(r){if(cG(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}l.mouse("drag",r)}function m(e){oG(e.view).on("mousemove.drag mouseup.drag",null),function(e,t){var n=e.document.documentElement,r=oG(e).on("dragstart.drag",null);t&&(r.on("click.drag",cG,aG),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,n),cG(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,s=e.changedTouches,a=i.call(this,e,t),l=s.length;for(n=0;n<l;++n)(r=b(this,a,e,t,s[n].identifier,s[n]))&&(lG(e),r("start",e,s[n]))}}function v(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(cG(e),n("drag",e,r[t]))}function y(e){var t,n,o=e.changedTouches,i=o.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=l[o[t].identifier])&&(lG(e),n("end",e,o[t]))}function b(e,t,n,r,o,i){var a,d,p,f=c.copy(),m=iG(i||n,t);if(null!=(p=s.call(e,new dG("beforestart",{sourceEvent:n,target:h,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:f}),r)))return a=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,s,c){var g,v=m;switch(i){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":m=iG(c||s,t),g=u}f.call(i,e,new dG(i,{sourceEvent:s,subject:p,target:h,identifier:o,active:g,x:m[0]+a,y:m[1]+d,dx:m[0]-v[0],dy:m[1]-v[1],dispatch:f}),r)}}return h.filter=function(e){return arguments.length?(o="function"===typeof e?e:uG(!!e),h):o},h.container=function(e){return arguments.length?(i="function"===typeof e?e:uG(e),h):i},h.subject=function(e){return arguments.length?(s="function"===typeof e?e:uG(e),h):s},h.touchable=function(e){return arguments.length?(a="function"===typeof e?e:uG(!!e),h):a},h.on=function(){var e=c.on.apply(c,arguments);return e===c?h:e},h.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,h):Math.sqrt(d)},h}function vG(e){return function(){return e}}function yG(e){return 1e-6*(e()-.5)}function bG(e){return e.index}function xG(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function wG(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,s,a,l,c,u,d,h,p=e._root,f={data:r},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((c=t>=(i=(m+v)/2))?m=i:v=i,(u=n>=(s=(g+y)/2))?g=s:y=s,o=p,!(p=p[d=u<<1|c]))return o[d]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&n===l)return f.next=p,o?o[d]=f:e._root=f,e;do{o=o?o[d]=new Array(4):e._root=new Array(4),(c=t>=(i=(m+v)/2))?m=i:v=i,(u=n>=(s=(g+y)/2))?g=s:y=s}while((d=u<<1|c)===(h=(l>=s)<<1|a>=i));return o[h]=p,o[d]=f,e}function SG(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function CG(e){return e[0]}function jG(e){return e[1]}function _G(e,t,n){var r=new kG(null==t?CG:t,null==n?jG:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function kG(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function NG(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}dG.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var EG=_G.prototype=kG.prototype;EG.copy=function(){var e,t,n=new kG(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=NG(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var o=0;o<4;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(4)}):r.target[o]=NG(t));return n},EG.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return wG(this.cover(t,n),t,n,e)},EG.addAll=function(e){var t,n,r,o,i=e.length,s=new Array(i),a=new Array(i),l=1/0,c=1/0,u=-1/0,d=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=r,a[n]=o,r<l&&(l=r),r>u&&(u=r),o<c&&(c=o),o>d&&(d=o));if(l>u||c>d)return this;for(this.cover(l,c).cover(u,d),n=0;n<i;++n)wG(this,s[n],a[n],e[n]);return this},EG.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var s,a,l=o-n||1,c=this._root;n>e||e>=o||r>t||t>=i;)switch(a=(t<r)<<1|e<n,(s=new Array(4))[a]=c,c=s,l*=2,a){case 0:o=n+l,i=r+l;break;case 1:n=o-l,i=r+l;break;case 2:o=n+l,r=i-l;break;case 3:n=o-l,r=i-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},EG.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},EG.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},EG.find=function(e,t,n){var r,o,i,s,a,l,c,u=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],m=this._root;for(m&&f.push(new SG(m,u,d,h,p)),null==n?n=1/0:(u=e-n,d=t-n,h=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(m=l.node)||(o=l.x0)>h||(i=l.y0)>p||(s=l.x1)<u||(a=l.y1)<d))if(m.length){var g=(o+s)/2,v=(i+a)/2;f.push(new SG(m[3],g,v,s,a),new SG(m[2],o,v,g,a),new SG(m[1],g,i,s,v),new SG(m[0],o,i,g,v)),(c=(t>=v)<<1|e>=g)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-c],f[f.length-1-c]=l)}else{var y=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),x=y*y+b*b;if(x<n){var w=Math.sqrt(n=x);u=e-w,d=t-w,h=e+w,p=t+w,r=m.data}}return r},EG.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,o,i,s,a,l,c,u,d,h,p=this._root,f=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=i>=(a=(f+g)/2))?f=a:g=a,(u=s>=(l=(m+v)/2))?m=l:v=l,t=p,!(p=p[d=u<<1|c]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,h=d)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(o=p.next)&&delete p.next,r?(o?r.next=o:delete r.next,this):t?(o?t[d]=o:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=o,this)},EG.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},EG.root=function(){return this._root},EG.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},EG.visit=function(e){var t,n,r,o,i,s,a=[],l=this._root;for(l&&a.push(new SG(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,o=t.y0,i=t.x1,s=t.y1)&&l.length){var c=(r+i)/2,u=(o+s)/2;(n=l[3])&&a.push(new SG(n,c,u,i,s)),(n=l[2])&&a.push(new SG(n,r,u,c,s)),(n=l[1])&&a.push(new SG(n,c,o,i,u)),(n=l[0])&&a.push(new SG(n,r,o,c,u))}return this},EG.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new SG(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var i,s=t.x0,a=t.y0,l=t.x1,c=t.y1,u=(s+l)/2,d=(a+c)/2;(i=o[0])&&n.push(new SG(i,s,a,u,d)),(i=o[1])&&n.push(new SG(i,u,a,l,d)),(i=o[2])&&n.push(new SG(i,s,d,u,c)),(i=o[3])&&n.push(new SG(i,u,d,l,c))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},EG.x=function(e){return arguments.length?(this._x=e,this):this._x},EG.y=function(e){return arguments.length?(this._y=e,this):this._y};const TG=1664525,OG=1013904223,IG=4294967296;function RG(e){return e.x}function AG(e){return e.y}var MG=Math.PI*(3-Math.sqrt(5));function PG(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,s=.6,a=new Map,l=hB(d),c=KL("tick","end"),u=function(){let e=1;return()=>(e=(TG*e+OG)%IG)/IG}();function d(){h(),c.call("tick",t),n<r&&(l.stop(),c.call("end",t))}function h(r){var l,c,u=e.length;void 0===r&&(r=1);for(var d=0;d<r;++d)for(n+=(i-n)*o,a.forEach((function(e){e(n)})),l=0;l<u;++l)null==(c=e[l]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(c.y=c.fy,c.vy=0);return t}function p(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var o=10*Math.sqrt(.5+n),i=n*MG;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function f(t){return t.initialize&&t.initialize(e,u),t}return null==e&&(e=[]),p(),t={tick:h,restart:function(){return l.restart(d),t},stop:function(){return l.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),a.forEach(f),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(o=+e,t):+o},alphaTarget:function(e){return arguments.length?(i=+e,t):i},velocityDecay:function(e){return arguments.length?(s=1-e,t):1-s},randomSource:function(e){return arguments.length?(u=e,a.forEach(f),t):u},force:function(e,n){return arguments.length>1?(null==n?a.delete(e):a.set(e,f(n)),t):a.get(e)},find:function(t,n,r){var o,i,s,a,l,c=0,u=e.length;for(null==r?r=1/0:r*=r,c=0;c<u;++c)(s=(o=t-(a=e[c]).x)*o+(i=n-a.y)*i)<r&&(l=a,r=s);return l},on:function(e,n){return arguments.length>1?(c.on(e,n),t):c.on(e)}}}function DG(e){var t,n,r,o=vG(.1);function i(e){for(var o,i=0,s=t.length;i<s;++i)(o=t[i]).vy+=(r[i]-o.y)*n[i]*e}function s(){if(t){var i,s=t.length;for(n=new Array(s),r=new Array(s),i=0;i<s;++i)n[i]=isNaN(r[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!==typeof e&&(e=vG(null==e?0:+e)),i.initialize=function(e){t=e,s()},i.strength=function(e){return arguments.length?(o="function"===typeof e?e:vG(+e),s(),i):o},i.y=function(t){return arguments.length?(e="function"===typeof t?t:vG(+t),s(),i):e},i}class FG extends Map{constructor(e,t=GG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(LG(this,e))}has(e){return super.has(LG(this,e))}set(e,t){return super.set(BG(this,e),t)}delete(e){return super.delete(UG(this,e))}}Set;function LG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function BG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function UG({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function GG(e){return null!==e&&"object"===typeof e?e.valueOf():e}function $G(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const qG=Symbol("implicit");function zG(){var e=new FG,t=[],n=[],r=qG;function o(o){let i=e.get(o);if(void 0===i){if(r!==qG)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new FG;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return zG(t,n).unknown(r)},$G.apply(o,arguments),o}function VG(e,t,n){this.k=e,this.x=t,this.y=n}VG.prototype={constructor:VG,scale:function(e){return 1===e?this:new VG(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new VG(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new VG(1,0,0);VG.prototype;function HG({source:e,target:t}){const[n,r]=function([e,t],[n,r]){const o=Math.sqrt((n-e)**2+(r-t)**2);return[(n-e)/o,(r-t)/o]}([e.x,e.y],[t.x,t.y]);return{x:n,y:r}}function WG(e,t,n){return e<t?t:e>n?n:e}const YG=({width:e,height:t,data:n,_selectedCharacteristic:r,layered:i=!1})=>{const s=n.nodes.length;let a,l,c;s>120?(a=8,l=3,c=-50):s>70?(a=10,l=4,c=-75):s>35?(a=15,l=5,c=-250):(a=20,l=7,c=-500);const u=4*a,d=zG().domain(n.metadata.groups.map((({name:e})=>e))).range(n.metadata.groups.map((({color:e})=>e))),h=PG().force("link",function(e){var t,n,r,o,i,s,a=bG,l=function(e){return 1/Math.min(o[e.source.index],o[e.target.index])},c=vG(30),u=1;function d(r){for(var o=0,a=e.length;o<u;++o)for(var l,c,d,h,p,f,m,g=0;g<a;++g)c=(l=e[g]).source,h=(d=l.target).x+d.vx-c.x-c.vx||yG(s),p=d.y+d.vy-c.y-c.vy||yG(s),h*=f=((f=Math.sqrt(h*h+p*p))-n[g])/f*r*t[g],p*=f,d.vx-=h*(m=i[g]),d.vy-=p*m,c.vx+=h*(m=1-m),c.vy+=p*m}function h(){if(r){var s,l,c=r.length,u=e.length,d=new Map(r.map(((e,t)=>[a(e,t,r),e])));for(s=0,o=new Array(c);s<u;++s)(l=e[s]).index=s,"object"!==typeof l.source&&(l.source=xG(d,l.source)),"object"!==typeof l.target&&(l.target=xG(d,l.target)),o[l.source.index]=(o[l.source.index]||0)+1,o[l.target.index]=(o[l.target.index]||0)+1;for(s=0,i=new Array(u);s<u;++s)l=e[s],i[s]=o[l.source.index]/(o[l.source.index]+o[l.target.index]);t=new Array(u),p(),n=new Array(u),f()}}function p(){if(r)for(var n=0,o=e.length;n<o;++n)t[n]=+l(e[n],n,e)}function f(){if(r)for(var t=0,o=e.length;t<o;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),d.initialize=function(e,t){r=e,s=t,h()},d.links=function(t){return arguments.length?(e=t,h(),d):e},d.id=function(e){return arguments.length?(a=e,d):a},d.iterations=function(e){return arguments.length?(u=+e,d):u},d.strength=function(e){return arguments.length?(l="function"===typeof e?e:vG(+e),p(),d):l},d.distance=function(e){return arguments.length?(c="function"===typeof e?e:vG(+e),f(),d):c},d}().id((e=>e.id)).distance(80)).force("charge",function(){var e,t,n,r,o,i=vG(-30),s=1,a=1/0,l=.81;function c(n){var o,i=e.length,s=_G(e,RG,AG).visitAfter(d);for(r=n,o=0;o<i;++o)t=e[o],s.visit(h)}function u(){if(e){var t,n,r=e.length;for(o=new Array(r),t=0;t<r;++t)n=e[t],o[n.index]=+i(n,t,e)}}function d(e){var t,n,r,i,s,a=0,l=0;if(e.length){for(r=i=s=0;s<4;++s)(t=e[s])&&(n=Math.abs(t.value))&&(a+=t.value,l+=n,r+=n*t.x,i+=n*t.y);e.x=r/l,e.y=i/l}else{(t=e).x=t.data.x,t.y=t.data.y;do{a+=o[t.data.index]}while(t=t.next)}e.value=a}function h(e,i,c,u){if(!e.value)return!0;var d=e.x-t.x,h=e.y-t.y,p=u-i,f=d*d+h*h;if(p*p/l<f)return f<a&&(0===d&&(f+=(d=yG(n))*d),0===h&&(f+=(h=yG(n))*h),f<s&&(f=Math.sqrt(s*f)),t.vx+=d*e.value*r/f,t.vy+=h*e.value*r/f),!0;if(!(e.length||f>=a)){(e.data!==t||e.next)&&(0===d&&(f+=(d=yG(n))*d),0===h&&(f+=(h=yG(n))*h),f<s&&(f=Math.sqrt(s*f)));do{e.data!==t&&(p=o[e.data.index]*r/f,t.vx+=d*p,t.vy+=h*p)}while(e=e.next)}}return c.initialize=function(t,r){e=t,n=r,u()},c.strength=function(e){return arguments.length?(i="function"===typeof e?e:vG(+e),u(),c):i},c.distanceMin=function(e){return arguments.length?(s=e*e,c):Math.sqrt(s)},c.distanceMax=function(e){return arguments.length?(a=e*e,c):Math.sqrt(a)},c.theta=function(e){return arguments.length?(l=e*e,c):Math.sqrt(l)},c}().strength(c)).force("x",function(e){var t,n,r,o=vG(.1);function i(e){for(var o,i=0,s=t.length;i<s;++i)(o=t[i]).vx+=(r[i]-o.x)*n[i]*e}function s(){if(t){var i,s=t.length;for(n=new Array(s),r=new Array(s),i=0;i<s;++i)n[i]=isNaN(r[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!==typeof e&&(e=vG(null==e?0:+e)),i.initialize=function(e){t=e,s()},i.strength=function(e){return arguments.length?(o="function"===typeof e?e:vG(+e),s(),i):o},i.x=function(t){return arguments.length?(e="function"===typeof t?t:vG(+t),s(),i):e},i}()).force("y",DG()).alpha(1).alphaMin(.005).alphaDecay(.03);function p(e,t){t.fy=t.y,t.fx=t.x}function f(n,r){const o=2*a,i=e/2-o,s=t/2-o;r.fx=WG(n.x,-i,i),r.fy=WG(n.y,-s,s),h.alpha(.5).restart()}i&&h.force("force0",DG(-t/2+50).strength((e=>0===e.incoming?.5:0)));const m=((e,t)=>{const n=(0,o.useRef)();return(0,o.useEffect)((()=>e(oG(n.current))),[e,t]),n})((r=>{const o=r.selectAll(".links").data(n.links).enter().append("line").attr("class","links").attr("marker-end","url(#arrowhead)").attr("stroke","#999").attr("stroke-opacity",.6).attr("stroke-width","1px"),i=r.selectAll(".nodes").data(n.nodes).enter().append("g").attr("class","nodes").call(gG().on("start",p).on("drag",f));i.append("circle").attr("r",a).style("stroke","#555").style("stroke-opacity",(e=>.3+.2*e.incoming)).style("stroke-width",0).style("fill",(e=>d(e.group))),i.append("title").text((e=>e.name)),i.append("text").attr("dominant-baseline","middle").attr("text-anchor","middle").text((e=>e.label));const s=r.select(".legend").attr("transform",`translate(${10-e/2}, ${(20-t)/2})`).selectAll("g").data(n.metadata.groups).enter().append("g").attr("transform",((e,t)=>`translate(0,${25*t})`));return s.append("rect").attr("width",30).attr("height",20).style("fill",(e=>d(e.name))),s.append("text").attr("x",36).attr("y",10).attr("text-anchor","start").attr("dominant-baseline","middle").text((e=>e.name)),h.nodes(n.nodes).on("tick",(function(){o.attr("x1",(e=>{const t=HG(e);return e.source.x+a*t.x})).attr("y1",(e=>{const t=HG(e);return e.source.y+a*t.y})).attr("x2",(e=>{const t=HG(e);return e.target.x-(a+l)*t.x})).attr("y2",(e=>{const t=HG(e);return e.target.y-(a+l)*t.y})),i.attr("transform",(e=>`translate(${e.x},${e.y})`)),i.attr("cx",(t=>t.x=Math.max(-e/2+u,Math.min(e/2-u,t.x)))).attr("cy",(e=>e.y=Math.max(-t/2+u,Math.min(t/2-u,e.y))))})),h.force("link").links(n.links),()=>{r.selectAll(".nodes").remove(),r.selectAll(".links").remove(),r.select(".legend").selectChildren().remove()}}),[n]);return(0,pr.jsxs)("svg",{id:"sociogram",ref:m,viewBox:`-${e/2} -${t/2} ${e} ${t}`,width:e,height:t,className:"sociogram",children:[(0,pr.jsx)("defs",{children:(0,pr.jsx)("marker",{id:"arrowhead",viewBox:"-0 -5 10 10",refX:"0",refY:"0",orient:"auto",markerWidth:l,markerHeight:l,xoverflow:"visible",children:(0,pr.jsx)("path",{d:"M 0,-5 L 10,0 L 0,5",fill:"#999",stroke:"none"})})}),(0,pr.jsx)("g",{className:"legend"})]})},QG={NO_DATA:"Not Applicable",SEVERELY_ISOLATED:"Severely Isolated",MODERATELY_ISOLATED:"Moderately Isolated",PARTIALLY_CONNECTED:"Partially Connected",CONNECTED:"Connected",STAR:"Connected Star"},JG={groups:[{name:QG.SEVERELY_ISOLATED,color:"#cc3232"},{name:QG.MODERATELY_ISOLATED,color:"#db7b2b"},{name:QG.PARTIALLY_CONNECTED,color:"#e7b416"},{name:QG.CONNECTED,color:"#a6dbff"},{name:QG.STAR,color:"#6f9ecc"},{name:QG.NO_DATA,color:"#ddd"}]};function KG({incoming:e,outgoing:t,outgoingNotInClass:n},{maxIncomingDegree:r}){return 0===t?0===n?QG.NO_DATA:0===e?QG.SEVERELY_ISOLATED:QG.MODERATELY_ISOLATED:0===e?QG.PARTIALLY_CONNECTED:e===r?QG.STAR:QG.CONNECTED}function XG(e,{currentCharacteristic:t}){let n;return n="Current Class"===t.name?t.characteristicResponses.find((t=>t.label===(e.currentClass&&e.currentClass.label))):e.characteristicResponses.find((e=>e.characteristic.name===t.name)),n?n.label:"Not Applicable"}function ZG(e,t){return{...e,incoming:t.filter((({target:t})=>t===e.id)).length,outgoing:t.filter((({source:t,inClass:n})=>n&&t===e.id)).length,outgoingNotInClass:t.filter((({source:t,inClass:n})=>!n&&t===e.id)).length}}function e$(e,t,n={}){return{...t,group:e(t,n)}}function t$(e){return{...e,label:Gh(e),name:Uh(e)}}function n$(e,t){return e?function(e,t){let n;"Current Class"===e.name?(n=e.characteristicResponses.map(((e,n)=>{if(t&&t.some((t=>(t.currentClass&&t.currentClass.label)===e.label))){const t=ZC[n%ZC.length];return{name:e.label,color:t||"#FFF"}}})),n=n.filter((e=>void 0!==e)).sort(((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0})))):n=e.characteristicResponses.map((e=>({name:e.label,color:e.colour&&!e.colour.endsWith("00")?e.colour:"#FFF"})));const r={name:"Not Applicable",color:"#ddd"};return{groups:[...n,r]}}(e,t):JG}function r$(e,t){if(!e)return null;const n=e.map((e=>e.id)),r=e.flatMap((({id:e,friends:t})=>t.map((t=>({source:e,target:t.studentTo.id,inClass:n.includes(t.studentTo.id)}))))),o=e.map((e=>ZG(e,r))),i=Math.max(...o.map((({incoming:e})=>e))),s=t?o.map((e=>e$(XG,t$(e),{currentCharacteristic:t}))):o.map((e=>e$(KG,t$(e),{maxIncomingDegree:i}))),a=n$(t,e);return{links:r.filter((e=>e.inClass)),nodes:s,metadata:{...a,maxIncomingDegree:i}}}const o$=ng()(eg(ee,{options:()=>({variables:{schoolId:sessionStorage.getItem(Ht)}}),props:({data:{loading:e,allGradesWithNewClasses:t}})=>({loading:e,solverGrades:t})}),eg(se,{props:({data:{solver:{activeGrade:e}}})=>({activeGrade:e})}),eg(ce,{name:"updateSolverActiveGrade"}))(lj((({loading:e,solverGrades:t,activeGrade:n,updateSolverActiveGrade:r,solverPath:i="/Solver"})=>{var s;const a=o.useContext(Cw).gettextObj,l=Gm(Dw,{variables:{schoolId:sessionStorage.getItem(Ht),showCurrentClassCharacteristic:!0}}),[c,u]=(0,o.useState)(null),[d,h]=(0,o.useState)(""),p=(e,t)=>{u(t.find((t=>t.id===e)))},f=e=>{const t=m(e),n=g(e);n.length>0?p(n[0].classDetails.id,t):u(null)},m=e=>{const t=g(e),n=t.reduce(((e,t)=>e.concat(t.students)),[]),r=[...t.map((e=>({id:e.classDetails.id,label:e.classDetails.label,students:e.students})))];return t.length>1?r.concat({id:"all",label:`All ${a.gettext("classes")}`,students:n}):r},g=e=>{var t;return[...(null===e||void 0===e||null===(t=e.solution)||void 0===t?void 0:t.classes)||[]].sort(((e,t)=>e.classDetails.label.localeCompare(t.classDetails.label)))},v=()=>{if(d)return l.data.schoolCharacteristics.find((e=>e.id===d))},y={gradeId:""!==n?n.toString():t?null===(s=t[0])||void 0===s?void 0:s.id:null,schoolId:sessionStorage.getItem(Ht)},{loading:b,error:x,data:w,refetch:S}=Gm(q,{skip:e,variables:{solution:y},fetchPolicy:"network-only",onCompleted:e=>f(e)});if(e||b)return(0,pr.jsx)(qk,{});const C=r$(c?c.students:[],v());let j;if(x){if(!x.message.includes(yF))return(0,pr.jsx)(eN,{refetch:S});j=(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"No solution has been generated. Please run the solver for this grade."})})}else j=EF(w.solution)?(0,pr.jsx)("div",{children:(0,pr.jsx)("b",{children:"A solution is currently being generated. Please wait for it to complete."})}):C&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(YG,{data:C,width:1e3,height:600}),!d&&(0,pr.jsxs)("section",{children:[(0,pr.jsx)("h2",{className:"d-inline-block u-blue-primary mr-3",children:"Sociogram Classification"}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Severely Isolated"}),(0,pr.jsx)("p",{children:"This student wasn\u2019t placed with any of their friendship preferences and wasn\u2019t nominated by anyone in the entire grade."}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Moderately Isolated"}),(0,pr.jsxs)("p",{children:["This student wasn\u2019t placed with any of their friendship preferences but was nominated by at least one other student within their ",a.gettext("class"),"."]}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Partially Connected"}),(0,pr.jsxs)("p",{children:["This student was placed with one or more of their friendship preferences but wasn\u2019t nominated by anyone in their"," ",a.gettext("class"),"."]}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Connected"}),(0,pr.jsxs)("p",{children:["This student was placed with one or more of their friendship preferences and was nominated by at least one other student in their ",a.gettext("class"),"."]}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Connected Star"}),(0,pr.jsxs)("p",{children:["This student was placed with one or more of their friendship preferences and was nominated most often within their"," ",a.gettext("class"),"."]}),(0,pr.jsx)("h6",{className:"mt-4 mb-2 u-blue-primary",children:"Not Applicable"}),(0,pr.jsx)("p",{children:"No friendship preferences were listed for this student. They are likely a new student or were absent at the time of the survey."})]})]});const _=m(w),k=[(0,pr.jsx)("option",{value:"",children:"Friendship Preferences"},""),(l.data?[...l.data.schoolCharacteristics.map((e=>({id:e.id,label:e.name})))]:null).map(((e,t)=>(0,pr.jsx)("option",{value:e.id,children:e.label},t)))];return(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)("div",{className:"d-print-none",children:[(0,pr.jsx)(Fg,{children:(0,pr.jsx)("div",{className:"col-12",children:(0,pr.jsx)("div",{className:"py-3 pl-2",children:(0,pr.jsxs)(tc,{className:"solve-page-link color-blue-mid font-weight-bold",to:i,children:[(0,pr.jsx)("i",{className:"fa fa-angle-left pr-2 color-blue-mid font-weight-bold"}),"Back to Solver"]})})})}),(0,pr.jsxs)(Fg,{className:"pb-4 col-12",children:[(0,pr.jsx)("div",{className:"col-sm-4 col-lg-2",children:(0,pr.jsx)(Zg,{type:"select",value:y.gradeId,onChange:e=>{return t=e.target.value,void r({variables:{activeGrade:parseInt(t,10)}}).then((e=>{f(e)}));var t},children:t.map(((e,t)=>(0,pr.jsx)("option",{value:e.id,children:e.label},t)))})}),c&&(0,pr.jsx)("div",{className:"col-sm-4 col-lg-2",children:(0,pr.jsx)(Zg,{type:"select",value:c.id,onChange:e=>{p(e.target.value,_)},children:_.map(((e,t)=>(0,pr.jsx)("option",{value:e.id,children:e.label},t)))})}),c&&(0,pr.jsx)("div",{className:"col-sm-4 col-lg-2",children:(0,pr.jsx)(Zg,{type:"select",value:d,onChange:e=>{h(e.target.value)},children:k})})]})]}),j]})}))),i$=e=>t=>{e.writeQuery({query:Aw,data:{requestsPage:{__typename:"requestsPage",currentGrade:t}}})},s$=ng()(eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Nw,{options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{loading:e,constraints:t}})=>({loadingRequests:e,requestsData:t})}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeNew:!0},fetchPolicy:"network-only"}),props:({data:{loading:e,currentSchoolGrades:t}})=>({loadingGrades:e,currentSchoolGrades:t})}),eg(O,{props:({data:{myprofile:e}})=>({myprofile:e})}),eg(Se,{options:()=>({variables:{schoolId:uw()}}),props:({data:{students:e}})=>({students:e})}),eg(ig,{options:()=>({variables:{schoolId:uw()}}),props:({data:{teachers:e}})=>({teachers:e})}),eg(Ow,{name:"deleteConstraintsStudent"}),eg(Iw,{name:"deleteConstraintsTeacher"}),eg(Ew,{name:"studentRequestMutation"}),eg(Tw,{name:"teacherRequestMutation"}))((({loadingGrades:e,loadingRequests:t,...n})=>{const r=Pm(),o=vl(),{data:i}=Gm(Aw);if(aw(n.error),t||e)return(0,pr.jsx)(qk,{});const s=n.requestsData.unmetConstraints?n.requestsData.unmetConstraints.map((e=>e.constraintId)):[];let a="all-grades";return i&&(a=i.requestsPage.currentGrade),(0,pr.jsx)(tT,{notMetRequests:s,setCurrentGrade:i$(r),currentGrade:a,navigate:o,...n})}));const a$=n.p+"static/media/boost-icon.33ed97367c4cb9d5ae3b1e842ddf2769.svg";const l$=n.p+"static/media/boost-icon-disabled.4c4f6b2f8163d2e5e05e983fa72fd732.svg",c$=e=>{switch(e){case-1:return(0,pr.jsx)("i",{className:"fa fa-chevron-down"});case 0:return"-";case 1:return(0,pr.jsx)("i",{className:"fa fa-chevron-up"})}},u$=e=>{let t;return e&&("friendship-setting"===e.id?t="color-blue-mid":"unassignedteacher-setting"===e.id&&(t="color-red")),e&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:`fa fa-exclamation-circle ${t} px-2 cursor-pointer`,"data-tooltip-id":e.id}),(0,pr.jsx)(kf,{className:"c-suggestion-tooltip",id:e.id,positionStrategy:"fixed",clickable:!0,variant:"light",place:"right",delayShow:200,opacity:1,children:e.tooltip})]})},d$=({label:e,className:t="",textClassName:n="",icon:r,count:o,total:i,percentage:s,difference:a,iconStyle:l,onClick:c,differentTeacher:u,disabled:d,showMetric:h=!0,suggestionContent:p,warningContent:f,onBadgeClick:m})=>{let g="";return h&&(g=su(i)?s?`${Math.floor(o/i*100)}%`:`${o}/${i}`:!0===o?"YES":"NO"),(0,pr.jsxs)("div",{className:`c-attribute-label w-100 d-flex justify-content-between align-items-center ${t}`,children:[(0,pr.jsx)("span",{className:`c-attribute-label__text ${n}`,children:e}),(0,pr.jsxs)("div",{children:[u$(p),u$(f),(0,pr.jsx)("span",{onClick:m,className:`c-attribute-label__icon ${r} ${n}`,style:l,children:g}),su(a)&&(0,pr.jsx)("span",{className:"c-attribute-label__improvement",children:a>-1?`+${a}`:a}),su(u)&&(0,pr.jsx)("span",{className:"c-attribute-label__improvement",children:c$(u)}),c?!0===o||o===i||d?(0,pr.jsx)("img",{src:l$,alt:"boost",className:"c-attribute-label__boost-icon d-print-none"}):(0,pr.jsx)("img",{src:a$,alt:"boost",className:"c-attribute-label__boost-icon d-print-none cursor-pointer",onClick:c}):""]})]})};class h$ extends o.PureComponent{render(){const{colour:e}=this.props,t={backgroundColor:e};return RD(e)>0?(0,pr.jsx)("div",{style:t,className:"u-characteristic-circle mr-1"}):""}}const p$=({characteristicResponses:e,...t})=>(0,pr.jsx)(kf,{opacity:1,...t,children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-characteristic-tooltip__header text-primary",children:"Characteristics"}),(0,pr.jsx)("div",{className:"c-characteristic-tooltip__body",children:e&&e.map(((e,t)=>(0,pr.jsxs)("div",{className:"d-flex align-items-center mt-2",children:[(0,pr.jsx)("span",{className:"u-characteristic-circle mr-2",style:{backgroundColor:e.colour}}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"u-bold",children:e.characteristic.name}),e.characteristic.name&&" - ",`${e.label}`]})]},t)))})]})}),f$=({characteristicResponseCounts:e})=>{const t=e.filter((({studentCount:e})=>e>0)),n=t.length;return(0,pr.jsxs)("div",{className:"d-flex",style:{gap:"0.25rem"},children:[0===n&&(0,pr.jsx)("div",{children:(0,pr.jsx)("div",{className:"c-badge__response-circle",children:"\xa0"})}),t.slice(0,5).map((({characteristicResponse:e,studentCount:t},n)=>{const r=RD(e.colour)>0?e.colour:"#ffffffff";return(0,pr.jsx)(m$,{color:r,children:t},n)})),n>5&&(0,pr.jsx)("div",{children:(0,pr.jsx)("div",{className:"c-badge__response-circle",children:"..."})})]})},m$=({children:e,color:t})=>{const n=DD(AD(t)),r=LD(n),o={backgroundColor:t};return(0,pr.jsx)("div",{children:(0,pr.jsx)("div",{className:"c-badge__response-circle",style:o,children:(0,pr.jsx)("div",{className:`${r}`,children:e})})})},g$=({activeCharacteristic:e,characteristicResponseCounts:t,...n})=>e?(0,pr.jsx)(kf,{...n,children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"c-characteristic-tooltip__header text-primary",children:e.name}),(0,pr.jsx)("div",{className:"c-characteristic-tooltip__body",children:t&&t.map((({characteristicResponse:e,studentCount:t},n)=>(0,pr.jsxs)("div",{className:"d-flex align-items-center mt-2",children:[(0,pr.jsx)("span",{className:"u-characteristic-circle mr-2",style:{backgroundColor:e.colour}}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"u-bold",children:e.label}),` - ${t}`]})]},n)))})]})}):null,v$=({buttonClick:e})=>{const[t,n]=(0,o.useState)(!1),r=()=>{n(!t)};return(0,pr.jsxs)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:[(0,pr.jsxs)("div",{className:"flex-column text-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h1",{className:"mt-3",children:"Run Solver for this Grade"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:r,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Watch Video"]})]}),(0,pr.jsx)("div",{children:(0,pr.jsx)("img",{height:"150px",className:"mt-4",src:mk,alt:"Excel Icon"})}),(0,pr.jsx)(ld,{className:"mt-3",color:"primary",onClick:e,children:"Run Solver"})]}),t&&(0,pr.jsx)(vN,{toggle:r,videoUrl:"https://player.vimeo.com/video/853218061?h=81bf92f2b7",title:"Instruction Step 1"})]})},y$=({sharedTeachers:e,onUnshareClick:t,onUnshareAllClick:n,onResendClick:r,editClick:i,allowWritableSharedSolutions:s})=>{const a=({row:e})=>{const t=e.original;return`${t.firstName} ${t.lastName}`},l=o.useCallback((({row:e})=>{const t=e.original.sharedSolutionToken.newClasses,n=e.id;return(0,pr.jsx)(vm,{classes:t,rowId:n})}),[]),c=({row:e})=>{const t=e.original.sharedSolutionToken,n={"Assigned Teachers":t.showTeachers,"Teacher Requests":t.showTeacherRequests,"Student Requests":t.showStudentRequests,"Friendship Nominations":t.showFriendships,Characteristics:t.showCharacteristics};return Object.keys(n).map((e=>n[e]?e:"")).filter((e=>""!==e)).join(", ")},u=({row:e})=>{const t={"Move Students":e.original.sharedSolutionToken.writable},n=Object.keys(t).map((e=>t[e]?e:"")).filter((e=>""!==e)).join(", ");return""===n?"View Only":n},d=o.useCallback((({row:e})=>{const n=e.original;return(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsx)("div",{className:"text-center pr-3",children:(0,pr.jsx)("span",{className:"cursor-pointer color-blue-mid u-bold",onClick:()=>i(n),children:"Edit"})}),(0,pr.jsx)("div",{className:"text-center pr-3",children:(0,pr.jsx)("span",{className:"cursor-pointer color-blue-mid u-bold",onClick:()=>r(n),children:"Resend"})}),(0,pr.jsx)("div",{className:"text-center",children:(0,pr.jsx)("span",{className:"cursor-pointer color-blue-mid u-bold",onClick:()=>t(n),children:"Unshare"})})]})}),[i,r,t]),h=o.useMemo((()=>[{Header:"CURRENTLY SHARED WITH",accessor:"fullName",Cell:a},{Header:"CLASSES SHARED",accessor:"classes",Cell:l},{Header:"ALLOW TEACHERS TO VIEW",accessor:"views",Cell:c},{Header:"ALLOW TEACHERS TO",accessor:"abilities",Cell:u},{Header:()=>(0,pr.jsxs)("div",{style:{display:"flex"},children:[(0,pr.jsx)(Qg,{className:"py-3 c-teachers-invite-modal__text m-0",children:"ACTIONS"}),(0,pr.jsx)("div",{style:{position:"absolute"},children:(0,pr.jsx)("div",{className:"cursor-pointer color-blue-mid u-bold text-center shared-solution-table__unshare",onClick:n,children:"Unshare All"})})]}),accessor:"action",Cell:d}]),[d,n,l]),p={data:o.useMemo((()=>e),[e]),columns:h,initialState:{hiddenColumns:s?[]:["writable"]}},{getTableProps:f,getTableBodyProps:m,headerGroups:g,rows:v,prepareRow:y}=(0,GC.useTable)(p),b=(e,t,n)=>{const r=e[t].accessor;return"fullName"===r?"shared-solution-table__fullName not-last-column":"classes"===r?"shared-solution-table__classes shared-solution-table__not-initial-column shared-solution-table__not-last-column":"views"===r?"shared-solution-table__views shared-solution-table__not-initial-column shared-solution-table__not-last-column":"abilities"===r?(n?"":"shared-solution-table__abilities-row")+" shared-solution-table__not-initial-column shared-solution-table__not-last-column":"action"===r?"shared-solution-table__actions shared-solution-table__not-initial-column":""};return(0,pr.jsx)("div",{className:"pb-4",children:(0,pr.jsx)("div",{children:0===e.length?"Not currently shared with any teachers ":(0,pr.jsxs)("table",{className:"shared-solution-table",...f(),children:[(0,pr.jsx)("thead",{children:g.map((e=>(0,pr.jsx)("tr",{...e.getHeaderGroupProps(),children:e.headers.map(((e,t)=>(0,pr.jsx)("th",{className:`c-teachers-invite-modal__text ${b(h,t,!0)}`,...e.getHeaderProps(),children:e.render("Header")})))})))}),(0,pr.jsx)("tbody",{...m(),children:v.map((e=>(y(e),(0,pr.jsx)("tr",{...e.getRowProps(),children:e.cells.map(((e,t)=>(0,pr.jsx)("td",{className:`py-3 c-teachers-invite-modal__text ${b(h,t,!1)}`,...e.getCellProps(),children:e.render("Cell")})))}))))})]})})})},b$=({isMet:e})=>(0,pr.jsx)("div",{className:"d-inline",children:e?(0,pr.jsx)("div",{className:"c-badge__circle c-badge__is-met-friend",children:"F"}):(0,pr.jsx)("div",{className:"c-badge__circle c-badge__friend",children:"F"})}),x$="MANDATORY_REQUESTS",w$="IMPORTANT_REQUESTS",S$="DIFFERENT_TEACHER",C$="CLASS_ENTRY_CRITERIA",j$={gradesOrClasses:[],teachers:[]},_$="GRADES",k$="CLASSES",N$="NORMAL",E$="SHARED_READ_ONLY",T$="SHARED_WRITABLE",O$=({dropdownExportsOpen:e,toggle:t,solverMode:n,print:r,csvExport:i,shareSolution:s})=>(0,pr.jsxs)(Ku,{className:"c-side-bar__panel__minor-actions-container__dropdown",isOpen:e,toggle:t,children:[(0,pr.jsx)(hd,{caret:!0,children:"More ..."}),(0,pr.jsxs)(Ih,{children:[(0,pr.jsx)(Ph,{onClick:r,children:"Print"}),n===N$&&(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Ph,{onClick:i,children:"Export"}),(0,pr.jsx)(Ph,{onClick:s,children:"Share"})]})]})]}),I$=({dropdownReportsOpen:e,toggle:t})=>{const n=o.useContext(Cw).gettextObj;return(0,pr.jsxs)(Ku,{className:"c-side-bar__panel__minor-actions-container__dropdown",isOpen:e,toggle:t,children:[(0,pr.jsx)(hd,{caret:!0,children:"Reports"}),(0,pr.jsxs)(Ih,{children:[(0,pr.jsx)(Ph,{children:(0,pr.jsx)(tc,{to:"/SummaryReport/Class",children:`${n.gettext("Class")} Summary Report`})}),(0,pr.jsx)(Ph,{children:(0,pr.jsx)(tc,{to:"/SummaryReport/School",children:"School Summary Report"})}),(0,pr.jsx)(Ph,{children:(0,pr.jsx)(tc,{to:"/SummaryReport/Sociogram",children:"Sociogram View"})})]})]})},R$=e=>{const t=e.assignmentType;return"MOVE"===t?"Move":"BOOST"===t?"Boost":"ADD"===t?"Add":"REMOVE"===t?"Remove":"SOLVE"===t?"Run":"LOAD"===t?"Load":"UNDO"===t?"Undo":"REDO"===t?"Redo":"CLASS_CREATED"===t?"Added Class":"CLASS_UPDATED"===t?"Updated Class":"CLASS_DELETED"===t?"Deleted Class":"Change"},A$=e=>!e||"SUPPORT"!==e.role&&"SUPER"!==e.role?e&&e.firstName&&e.lastName?`(${e.firstName} ${e.lastName.charAt(0)})`:"":"(Class Solver Support)",M$=(e,t)=>{const n=e.assignmentType,r=e.movedStudents,o=e.changedClasses;if(("LOAD"===n||"UNDO"===n||"REDO"===n)&&e.parent){const n=((e,t)=>{const n=e.parent;let r;return n&&(r=t.find((e=>e.assignmentId===n.id))),r})(e,t);return n&&n.notes?`From ${n.notes}`:`From ${zh(e.parent.insertedAt)||""} - ${Vh(e.parent.insertedAt)||""}`}return r?"MOVE"===n?F$(r):"BOOST"===n?L$(r):"ADD"===n?F$(r):"REMOVE"===n?B$(r):"SOLVE"===n?"Grade Run":"CLASS_CREATED"===n||"CLASS_UPDATED"===n||"CLASS_DELETED"===n?o.map((e=>e.label)).join(", "):"Information Not Available":""},P$=e=>{const t=e.student;return t?`${t.firstName} ${t.lastName}`:"removed student"},D$=e=>e.to?e.to.label:"no class",F$=e=>{const t=e.length;if(1===t){const t=e[0];return`${P$(t)} > ${D$(t)}`}if(t>1){const n=e[0],r=null===n||void 0===n?void 0:n.to,o=r&&e.every((e=>{var t;return(null===(t=e.to)||void 0===t?void 0:t.label)===r.label}));return r&&o?`${t} students > ${D$(n)}`:`${t} students`}},L$=e=>{const t=e.length;if(0===t)return"No changes";if(2===t){return`${P$(e[0])} <> ${P$(e[1])}`}},B$=e=>{const t=e.length;if(1===t){const t=e[0],n=P$(t),r=(e=>e.from?e.from.label:"no class")(t);return`${n} - ${r}`}if(t>1)return`${t} students`},U$=({solutionsDropDownOpen:e,toggleSolutionsDropDown:t,favourites:n,assignments:r,favouriteAnAssignmentMutation:i,unfavouriteAnAssignmentMutation:s,updateFavouritedAssignmentMutation:a,pickAnAssignment:l,activeGradeId:c})=>{const[u,d]=o.useState(),[h,p]=o.useState(),[f,m]=o.useState(),[g,v]=o.useState(),[y,b]=o.useState(!1),x=e=>{e?(p(e.assignmentId),m(e.notes)):(p(null),m(null))},w=e=>{const t=e.id;return n.some((e=>e.assignmentId===t))},S=e=>{y||(e=>{n.length>=5?b(!0):(b(!1),d(e.id))})(e)},C=r.findIndex((({assignmentType:e})=>"LOAD"===e));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Ku,{inNavbar:!0,isOpen:e,toggle:()=>{y||g||h||u||t()},children:[(0,pr.jsx)(hd,{className:"pl-2 pt-2 d-flex flex-column align-items-center justify-content-center",tag:"div",children:(0,pr.jsx)("i",{className:"fa-solid fa fa-clock-o c-side-bar__clock"})}),(0,pr.jsxs)(Ih,{className:"c-side-bar__timeline-container",right:!0,children:[(0,pr.jsx)("div",{className:"c-side-bar__timeline-sub-heading pl-3 pb-1 pt-1",children:(0,pr.jsx)("b",{className:"",children:"Pinned Times"})}),0===n.length?(0,pr.jsx)("p",{className:"px-4 u-text-12",children:"To save a time click on a pin in the Timeline"}):n.map(((e,t)=>(0,pr.jsx)(Ph,{toggle:!1,className:"c-side-bar__timeline-item py-2 pr-0",children:(0,pr.jsxs)("div",{className:"d-flex flex-row justify-content-between",children:[(0,pr.jsxs)("div",{className:"d-flex flex-row overflow-hidden",onClick:()=>(e=>{l(e.assignmentId,c)})(e),children:[(0,pr.jsxs)("div",{className:"d-flex flex-column pr-3",children:[(0,pr.jsx)("p",{className:"m-0 u-text-12",children:zh(e.insertedAt)||""}),(0,pr.jsx)("p",{className:"m-0 u-text-12",children:Vh(e.insertedAt)||""})]}),(0,pr.jsxs)("div",{className:"d-flex flex-column overflow-hidden ",children:[(0,pr.jsx)("p",{className:"u-text-12 m-0 u-bold text-truncate",children:e.notes||"add description"}),(0,pr.jsx)("p",{className:"m-0 u-text-12",children:A$(e.user)||"no user"})]})]}),(0,pr.jsxs)("div",{className:"d-flex flex-row align-items-center mx-2",children:[(0,pr.jsx)("i",{className:"fa fa-pencil c-side-bar__pencil mr-2",onClick:()=>{x(e)}}),(0,pr.jsx)("i",{className:"fa fa-thumb-tack c-side-bar__blue-pin",onClick:()=>v(e.assignmentId)})]})]})},`favourite-${t}`))),(0,pr.jsx)("div",{className:"c-side-bar__panel__divider-line d-print-none"}),(0,pr.jsx)("div",{className:"c-side-bar__timeline-sub-heading pl-3 pb-1 pt-3",children:(0,pr.jsx)("b",{className:"",children:"Timeline"})}),r.map(((e,t)=>(0,pr.jsx)(Ph,{toggle:!1,className:"c-side-bar__timeline-item py-2 pr-0 "+(C===t?"bg-grey-requests":""),children:(0,pr.jsxs)("div",{className:"d-flex flex-row justify-content-between",children:[(0,pr.jsxs)("div",{className:"d-flex flex-row overflow-hidden",onClick:()=>(e=>{var t;e.id!==(null===(t=r[0])||void 0===t?void 0:t.id)&&l(e.id,c)})(e),children:[(0,pr.jsxs)("div",{className:"d-flex flex-column pr-3",children:[(0,pr.jsx)("p",{className:"m-0 u-text-12",children:zh(e.insertedAt)||""}),(0,pr.jsx)("p",{className:"m-0 u-text-12",children:Vh(e.insertedAt)||""})]}),(0,pr.jsxs)("div",{className:"d-flex flex-column overflow-hidden",children:[(0,pr.jsxs)("div",{className:"d-flex flex-row",children:[(0,pr.jsx)("p",{className:"m-0 u-text-12 u-bold",children:R$(e)}),(0,pr.jsx)("p",{className:"m-0 ml-1 u-text-12 text-truncate",children:A$(e.user)})]}),(0,pr.jsx)("p",{className:"m-0 u-text-12 text-truncate",children:M$(e,n)})]})]}),(0,pr.jsx)("div",{className:"d-flex flex-row align-items-center mx-2",children:w(e)?(0,pr.jsx)("i",{className:"fa fa-thumb-tack c-side-bar__blue-pin",onClick:()=>{v(e.id)}}):(0,pr.jsx)("i",{className:"fa fa-thumb-tack c-side-bar__grey-star",onClick:()=>S(e)})})]})},`assignment-${t}`)))]})]}),u&&(0,pr.jsx)(kk,{assignmentId:u,favouriteAnAssignment:(e,t)=>i({variables:{favouriteParams:{assignmentId:e,notes:t}},refetchQueries:[{query:U,variables:{gradeId:c}}]}),toggle:()=>d(null)}),h&&(0,pr.jsx)(Nk,{assignmentId:h,updateFavourite:(e,t)=>a({variables:{updateFavouritedAssignmentParams:{assignmentId:e,notes:t}},refetchQueries:[{query:U,variables:{gradeId:c}}]}),toggle:()=>x(null),favouriteNotes:f}),g&&(0,pr.jsx)(_k,{assignmentIdForUnFavouriting:g,unfavouriteAnAssignmentMutation:s,setAssignmentIdForUpdate:p,setDataForUpdatingFavourite:x,setAssignmentIdForSave:d,closeModal:()=>v(null),activeGradeId:c}),y&&(0,pr.jsx)(jk,{closeModal:()=>b(!1)})]})};var G$=["className","cssModule","size","bordered","borderless","striped","dark","hover","responsive","tag","responsiveTag","innerRef"],$$={className:pu().string,cssModule:pu().object,size:pu().string,bordered:pu().bool,borderless:pu().bool,striped:pu().bool,dark:pu().bool,hover:pu().bool,responsive:pu().oneOfType([pu().bool,pu().string]),tag:Pu,responsiveTag:Pu,innerRef:pu().oneOfType([pu().func,pu().string,pu().object])},q$=function(e){var t=e.className,n=e.cssModule,r=e.size,i=e.bordered,s=e.borderless,a=e.striped,l=e.dark,c=e.hover,u=e.responsive,d=e.tag,h=e.responsiveTag,p=e.innerRef,f=lu(e,G$),m=Eu(ju()(t,"table",!!r&&"table-"+r,!!i&&"table-bordered",!!s&&"table-borderless",!!a&&"table-striped",!!l&&"table-dark",!!c&&"table-hover"),n),g=o.createElement(d,au({},f,{ref:p,className:m}));if(u){var v=Eu(!0===u?"table-responsive":"table-responsive-"+u,n);return o.createElement(h,{className:v},g)}return g};q$.propTypes=$$,q$.defaultProps={tag:"table",responsiveTag:"div"};const z$=q$,V$=({students:e,classData:t,isPrint:n=!1,editable:r=!0,toggleEditClassModal:o,hasGenderX:i,lockState:s,lockClassStudents:a,readMode:l,activeGradeId:c,hasMax:u,activeCharacteristic:d,currentClassResponses:h})=>{const{classDetails:{id:p,label:f,schoolGrades:m,maxClassSize:g,maxSizePerGrade:v},counts:y}=t;let b=[];if(d){b=(rj(d)?h:d.characteristicResponses).map((t=>{const n=((e,t)=>t.filter((t=>t.characteristicResponses.some((t=>t.id===e.id)))).length)(t,e);return{characteristicResponse:t,studentCount:n}}))}else b=[];const x=m.length>1,w=n?"table-header-class-header":"c-solver-class__header",S=n?"table-header-class-header-count":"c-solver-class__header__count d-print-none",C=r?o:()=>{};return(0,pr.jsxs)("div",{className:`${w} d-flex align-items-center justify-content-between`,children:[(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-between h-100",children:[(0,pr.jsxs)("span",{className:"d-flex flex-grow-1 align-items-center",children:[l||(0,pr.jsx)("i",{className:"d-print-none d-flex align-items-center "+(s?"fa fa-lock c-solver-class__header_locked":"fa fa-unlock c-solver-class__header_unlocked"),onClick:a}),(0,pr.jsx)("span",{className:`${r&&"cursor-pointer"} ${l&&"ml-2"}`,onClick:C,children:f})]}),(0,pr.jsx)("div",{className:"cursor-pointer","data-tooltip-id":`characteristic-response-counts-${p}`,children:(0,pr.jsx)(f$,{characteristicResponseCounts:b})}),(0,pr.jsx)(g$,{id:`characteristic-response-counts-${p}`,activeCharacteristic:d,characteristicResponseCounts:b,className:"c-characteristic-tooltip p-0",place:"bottom",variant:"light",delayShow:500})]}),(0,pr.jsx)("div",{className:S,children:x?(0,pr.jsx)(Q$,{counts:y,hasGenderX:i,maxClassSize:g,maxSizePerGrade:v,activeGradeId:c,hasMax:u}):(0,pr.jsx)(Y$,{counts:y,hasGenderX:i,maxClassSize:g,hasMax:u})})]})},H$=e=>e?"text-danger":"",W$=({max:e})=>e?(0,pr.jsxs)("span",{children:["(",e," max)"]}):(0,pr.jsx)("span",{children:"\xa0"}),Y$=({counts:{genders:{activeFemaleCount:e,activeMaleCount:t,activeNonBinaryCount:n},total:r},hasGenderX:o,maxClassSize:i,hasMax:s})=>{const a=!!i&&r>i;return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("span",{children:[e," F"]}),(0,pr.jsxs)("span",{children:[t," M"]}),o&&(0,pr.jsxs)("span",{children:[n," X"]}),(0,pr.jsxs)("span",{className:H$(a),children:[r," T"]}),s&&(0,pr.jsx)("div",{className:`u-text-10 ${H$(a)}`,children:(0,pr.jsx)(W$,{max:i})})]})},Q$=({counts:{genders:{activeFemaleCount:e,activeMaleCount:t,activeNonBinaryCount:n,totalFemaleCount:r,totalMaleCount:o,totalNonBinaryCount:i},total:s},hasGenderX:a,maxClassSize:l,maxSizePerGrade:c,activeGradeId:u,hasMax:d})=>{const h=r+o+i,p=c.find((({grade:{id:e}})=>e===u)),f=p?p.max:null,m=!!l&&h>l,g=!!f&&s>f;return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)("div",{className:"text-right",style:{display:"grid",gridTemplateColumns:"auto auto",whiteSpace:"pre"},children:[(0,pr.jsxs)("div",{className:"px-1",children:[e," |"]}),(0,pr.jsxs)("div",{children:[r," F"]}),(0,pr.jsxs)("div",{className:"px-1",children:[t," |"]}),(0,pr.jsxs)("div",{children:[o," M"]}),a&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"px-1",children:[n," |"]}),(0,pr.jsxs)("div",{children:[i," X"]})]}),(0,pr.jsxs)("div",{className:"px-1",children:[(0,pr.jsx)("span",{className:H$(g),children:s})," ","|"]}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("span",{className:H$(m),children:[h," T"]})}),d&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:`px-1 u-text-10 ${H$(g)}`,children:[(0,pr.jsx)(W$,{max:f}),"\xa0"]}),(0,pr.jsx)("div",{className:`u-text-10 ${H$(m)}`,children:(0,pr.jsx)(W$,{max:l})})]})]})})};function J$(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var K$="function"===typeof Symbol&&Symbol.observable||"@@observable",X$=function(){return Math.random().toString(36).substring(7).split("").join(".")},Z$={INIT:"@@redux/INIT"+X$(),REPLACE:"@@redux/REPLACE"+X$(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+X$()}};function eq(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function tq(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(J$(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(J$(1));return n(tq)(e,t)}if("function"!==typeof e)throw new Error(J$(2));var o=e,i=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(J$(3));return i}function d(e){if("function"!==typeof e)throw new Error(J$(4));if(l)throw new Error(J$(5));var t=!0;return c(),a.push(e),function(){if(t){if(l)throw new Error(J$(6));t=!1,c();var n=a.indexOf(e);a.splice(n,1),s=null}}}function h(e){if(!eq(e))throw new Error(J$(7));if("undefined"===typeof e.type)throw new Error(J$(8));if(l)throw new Error(J$(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=s=a,n=0;n<t.length;n++){(0,t[n])()}return e}return h({type:Z$.INIT}),(r={dispatch:h,subscribe:d,getState:u,replaceReducer:function(e){if("function"!==typeof e)throw new Error(J$(10));o=e,h({type:Z$.REPLACE})}})[K$]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(J$(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[K$]=function(){return this},e},r}function nq(e,t){return function(){return t(e.apply(this,arguments))}}function rq(e,t){if("function"===typeof e)return nq(e,t);if("object"!==typeof e||null===e)throw new Error(J$(16));var n={};for(var r in e){var o=e[r];"function"===typeof o&&(n[r]=nq(o,t))}return n}function oq(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var iq=o.createContext(null);var sq=function(e){e()},aq=function(){return sq};var lq={notify:function(){},get:function(){return[]}};function cq(e,t){var n,r=lq;function o(){s.onStateChange&&s.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=aq(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var s={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=lq)},getListeners:function(){return r}};return s}var uq="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?o.useLayoutEffect:o.useEffect;const dq=function(e){var t=e.store,n=e.context,r=e.children,i=(0,o.useMemo)((function(){var e=cq(t);return{store:t,subscription:e}}),[t]),s=(0,o.useMemo)((function(){return t.getState()}),[t]);uq((function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,s]);var a=n||iq;return o.createElement(a.Provider,{value:i},r)};var hq=n(2706),pq=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],fq=["reactReduxForwardedRef"],mq=[],gq=[null,null];function vq(e,t){var n=e[1];return[t.payload,n+1]}function yq(e,t,n){uq((function(){return e.apply(void 0,t)}),n)}function bq(e,t,n,r,o,i,s){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,s())}function xq(e,t,n,r,o,i,s,a,l,c){if(e){var u=!1,d=null,h=function(){if(!u){var e,n,h=t.getState();try{e=r(h,o.current)}catch(BK){n=BK,d=BK}n||(d=null),e===i.current?s.current||l():(i.current=e,a.current=e,s.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var wq=function(){return[null,0]};function Sq(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,s=n.methodName,a=void 0===s?"connectAdvanced":s,l=n.renderCountProp,c=void 0===l?void 0:l,u=n.shouldHandleStateChanges,d=void 0===u||u,h=n.storeKey,p=void 0===h?"store":h,f=(n.withRef,n.forwardRef),m=void 0!==f&&f,g=n.context,v=void 0===g?iq:g,y=lu(n,pq),b=v;return function(t){var n=t.displayName||t.name||"Component",r=i(n),s=au({},y,{getDisplayName:i,methodName:a,renderCountProp:c,shouldHandleStateChanges:d,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=y.pure;var u=l?o.useMemo:function(e){return e()};function h(n){var r=(0,o.useMemo)((function(){var e=n.reactReduxForwardedRef,t=lu(n,fq);return[n.context,e,t]}),[n]),i=r[0],a=r[1],l=r[2],c=(0,o.useMemo)((function(){return i&&i.Consumer&&(0,hq.isContextConsumer)(o.createElement(i.Consumer,null))?i:b}),[i,b]),h=(0,o.useContext)(c),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(h)&&Boolean(h.store);var f=p?n.store:h.store,m=(0,o.useMemo)((function(){return function(t){return e(t.dispatch,s)}(f)}),[f]),g=(0,o.useMemo)((function(){if(!d)return gq;var e=cq(f,p?null:h.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,p,h]),v=g[0],y=g[1],x=(0,o.useMemo)((function(){return p?h:au({},h,{subscription:v})}),[p,h,v]),w=(0,o.useReducer)(vq,mq,wq),S=w[0][0],C=w[1];if(S&&S.error)throw S.error;var j=(0,o.useRef)(),_=(0,o.useRef)(l),k=(0,o.useRef)(),N=(0,o.useRef)(!1),E=u((function(){return k.current&&l===_.current?k.current:m(f.getState(),l)}),[f,S,l]);yq(bq,[_,j,N,l,E,k,y]),yq(xq,[d,f,v,m,_,j,N,k,y,C],[f,v,m]);var T=(0,o.useMemo)((function(){return o.createElement(t,au({},E,{ref:a}))}),[a,t,E]);return(0,o.useMemo)((function(){return d?o.createElement(c.Provider,{value:x},T):T}),[c,T,x])}var f=l?o.memo(h):h;if(f.WrappedComponent=t,f.displayName=h.displayName=r,m){var g=o.forwardRef((function(e,t){return o.createElement(f,au({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,Nm()(g,t)}return Nm()(f,t)}}function Cq(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function jq(e,t){if(Cq(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Cq(e[n[o]],t[n[o]]))return!1;return!0}function _q(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function kq(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Nq(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=kq(e);var o=r(t,n);return"function"===typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=kq(o),o=r(t,n)),o},r}}const Eq=[function(e){return"function"===typeof e?Nq(e):void 0},function(e){return e?void 0:_q((function(e){return{dispatch:e}}))},function(e){return e&&"object"===typeof e?_q((function(t){return function(e,t){var n={},r=function(r){var o=e[r];"function"===typeof o&&(n[r]=function(){return t(o.apply(void 0,arguments))})};for(var o in e)r(o);return n}(e,t)})):void 0}];const Tq=[function(e){return"function"===typeof e?Nq(e):void 0},function(e){return e?void 0:_q((function(){return{}}))}];function Oq(e,t,n){return au({},n,e,t)}const Iq=[function(e){return"function"===typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,s=!1;return function(t,n,a){var l=e(t,n,a);return s?o&&i(l,r)||(r=l):(s=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return Oq}}];var Rq=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Aq(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function Mq(e,t,n,r,o){var i,s,a,l,c,u=o.areStatesEqual,d=o.areOwnPropsEqual,h=o.areStatePropsEqual,p=!1;function f(o,p){var f=!d(p,s),m=!u(o,i,p,s);return i=o,s=p,f&&m?(a=e(i,s),t.dependsOnOwnProps&&(l=t(r,s)),c=n(a,l,s)):f?(e.dependsOnOwnProps&&(a=e(i,s)),t.dependsOnOwnProps&&(l=t(r,s)),c=n(a,l,s)):m?function(){var t=e(i,s),r=!h(t,a);return a=t,r&&(c=n(a,l,s)),c}():c}return function(o,u){return p?f(o,u):(a=e(i=o,s=u),l=t(r,s),c=n(a,l,s),p=!0,c)}}function Pq(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=lu(t,Rq),s=n(e,i),a=r(e,i),l=o(e,i);return(i.pure?Mq:Aq)(s,a,l,e,i)}var Dq=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Fq(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Lq(e,t){return e===t}function Bq(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Sq:n,o=t.mapStateToPropsFactories,i=void 0===o?Tq:o,s=t.mapDispatchToPropsFactories,a=void 0===s?Eq:s,l=t.mergePropsFactories,c=void 0===l?Iq:l,u=t.selectorFactory,d=void 0===u?Pq:u;return function(e,t,n,o){void 0===o&&(o={});var s=o,l=s.pure,u=void 0===l||l,h=s.areStatesEqual,p=void 0===h?Lq:h,f=s.areOwnPropsEqual,m=void 0===f?jq:f,g=s.areStatePropsEqual,v=void 0===g?jq:g,y=s.areMergedPropsEqual,b=void 0===y?jq:y,x=lu(s,Dq),w=Fq(e,i,"mapStateToProps"),S=Fq(t,a,"mapDispatchToProps"),C=Fq(n,c,"mergeProps");return r(d,au({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:S,initMergeProps:C,pure:u,areStatesEqual:p,areOwnPropsEqual:m,areStatePropsEqual:v,areMergedPropsEqual:b},x))}}const Uq=Bq();var Gq;function $q(e,t){var n=(0,o.useState)((function(){return{inputs:t,result:e()}}))[0],r=(0,o.useRef)(!0),i=(0,o.useRef)(n),s=r.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs)),a=s?i.current:{inputs:t,result:e()};return(0,o.useEffect)((function(){r.current=!1,i.current=a}),[a]),a.result}Gq=Fl.unstable_batchedUpdates,sq=Gq;var qq=$q,zq=function(e,t){return $q((function(){return e}),t)},Vq="Invariant failed";var Hq=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},Wq=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Yq=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Qq={top:0,right:0,bottom:0,left:0},Jq=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Qq:n,o=e.border,i=void 0===o?Qq:o,s=e.padding,a=void 0===s?Qq:s,l=Hq(Wq(t,r)),c=Hq(Yq(t,i)),u=Hq(Yq(c,a));return{marginBox:l,borderBox:Hq(t),paddingBox:c,contentBox:u,margin:r,border:i,padding:a}},Kq=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error(Vq)}(!1),n},Xq=function(e,t){var n,r,o=e.borderBox,i=e.border,s=e.margin,a=e.padding,l=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Jq({borderBox:l,border:i,margin:s,padding:a})},Zq=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Xq(e,t)},ez=function(e,t){var n={top:Kq(t.marginTop),right:Kq(t.marginRight),bottom:Kq(t.marginBottom),left:Kq(t.marginLeft)},r={top:Kq(t.paddingTop),right:Kq(t.paddingRight),bottom:Kq(t.paddingBottom),left:Kq(t.paddingLeft)},o={top:Kq(t.borderTopWidth),right:Kq(t.borderRightWidth),bottom:Kq(t.borderBottomWidth),left:Kq(t.borderLeftWidth)};return Jq({borderBox:e,margin:n,padding:r,border:o})},tz=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ez(t,n)},nz=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function rz(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||nz(r)&&nz(o)))return!1;var r,o;return!0}const oz=function(e,t){var n;void 0===t&&(t=rz);var r,o=[],i=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return i&&n===this&&t(s,o)||(r=e.apply(this,s),i=!0,n=this,o=s),r}};const iz=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function sz(e,t){}sz.bind(null,"warn"),sz.bind(null,"error");function az(){}function lz(e,t,n){var r=t.map((function(t){var r=function(e,t){return au({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((function(e){e()}))}}var cz=!0,uz="Invariant failed";function dz(e){this.message=e}function hz(e,t){if(!e)throw new dz(cz?uz:uz+": "+(t||""))}dz.prototype.toString=function(){return this.message};var pz=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=az,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof dz&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}du(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=lz(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof dz))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(o.Component),fz=function(e){return e+1},mz=function(e,t){var n=e.droppableId===t.droppableId,r=fz(e.index),o=fz(t.index);return n?"\n      You have moved the item from position "+r+"\n      to position "+o+"\n    ":"\n    You have moved the item from position "+r+"\n    in list "+e.droppableId+"\n    to list "+t.droppableId+"\n    in position "+o+"\n  "},gz=function(e,t,n){return t.droppableId===n.droppableId?"\n      The item "+e+"\n      has been combined with "+n.draggableId:"\n      The item "+e+"\n      in list "+t.droppableId+"\n      has been combined with "+n.draggableId+"\n      in list "+n.droppableId+"\n    "},vz=function(e){return"\n  The item has returned to its starting position\n  of "+fz(e.index)+"\n"},yz="\n  Press space bar to start a drag.\n  When dragging you can use the arrow keys to move the item around and escape to cancel.\n  Some screen readers may require you to be in focus mode or to use your pass through key\n",bz=function(e){return"\n  You have lifted an item in position "+fz(e.source.index)+"\n"},xz=function(e){var t=e.destination;if(t)return mz(e.source,t);var n=e.combine;return n?gz(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},wz=function(e){if("CANCEL"===e.reason)return"\n      Movement cancelled.\n      "+vz(e.source)+"\n    ";var t=e.destination,n=e.combine;return t?"\n      You have dropped the item.\n      "+mz(e.source,t)+"\n    ":n?"\n      You have dropped the item.\n      "+gz(e.draggableId,e.source,n)+"\n    ":"\n    The item has been dropped while not over a drop area.\n    "+vz(e.source)+"\n  "},Sz={x:0,y:0},Cz=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},jz=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},_z=function(e,t){return e.x===t.x&&e.y===t.y},kz=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Nz=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Ez=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Tz=function(e,t){return Math.min.apply(Math,t.map((function(t){return Ez(e,t)})))},Oz=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Iz=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Rz=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Az=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=Hq({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):Hq(e)},Mz=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t){return t?Iz(e,t.scroll.diff.displacement):e}(t.marginBox,o),s=function(e,t,n){var r;return n&&n.increasedBy?au({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(i,r,n);return{page:t,withPlaceholder:n,active:Az(s,o)}},Pz=function(e,t){e.frame||hz(!1);var n=e.frame,r=jz(t,n.scroll.initial),o=kz(r),i=au({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}});return au({},e,{frame:i,subject:Mz({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i})})};function Dz(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function Fz(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Lz(e,t){if(e.find)return e.find(t);var n=Fz(e,t);return-1!==n?e[n]:void 0}function Bz(e){return Array.prototype.slice.call(e)}var Uz=oz((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),Gz=oz((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),$z=oz((function(e){return Dz(e)})),qz=oz((function(e){return Dz(e)})),zz=oz((function(e,t){var n=qz(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return n}));function Vz(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Hz(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Wz=oz((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),Yz=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Qz={point:Sz,value:0},Jz={invisible:{},visible:{},all:[]},Kz={displaced:Jz,displacedBy:Qz,at:null},Xz=function(e,t){return function(n){return e<=n&&n<=t}},Zz=function(e){var t=Xz(e.top,e.bottom),n=Xz(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;var s=r.top<e.top&&r.bottom>e.bottom,a=r.left<e.left&&r.right>e.right;return!(!s||!a)||(s&&i||a&&o)}},eV=function(e){var t=Xz(e.top,e.bottom),n=Xz(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},tV={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},nV={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},rV=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,s=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Sz;return Iz(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(s,n,i)&&function(e,t,n){return n(t)(e)}(s,r,i)},oV=function(e){return rV(au({},e,{isVisibleThroughFrameFn:Zz}))},iV=function(e){return rV(au({},e,{isVisibleThroughFrameFn:eV}))},sV=function(e,t,n){if("boolean"===typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate};function aV(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,s=e.last;return t.reduce((function(e,t){var a=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Hq(Wq(n,r))}(t,r),l=t.descriptor.id;if(e.all.push(l),!oV({target:a,destination:n,viewport:o,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c={draggableId:l,shouldAnimate:sV(l,s,i)};return e.visible[l]=c,e}),{all:[],visible:{},invisible:{}})}function lV(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:Jz,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function cV(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,s=e.last,a=e.index,l=e.forceShouldAnimate,c=Yz(t,r);if(null==a)return lV({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var u=Lz(n,(function(e){return e.descriptor.index===a}));if(!u)return lV({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var d=Wz(t,n),h=n.indexOf(u);return{displaced:aV({afterDragging:d.slice(h),destination:r,displacedBy:i,last:s,viewport:o.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function uV(e,t){return Boolean(t.effected[e])}var dV=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,s=e.insideDestination,a=e.previousImpact,l=e.viewport,c=e.afterCritical,u=a.at;if(u||hz(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,s=t?i+1:i-1,a=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return s<a||s>(n?l:l+1)?null:s}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:s});return null==d?null:cV({draggable:r,insideDestination:s,destination:i,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:d})}var h=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var s=o.draggableId,a=r[s].descriptor.index;return uV(s,i)?t?a:a-1:t?a+1:a}({isMovingForward:t,destination:i,displaced:a.displaced,draggables:o,combine:u.combine,afterCritical:c});return null==h?null:cV({draggable:r,insideDestination:s,destination:i,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:h})},hV=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=Hz(n);o||hz(!1);var i=o.draggableId,s=r[i].page.borderBox.center,a=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return uV(r,n)?i?Sz:kz(o.point):i?o.point:Sz}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return Cz(s,a)},pV=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},fV=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},mV=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Nz(t.line,n.marginBox[t.end]+pV(t,r),fV(t,n.marginBox,r))},gV=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Nz(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),fV(t,n.marginBox,r))},vV=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,s=zz(o.descriptor.id,r),a=n.page,l=o.axis;if(!s.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Nz(t.line,n.contentBox[t.start]+pV(t,r),fV(t,n.contentBox,r))}({axis:l,moveInto:o.page,isMoving:a});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var h=r[d];if(uV(d,i))return gV({axis:l,moveRelativeTo:h.page,isMoving:a});var p=Xq(h.page,u.point);return gV({axis:l,moveRelativeTo:p,isMoving:a})}var f=s[s.length-1];if(f.descriptor.id===n.descriptor.id)return a.borderBox.center;if(uV(f.descriptor.id,i)){var m=Xq(f.page,kz(i.displacedBy.point));return mV({axis:l,moveRelativeTo:m,isMoving:a})}return mV({axis:l,moveRelativeTo:f.page,isMoving:a})},yV=function(e,t){var n=e.frame;return n?Cz(t,n.scroll.diff.displacement):t},bV=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,s=n.page.borderBox.center,a=t.at;return r&&a?"REORDER"===a.type?vV({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):hV({impact:t,draggables:o,afterCritical:i}):s}(e),n=e.droppable;return n?yV(n,t):t},xV=function(e,t){var n=jz(t,e.scroll.initial),r=kz(n);return{frame:Hq({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function wV(e,t){return e.map((function(e){return t[e]}))}var SV=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return Cz(e.scroll.diff.displacement,t)}(e.viewport,t),o=jz(r,n.page.borderBox.center);return Cz(n.client.borderBox.center,o)},CV=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,s=e.onlyOnMainAxis,a=void 0!==s&&s,l=jz(r,t.page.borderBox.center),c={target:Iz(t.page.borderBox,l),destination:n,withDroppableDisplacement:i,viewport:o};return a?function(e){return rV(au({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=Xz(e.top,e.bottom),r=Xz(e.left,e.right);return function(e){return t===tV?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):iV(c)},jV=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,s=e.viewport,a=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var u=zz(r.descriptor.id,o),d=Yz(n,r),h=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!Vz(i))return null;function s(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return au({},i,{at:t})}var a=i.displaced.all,l=a.length?a[0]:null;if(t)return l?s(l):null;var c=Wz(n,o);if(!l)return c.length?s(c[c.length-1].descriptor.id):null;var u=Fz(c,(function(e){return e.descriptor.id===l}));-1===u&&hz(!1);var d=u-1;return d<0?null:s(c[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:i})||dV({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:u,previousImpact:i,viewport:s,afterCritical:c});if(!h)return null;var p=bV({impact:h,draggable:n,droppable:r,draggables:o,afterCritical:c});if(CV({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:SV({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:h,scrollJumpRequest:null};var f=jz(p,a),m=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,s=xV(n,Cz(n.scroll.current,i)),a=r.frame?Pz(r,Cz(r.frame.scroll.current,i)):r,l=t.displaced,c=aV({afterDragging:wV(l.all,o),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:l,forceShouldAnimate:!1}),u=aV({afterDragging:wV(l.all,o),destination:a,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},h={},p=[l,c,u];return l.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,p);t?h[e]=t:d[e]=!0})),au({},t,{displaced:{all:l.all,invisible:d,visible:h}})}({impact:h,viewport:s,destination:r,draggables:o,maxScrollChange:f});return{clientSelection:l,impact:m,scrollJumpRequest:f}},_V=function(e){var t=e.subject.active;return t||hz(!1),t},kV=function(e,t){var n=e.page.borderBox.center;return uV(e.descriptor.id,t)?jz(n,t.displacedBy.point):n},NV=function(e,t){var n=e.page.borderBox;return uV(e.descriptor.id,t)?Iz(n,kz(t.displacedBy.point)):n},EV=oz((function(e,t){var n=t[e.line];return{value:n,point:Nz(e.line,n)}})),TV=function(e,t){return au({},e,{scroll:au({},e.scroll,{max:t})})},OV=function(e,t,n){var r=e.frame;Yz(t,e)&&hz(!1),e.subject.withPlaceholder&&hz(!1);var o=EV(e.axis,t.displaceBy).point,i=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return Nz(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],i=zz(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-o;return i<=0?null:Nz(r.line,i)}(e,o,n),s={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r)return au({},e,{subject:Mz({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame})});var a=i?Cz(r.scroll.max,i):r.scroll.max,l=TV(r,a);return au({},e,{subject:Mz({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:l}),frame:l})},IV=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,s=e.droppables,a=e.viewport,l=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,s=r.subject.active;if(!s)return null;var a=r.axis,l=Xz(s[a.start],s[a.end]),c=$z(o).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return Zz(i.frame)(_V(e))})).filter((function(e){var n=_V(e);return t?s[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<s[a.crossAxisStart]})).filter((function(e){var t=_V(e),n=Xz(t[a.start],t[a.end]);return l(t[a.start])||l(t[a.end])||n(s[a.start])||n(s[a.end])})).sort((function(e,n){var r=_V(e)[a.crossAxisStart],o=_V(n)[a.crossAxisStart];return t?r-o:o-r})).filter((function(e,t,n){return _V(e)[a.crossAxisStart]===_V(n[0])[a.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return Xz(_V(e)[a.start],_V(e)[a.end])(n[a.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return _V(e)[a.start]-_V(t)[a.start]}))[0]:c.sort((function(e,t){var r=Tz(n,Rz(_V(e))),o=Tz(n,Rz(_V(t)));return r!==o?r-o:_V(e)[a.start]-_V(t)[a.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:s,viewport:a});if(!c)return null;var u=zz(c.descriptor.id,i),d=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,i=e.afterCritical,s=o.filter((function(e){return iV({target:NV(e,i),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var o=Ez(t,yV(r,kV(e,i))),s=Ez(t,yV(r,kV(n,i)));return o<s?-1:s<o?1:e.descriptor.index-n.descriptor.index}));return s[0]||null}({pageBorderBoxCenter:n,viewport:a,destination:c,insideDestination:u,afterCritical:l}),h=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,s=e.destination,a=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:Jz,displacedBy:Qz,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},u=bV({impact:c,draggable:o,droppable:s,draggables:i,afterCritical:l}),d=Yz(o,s)?s:OV(s,o,i);return CV({draggable:o,destination:d,newPageBorderBoxCenter:u,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var h=Boolean(t[s.axis.line]<=n.page.borderBox.center[s.axis.line]),p=function(){var e=n.descriptor.index;return n.descriptor.id===o.descriptor.id||h?e:e+1}(),f=EV(s.axis,o.displaceBy);return cV({draggable:o,insideDestination:r,destination:s,viewport:a,displacedBy:f,last:Jz,index:p})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:i,moveRelativeTo:d,insideDestination:u,viewport:a,afterCritical:l});if(!h)return null;var p=bV({impact:h,draggable:r,droppable:c,draggables:i,afterCritical:l});return{clientSelection:SV({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:h,scrollJumpRequest:null}},RV=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},AV=function(e){var t=e.state,n=e.type,r=function(e,t){var n=RV(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),o=Boolean(r),i=t.dimensions.droppables[t.critical.droppable.id],s=r||i,a=s.axis.direction,l="vertical"===a&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===a&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!o)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,h=t.dimensions,p=h.draggables,f=h.droppables;return l?jV({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:s,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):IV({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:s,draggables:p,droppables:f,viewport:t.viewport,afterCritical:t.afterCritical})};function MV(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function PV(e){var t=Xz(e.top,e.bottom),n=Xz(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function DV(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=$z(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,o=e.subject.active;if(!o)return!1;if(r=o,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(PV(o)(t.center))return!0;var i=e.axis,s=o.center[i.crossAxisLine],a=t[i.crossAxisStart],l=t[i.crossAxisEnd],c=Xz(o[i.crossAxisStart],o[i.crossAxisEnd]),u=c(a),d=c(l);return!u&&!d||(u?a<s:l>s)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,o=n.page.borderBox.center,i=r.map((function(e){var n=e.axis,r=Nz(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Ez(o,r)}})).sort((function(e,t){return t.distance-e.distance}));return i[0]?i[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}var FV=function(e,t){return Hq(Iz(e,t))};function LV(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var BV=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,s=e.viewport,a=e.afterCritical,l=FV(n.page.borderBox,t),c=DV({pageBorderBox:l,draggable:n,droppables:o});if(!c)return Kz;var u=o[c],d=zz(u.descriptor.id,r),h=function(e,t){var n=e.frame;return n?FV(t,n.scroll.diff.value):t}(u,l);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,s=e.afterCritical;if(!o.isCombineEnabled)return null;var a=o.axis,l=EV(o.axis,t.displaceBy),c=l.value,u=n[a.start],d=n[a.end],h=Lz(Wz(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[a.size]/4,i=uV(t,s),l=LV({displaced:r.displaced,id:t});return i?l?d>n[a.start]+o&&d<n[a.end]-o:u>n[a.start]-c+o&&u<n[a.end]-c-o:l?d>n[a.start]+c+o&&d<n[a.end]+c-o:u>n[a.start]+o&&u<n[a.end]-o}));return h?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:o.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:i,destination:u,insideDestination:d,afterCritical:a})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,s=e.viewport,a=e.afterCritical,l=r.axis,c=EV(r.axis,n.displaceBy),u=c.value,d=t[l.start],h=t[l.end],p=Lz(Wz(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=uV(t,a),o=LV({displaced:i,id:t});return r?o?h<=n:d<n-u:o?h<=n+u:d<n})),f=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:p,inHomeList:Yz(n,r)});return cV({draggable:n,insideDestination:o,destination:r,viewport:s,last:i,displacedBy:c,index:f})}({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:u,insideDestination:d,last:i.displaced,viewport:s,afterCritical:a})},UV=function(e,t){var n;return au({},e,((n={})[t.descriptor.id]=t,n))},GV=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=RV(t),i=RV(n);if(!o)return r;if(o===i)return r;var s=r[o];if(!s.subject.withPlaceholder)return r;var a=function(e){var t=e.subject.withPlaceholder;t||hz(!1);var n=e.frame;if(!n)return au({},e,{subject:Mz({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})});var r=t.oldFrameMaxScroll;r||hz(!1);var o=TV(n,r);return au({},e,{subject:Mz({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null}),frame:o})}(s);return UV(r,a)},$V=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,s=e.scrollJumpRequest,a=o||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,u=jz(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:Cz(t.initial.client.borderBoxCenter,u)},h={selection:Cz(d.selection,a.scroll.current),borderBoxCenter:Cz(d.borderBoxCenter,a.scroll.current),offset:Cz(d.offset,a.scroll.diff.value)},p={client:d,page:h};if("COLLECTING"===t.phase)return au({phase:"COLLECTING"},t,{dimensions:l,viewport:a,current:p});var f=l.draggables[t.critical.draggable.id],m=i||BV({pageOffset:h.offset,draggable:f,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:a,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.previousImpact,i=e.impact,s=GV({previousImpact:o,impact:i,droppables:r}),a=RV(i);if(!a)return s;var l=r[a];if(Yz(t,l))return s;if(l.subject.withPlaceholder)return s;var c=OV(l,t,n);return UV(s,c)}({draggable:f,impact:m,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return au({},t,{current:p,dimensions:{draggables:l.draggables,droppables:g},impact:m,viewport:a,scrollJumpRequest:s||null,forceShouldAnimate:!s&&null})};var qV=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,s=t.displaced,a=function(e,t){return e.map((function(e){return t[e]}))}(s.all,r);return au({},t,{displaced:aV({afterDragging:a,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:s})})},zV=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,s=e.afterCritical,a=bV({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:s});return SV({pageBorderBoxCenter:a,draggable:n,viewport:i})},VV=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&hz(!1);var o=t.impact,i=r||t.viewport,s=n||t.dimensions,a=s.draggables,l=s.droppables,c=a[t.critical.draggable.id],u=RV(o);u||hz(!1);var d=l[u],h=qV({impact:o,viewport:i,destination:d,draggables:a}),p=zV({impact:h,draggable:c,droppable:d,draggables:a,viewport:i,afterCritical:t.afterCritical});return $V({impact:h,clientSelection:p,state:t,dimensions:s,viewport:i})},HV=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=EV(n.axis,t.displaceBy),s=zz(n.descriptor.id,r),a=s.indexOf(t);-1===a&&hz(!1);var l,c=s.slice(a+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:u};return{impact:{displaced:aV({afterDragging:c,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(l=t.descriptor,{index:l.index,droppableId:l.droppableId})}},afterCritical:d}},WV=function(e){0},YV=function(e){0},QV=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=function(e){var t=e.frame;return t||hz(!1),t}(n[t]),s=i.scroll.diff.value,a=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=Xq(t.client,n),i=Zq(o,r);return au({},t,{placeholder:au({},t.placeholder,{client:o}),client:o,page:i})}({draggable:e,offset:Cz(o,s),initialWindowScroll:r.scroll.initial});return a}))},JV=function(e){return"SNAP"===e.movementMode},KV=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:UV(e.droppables,t)}}(e.dimensions,t);return!JV(e)||n?$V({state:e,dimensions:r}):VV({state:e,dimensions:r})};function XV(e){return e.isDragging&&"SNAP"===e.movementMode?au({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var ZV={phase:"IDLE",completed:null,shouldFlush:!1},eH=function(e,t){if(void 0===e&&(e=ZV),"FLUSH"===t.type)return au({},ZV,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&hz(!1);var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,s=n.dimensions,a=n.movementMode,l=s.draggables[r.draggable.id],c=s.droppables[r.droppable.id],u={selection:o,borderBoxCenter:l.client.borderBox.center,offset:Sz},d={client:u,page:{selection:Cz(u.selection,i.scroll.initial),borderBoxCenter:Cz(u.selection,i.scroll.initial),offset:Cz(u.selection,i.scroll.diff.value)}},h=$z(s.droppables).every((function(e){return!e.isFixedOnPage})),p=HV({draggable:l,home:c,draggables:s.draggables,viewport:i}),f=p.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:s,initial:d,current:d,isWindowScrollAllowed:h,impact:f,afterCritical:p.afterCritical,onLiftImpact:f,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&hz(!1),au({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&hz(!1),function(e){var t=e.state,n=e.published;WV();var r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return Pz(n,e.scroll)})),o=au({},t.dimensions.droppables,{},Uz(r)),i=Gz(QV({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),s=au({},t.dimensions.draggables,{},i);n.removals.forEach((function(e){delete s[e]}));var a={droppables:o,draggables:s},l=RV(t.impact),c=l?a.droppables[l]:null,u=a.draggables[t.critical.draggable.id],d=a.droppables[t.critical.droppable.id],h=HV({draggable:u,home:d,draggables:s,viewport:t.viewport}),p=h.impact,f=h.afterCritical,m=c&&c.isCombineEnabled?t.impact:p,g=BV({pageOffset:t.current.page.offset,draggable:a.draggables[t.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:m,viewport:t.viewport,afterCritical:f});YV();var v=au({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:p,dimensions:a,afterCritical:f,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:au({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;MV(e)||hz(!1);var m=t.payload.client;return _z(m,e.current.client.selection)?e:$V({state:e,clientSelection:m,impact:JV(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return XV(e);if("COLLECTING"===e.phase)return XV(e);MV(e)||hz(!1);var g=t.payload,v=g.id,y=g.newScroll,b=e.dimensions.droppables[v];if(!b)return e;var x=Pz(b,y);return KV(e,x,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;MV(e)||hz(!1);var w=t.payload,S=w.id,C=w.isEnabled,j=e.dimensions.droppables[S];j||hz(!1),j.isEnabled===C&&hz(!1);var _=au({},j,{isEnabled:C});return KV(e,_,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;MV(e)||hz(!1);var k=t.payload,N=k.id,E=k.isCombineEnabled,T=e.dimensions.droppables[N];T||hz(!1),T.isCombineEnabled===E&&hz(!1);var O=au({},T,{isCombineEnabled:E});return KV(e,O,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;MV(e)||hz(!1),e.isWindowScrollAllowed||hz(!1);var I=t.payload.newScroll;if(_z(e.viewport.scroll.current,I))return XV(e);var R=xV(e.viewport,I);return JV(e)?VV({state:e,viewport:R}):$V({state:e,viewport:R})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!MV(e))return e;var A=t.payload.maxScroll;if(_z(A,e.viewport.scroll.max))return e;var M=au({},e.viewport,{scroll:au({},e.viewport.scroll,{max:A})});return au({phase:"DRAGGING"},e,{viewport:M})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&hz(!1);var P=AV({state:e,type:t.type});return P?$V({state:e,impact:P.impact,clientSelection:P.clientSelection,scrollJumpRequest:P.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var D=t.payload.reason;return"COLLECTING"!==e.phase&&hz(!1),au({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:D})}if("DROP_ANIMATE"===t.type){var F=t.payload,L=F.completed,B=F.dropDuration,U=F.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&hz(!1),{phase:"DROP_ANIMATING",completed:L,dropDuration:B,newHomeClientOffset:U,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},tH=function(e){return{type:"LIFT",payload:e}},nH=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},rH=function(){return{type:"COLLECTION_STARTING",payload:null}},oH=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},iH=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},sH=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},aH=function(e){return{type:"MOVE",payload:e}},lH=function(){return{type:"MOVE_UP",payload:null}},cH=function(){return{type:"MOVE_DOWN",payload:null}},uH=function(){return{type:"MOVE_RIGHT",payload:null}},dH=function(){return{type:"MOVE_LEFT",payload:null}},hH=function(){return{type:"FLUSH",payload:null}},pH=function(e){return{type:"DROP_COMPLETE",payload:e}},fH=function(e){return{type:"DROP",payload:e}},mH=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var gH="cubic-bezier(.2,1,.1,1)",vH={drop:0,combining:.7},yH={drop:.75},bH=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",xH={fluid:"opacity "+bH,snap:"transform "+bH+", opacity "+bH,drop:function(e){var t=e+"s "+gH;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+bH,placeholder:"height "+bH+", width "+bH+", margin "+bH},wH=function(e){return _z(e,Sz)?null:"translate("+e.x+"px, "+e.y+"px)"},SH={moveTo:wH,drop:function(e,t){var n=wH(e);return n?t?n+" scale("+yH.drop+")":n:null}},CH=.33,jH=.55,_H=jH-CH,kH=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var o=t(),i=r.payload.reason;if("COLLECTING"!==o.phase){if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&hz(!1),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&hz(!1);var s=o.critical,a=o.dimensions,l=a.draggables[o.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,s=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:au({},r,{displaced:Jz}),didDropInsideDroppable:!0}:{impact:qV({draggables:t,impact:s,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=c.impact,d=c.didDropInsideDroppable,h=d?Vz(u):null,p=d?Hz(u):null,f={index:s.draggable.index,droppableId:s.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:h,combine:p},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,s=r.draggables,a=r.droppables,l=RV(t),c=l?a[l]:null,u=a[n.descriptor.droppableId],d=zV({impact:t,draggable:n,draggables:s,afterCritical:i,droppable:c||u,viewport:o});return jz(d,n.client.borderBox.center)}({impact:u,draggable:l,dimensions:a,viewport:o.viewport,afterCritical:o.afterCritical}),v={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:u};if(!_z(o.current.client.offset,g)||Boolean(m.combine)){var y=function(e){var t=e.current,n=e.destination,r=e.reason,o=Ez(t,n);if(o<=0)return CH;if(o>=1500)return jH;var i=CH+_H*(o/1500);return Number(("CANCEL"===r?.6*i:i).toFixed(2))}({current:o.current.client.offset,destination:g,reason:i});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:g,dropDuration:y,completed:v}))}else n(pH({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},NH=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function EH(e){var t=e.onWindowScroll;var n=iz((function(){t(NH())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=az;function i(){return o!==az}return{start:function(){i()&&hz(!1),o=lz(window,[r])},stop:function(){i()||hz(!1),n.cancel(),o(),o=az},isActive:i}}var TH=function(e){var t=EH({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},OH=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=Fz(e,(function(e){return e.timerId===t}));-1===n&&hz(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},IH=function(e,t){WV(),t(),YV()},RH=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},AH=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},MH=function(e,t){var n=function(e,t){var n=OH(),r=null,o=function(n){r||hz(!1),r=null,IH(0,(function(){return AH(e().onDragEnd,n,t,wz)}))};return{beforeCapture:function(t,n){r&&hz(!1),IH(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&hz(!1),IH(0,(function(){var r=e().onBeforeDragStart;r&&r(RH(t,n))}))},start:function(o,i){r&&hz(!1);var s=RH(o,i);r={mode:i,lastCritical:o,lastLocation:s.source,lastCombine:null},n.add((function(){IH(0,(function(){return AH(e().onDragStart,s,t,bz)}))}))},update:function(o,i){var s=Vz(i),a=Hz(i);r||hz(!1);var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(o,r.lastCritical);l&&(r.lastCritical=o);var c,u,d=(u=s,!(null==(c=r.lastLocation)&&null==u||null!=c&&null!=u&&c.droppableId===u.droppableId&&c.index===u.index));d&&(r.lastLocation=s);var h=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(r.lastCombine,a);if(h&&(r.lastCombine=a),l||d||h){var p=au({},RH(o,r.mode),{combine:a,destination:s});n.add((function(){IH(0,(function(){return AH(e().onDragUpdate,p,t,xz)}))}))}},flush:function(){r||hz(!1),n.flush()},drop:o,abort:function(){if(r){var e=au({},RH(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});o(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var s=e.getState();"DRAGGING"===s.phase&&n.update(s.critical,s.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},PH=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&hz(!1),e.dispatch(pH({completed:r.completed}))}else t(n)}}},DH=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=lz(window,[i])}))}}}},FH=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(fH({reason:r.reason})))}}}},LH=oq,BH=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,s=e.announce,a=e.autoScroller;return tq(eH,LH(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(J$(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=oq.apply(void 0,i)(n.dispatch),cv(cv({},n),{},{dispatch:r})}}}((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,s=i.id,a=i.clientSelection,l=i.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(pH({completed:c.completed})),"IDLE"!==n().phase&&hz(!1),r(hH()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:s,movementMode:l}});var u={draggableId:s,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},d=e.startPublishing(u),h=d.critical,p=d.dimensions,f=d.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:h,dimensions:p,clientSelection:a,movementMode:l,viewport:f}})}else t(o)}}}}(n),kH,PH,DH,FH,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var o=t.getState();return"DRAGGING"!==o.phase&&hz(!1),void e.start(o)}n(r),e.scroll(t.getState())}}}}(a),TH,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),MH(i,s))))};var UH=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=jz({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},GH=function(){var e=document.documentElement;return e||hz(!1),e},$H=function(){var e=GH();return UH({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},qH=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;WV();var o=function(){var e=NH(),t=$H(),n=e.y,r=e.x,o=GH(),i=o.clientWidth,s=o.clientHeight;return{frame:Hq({top:n,left:r,right:r+i,bottom:n+s}),scroll:{initial:e,current:e,max:t,diff:{value:Sz,displacement:Sz}}}}(),i=o.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)})),l=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(i)})),c={draggables:Gz(l),droppables:Uz(a)};return YV(),{dimensions:c,critical:t,viewport:o}};function zH(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var VH=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame((function(){o=null,WV();var e=r,i=e.additions,s=e.removals,a=e.modified,l=Object.keys(i).map((function(e){return t.draggable.getById(e).getDimension(Sz)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(a).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:l,removals:Object.keys(s),modified:c};r={additions:{},removals:{},modified:{}},YV(),n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],i()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],i()},stop:function(){o&&(cancelAnimationFrame(o),o=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(t){n||hz(!1);var o=n.critical.draggable;"ADDITION"===t.type&&zH(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&zH(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:function(r,o){e.droppable.exists(r)||hz(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:function(r,o){n&&(e.droppable.exists(r)||hz(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,o){n&&(e.droppable.exists(r)||hz(!1),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:function(t){n&&hz(!1);var r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),s={draggable:r.descriptor,droppable:i.descriptor},a=e.subscribe(o);return n={critical:s,unsubscribe:a},qH({critical:s,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}};return i},HH=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},WH=function(e){window.scrollBy(e.x,e.y)},YH=oz((function(e){return $z(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),QH=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}var i=function(e,t){var n=Lz(YH(t),(function(t){return t.frame||hz(!1),PV(t.frame.pageMarginBox)(e)}));return n}(t,r);return i},JH=.25,KH=.05,XH=28,ZH=function(e){return Math.pow(e,2)},eW={stopDampeningAt:1200,accelerateAt:360},tW=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?0:(r-t)/o},nW=eW.accelerateAt,rW=eW.stopDampeningAt,oW=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return XH;if(e===t.startScrollingFrom)return 1;var n=tW({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=XH*ZH(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=rW,o=Date.now()-n;if(o>=rW)return e;if(o<nW)return 1;var i=tW({startOfRange:nW,endOfRange:r,current:o}),s=e*ZH(i);return Math.ceil(s)}(i,r),1):i},iW=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,s=function(e,t){return{startScrollingFrom:e[t.size]*JH,maxScrollValueAt:e[t.size]*KH}}(t,o);return n[o.end]<n[o.start]?oW({distanceToEdge:n[o.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:i}):-1*oW({distanceToEdge:n[o.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:i})},sW=Oz((function(e){return 0===e?0:e})),aW=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,s={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},a=iW({container:n,distanceToEdges:s,dragStartTime:t,axis:tV,shouldUseTimeDampening:i}),l=iW({container:n,distanceToEdges:s,dragStartTime:t,axis:nV,shouldUseTimeDampening:i}),c=sW({x:l,y:a});if(_z(c,Sz))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?_z(u,Sz)?null:u:null},lW=Oz((function(e){return 0===e?0:e>0?1:-1})),cW=function(){var e=function(e,t){return e<0?e:e>t?e-t:0};return function(t){var n=t.current,r=t.max,o=t.change,i=Cz(n,o),s={x:e(i.x,r.x),y:e(i.y,r.y)};return _z(s,Sz)?null:s}}(),uW=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=lW(r),s=cW({max:o,current:n,change:i});return!s||(0!==i.x&&0===s.x||0!==i.y&&0===s.y)},dW=function(e,t){return uW({current:e.scroll.current,max:e.scroll.max,change:t})},hW=function(e,t){var n=e.frame;return!!n&&uW({current:n.scroll.current,max:n.scroll.max,change:t})},pW=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,s=aW({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:i});return s&&dW(t,s)?s:null}({dragStartTime:n,viewport:t.viewport,subject:a,center:s,shouldUseTimeDampening:r});if(l)return void o(l)}var c=QH({center:s,destination:RV(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var a=aW({dragStartTime:o,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return a&&hW(t,a)?a:null}({dragStartTime:n,droppable:c,subject:a,center:s,shouldUseTimeDampening:r});u&&i(c.descriptor.id,u)}},fW=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(e,t){if(!hW(e,t))return t;var r=function(e,t){var n=e.frame;return n&&hW(e,t)?cW({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=jz(t,r);return n(e.descriptor.id,o),jz(t,o)},i=function(e,t,n){if(!e)return n;if(!dW(t,n))return n;var o=function(e,t){if(!dW(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return cW({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=jz(n,o);return r(i),jz(n,i)};return function(e){var n=e.scrollJumpRequest;if(n){var r=RV(e.impact);r||hz(!1);var s=o(e.dimensions.droppables[r],n);if(s){var a=e.viewport,l=i(e.isWindowScrollAllowed,a,s);l&&function(e,n){var r=Cz(e.current.client.selection,n);t({client:r})}(e,l)}}}},mW=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=iz(t),o=iz(n),i=null,s=function(e){i||hz(!1);var t=i,n=t.shouldUseTimeDampening,s=t.dragStartTime;pW({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:s,shouldUseTimeDampening:n})};return{start:function(e){WV(),i&&hz(!1);var t=Date.now(),n=!1,r=function(){n=!0};pW({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),i={dragStartTime:t,shouldUseTimeDampening:n},YV(),n&&s(e)},stop:function(){i&&(r.cancel(),o.cancel(),i=null)},scroll:s}}({scrollWindow:n,scrollDroppable:t}),i=fW({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}},gW="data-rbd",vW=function(){var e=gW+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),yW=function(){var e=gW+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),bW=function(){var e=gW+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),xW={contextId:gW+"-scroll-container-context-id"},wW=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},SW=function(e){var t,n=(t=e,function(e){return"["+e+'="'+t+'"]'}),r=function(){var e="\n      cursor: -webkit-grab;\n      cursor: grab;\n    ";return{selector:n(vW.contextId),styles:{always:"\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),o=function(){var e="\n      transition: "+xH.outOfTheWay+";\n    ";return{selector:n(yW.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),i=[o,r,{selector:n(bW.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      "}}];return{always:wW(i,"always"),resting:wW(i,"resting"),dragging:wW(i,"dragging"),dropAnimating:wW(i,"dropAnimating"),userCancel:wW(i,"userCancel")}},CW="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?o.useLayoutEffect:o.useEffect,jW=function(){var e=document.querySelector("head");return e||hz(!1),e},_W=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};var kW=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function NW(e){return e instanceof kW(e).HTMLElement}function EW(e,t){var n="["+vW.contextId+'="'+e+'"]',r=Bz(document.querySelectorAll(n));if(!r.length)return null;var o=Lz(r,(function(e){return e.getAttribute(vW.draggableId)===t}));return o&&NW(o)?o:null}function TW(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}var o={register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||hz(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Dz(e.draggables).filter((function(e){return e.descriptor.type===t}))}};function i(t){return e.droppables[t]||null}var s={register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||hz(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return Dz(e.droppables).filter((function(e){return e.descriptor.type===t}))}};return{draggable:o,droppable:s,subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var OW=o.createContext(null),IW=function(){var e=document.body;return e||hz(!1),e},RW={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},AW=function(e){return"rbd-announcement-"+e};var MW=0,PW={separator:"::"};function DW(e,t){return void 0===t&&(t=PW),qq((function(){return""+e+t.separator+MW++}),[t.separator,e])}var FW=o.createContext(null);function LW(e){0}function BW(e,t){LW()}function UW(e){var t=(0,o.useRef)(e);return(0,o.useEffect)((function(){t.current=e})),t}var GW,$W=27,qW=32,zW=37,VW=38,HW=39,WW=40,YW=((GW={})[13]=!0,GW[9]=!0,GW),QW=function(e){YW[e.keyCode]&&e.preventDefault()},JW=function(){var e="visibilitychange";return"undefined"===typeof document?e:Lz([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),KW=0,XW=5;var ZW,eY={type:"IDLE"};function tY(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(t===KW){var s={x:n,y:i},a=r();if("DRAGGING"===a.type)return e.preventDefault(),void a.actions.move(s);"PENDING"!==a.type&&hz(!1);var l=a.point;if(c=l,u=s,Math.abs(u.x-c.x)>=XW||Math.abs(u.y-c.y)>=XW){var c,u;e.preventDefault();var d=a.actions.fluidLift(s);o({type:"DRAGGING",actions:d})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return e.keyCode===$W?(e.preventDefault(),void t()):void QW(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&hz(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:JW,fn:t}]}function nY(){}var rY=((ZW={})[34]=!0,ZW[33]=!0,ZW[36]=!0,ZW[35]=!0,ZW);function oY(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return r.keyCode===$W?(r.preventDefault(),void n()):r.keyCode===qW?(r.preventDefault(),t(),void e.drop()):r.keyCode===WW?(r.preventDefault(),void e.moveDown()):r.keyCode===VW?(r.preventDefault(),void e.moveUp()):r.keyCode===HW?(r.preventDefault(),void e.moveRight()):r.keyCode===zW?(r.preventDefault(),void e.moveLeft()):void(rY[r.keyCode]?r.preventDefault():QW(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:JW,fn:n}]}var iY={type:"IDLE"},sY=.15;var aY={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function lY(e,t){if(null==t)return!1;if(Boolean(aY[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&lY(e,t.parentElement)}function cY(e,t){var n=t.target;return!!NW(n)&&lY(e,n)}var uY=function(e){return Hq(e.getBoundingClientRect()).center};var dY=function(){var e="matches";return"undefined"===typeof document?e:Lz([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function hY(e,t){return null==e?null:e[dY](t)?e:hY(e.parentElement,t)}function pY(e,t){return e.closest?e.closest(t):hY(e,t)}function fY(e,t){var n,r=t.target;if(!((n=r)instanceof kW(n).Element))return null;var o=function(e){return"["+vW.contextId+'="'+e+'"]'}(e),i=pY(r,o);return i&&NW(i)?i:null}function mY(e){e.preventDefault()}function gY(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function vY(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!!i&&(!!i.options.isEnabled&&!!HH(n.getState(),o))}function yY(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent;if(!vY({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var l=o.draggable.getById(i),c=function(e,t){var n="["+yW.contextId+'="'+e+'"]',r=Lz(Bz(document.querySelectorAll(n)),(function(e){return e.getAttribute(yW.id)===t}));return r&&NW(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(a&&!l.options.canDragInteractiveElements&&cY(c,a))return null;var u=t.claim(s||az),d="PRE_DRAG";function h(){return l.options.shouldRespectForcePress}function p(){return t.isActive(u)}var f=function(e,t){gY({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(e){function n(){t.release(),d="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=lz(window,[{eventName:"click",fn:mY,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(fH({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&hz(!1)),r.dispatch(tH(e.liftActionArgs)),d="DRAGGING",au({isActive:function(){return gY({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:h,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}var g={isActive:function(){return gY({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:h,fluidLift:function(e){var t=iz((function(e){f((function(){return aH({client:e})}))}));return au({},m({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return f(lH)},moveRight:function(){return f(uH)},moveDown:function(){return f(cH)},moveLeft:function(){return f(dH)}};return m({liftActionArgs:{id:i,clientSelection:uY(c),movementMode:"SNAP"},cleanup:az,actions:e})},abort:function(){gY({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&t.release()}};return g}var bY=[function(e){var t=(0,o.useRef)(eY),n=(0,o.useRef)(az),r=qq((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&t.button===KW&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,a,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),u(o,i)}}}}}}),[e]),i=qq((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),s=zq((function(){n.current=lz(window,[i,r],{passive:!1,capture:!0})}),[i,r]),a=zq((function(){"IDLE"!==t.current.type&&(t.current=eY,n.current(),s())}),[s]),l=zq((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),c=zq((function(){var e=tY({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=lz(window,e,{capture:!0,passive:!1})}),[l,a]),u=zq((function(e,n){"IDLE"!==t.current.type&&hz(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);CW((function(){return s(),function(){n.current()}}),[s])},function(e){var t=(0,o.useRef)(nY),n=qq((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&n.keyCode===qW){var o=e.findClosestDraggableId(n);if(o){var i=e.tryGetLock(o,l,{sourceEvent:n});if(i){n.preventDefault();var s=!0,a=i.snapLift();t.current(),t.current=lz(window,oY(a,l),{capture:!0,passive:!1})}}}function l(){s||hz(!1),s=!1,t.current(),r()}}}}),[e]),r=zq((function(){t.current=lz(window,[n],{passive:!1,capture:!0})}),[n]);CW((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,o.useRef)(iY),n=(0,o.useRef)(az),r=zq((function(){return t.current}),[]),i=zq((function(e){t.current=e}),[]),s=qq((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,l,{sourceEvent:t});if(o){var i=t.touches[0],s={x:i.clientX,y:i.clientY};n.current(),h(o,s)}}}}}}),[e]),a=zq((function(){n.current=lz(window,[s],{capture:!0,passive:!1})}),[s]),l=zq((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(iY),n.current(),a())}),[a,i]),c=zq((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),u=zq((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:r},o=lz(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&hz(!1);var o=e.touches[0];if(o&&o.force>=sY){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:JW,fn:t}]}(t),e),i=lz(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(e.keyCode===$W&&e.preventDefault(),t()):t()}},{eventName:JW,fn:t}]}(t),e);n.current=function(){o(),i()}}),[c,r,l]),d=zq((function(){var e=r();"PENDING"!==e.type&&hz(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),h=zq((function(e,t){"IDLE"!==r().type&&hz(!1);var n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,r,i,d]);CW((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(iY))}}),[r,a,i]),CW((function(){return lz(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function xY(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,s=e.enableDefaultSensors,a=[].concat(s?bY:[],i||[]),l=(0,o.useState)((function(){return function(){var e=null;function t(){e||hz(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&hz(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=zq((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);CW((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[l,n,c]),CW((function(){return l.tryAbandon}),[l.tryAbandon]);var u=zq((function(e){return vY({lockAPI:l,registry:r,store:n,draggableId:e})}),[l,r,n]),d=zq((function(e,o,i){return yY({lockAPI:l,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,l,r,n]),h=zq((function(e){return function(e,t){var n=fY(e,t);return n?n.getAttribute(vW.draggableId):null}(t,e)}),[t]),p=zq((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),f=zq((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch(hH()))}),[l,n]),m=zq(l.isClaimed,[l]),g=qq((function(){return{canGetLock:u,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}}),[u,d,h,p,f,m]);LW();for(var v=0;v<a.length;v++)a[v](g)}var wY=function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function SY(e){return e.current||hz(!1),e.current}function CY(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,s=e.dragHandleUsageInstructions,a=(0,o.useRef)(null);BW();var l=UW(e),c=zq((function(){return wY(l.current)}),[l]),u=function(e){var t=qq((function(){return AW(e)}),[e]),n=(0,o.useRef)(null);return(0,o.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),au(e.style,RW),IW().appendChild(e),function(){setTimeout((function(){var t=IW();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),zq((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),d=function(e){var t=e.contextId,n=e.text,r=DW("hidden-text",{separator:"-"}),i=qq((function(){return function(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}({contextId:t,uniqueId:r})}),[r,t]);return(0,o.useEffect)((function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",IW().appendChild(e),function(){var t=IW();t.contains(e)&&t.removeChild(e)}}),[i,n]),i}({contextId:t,text:s}),h=function(e,t){var n=qq((function(){return SW(e)}),[e]),r=(0,o.useRef)(null),i=(0,o.useRef)(null),s=zq(oz((function(e){var t=i.current;t||hz(!1),t.textContent=e})),[]),a=zq((function(e){var t=r.current;t||hz(!1),t.textContent=e}),[]);CW((function(){(r.current||i.current)&&hz(!1);var o=_W(t),l=_W(t);return r.current=o,i.current=l,o.setAttribute(gW+"-always",e),l.setAttribute(gW+"-dynamic",e),jW().appendChild(o),jW().appendChild(l),a(n.always),s(n.resting),function(){var e=function(e){var t=e.current;t||hz(!1),jW().removeChild(t),e.current=null};e(r),e(i)}}),[t,a,s,n.always,n.resting,e]);var l=zq((function(){return s(n.dragging)}),[s,n.dragging]),c=zq((function(e){s("DROP"!==e?n.userCancel:n.dropAnimating)}),[s,n.dropAnimating,n.userCancel]),u=zq((function(){i.current&&s(n.resting)}),[s,n.resting]);return qq((function(){return{dragging:l,dropping:c,resting:u}}),[l,c,u])}(t,i),p=zq((function(e){SY(a).dispatch(e)}),[]),f=qq((function(){return rq({publishWhileDragging:nH,updateDroppableScroll:oH,updateDroppableIsEnabled:iH,updateDroppableIsCombineEnabled:sH,collectionStarting:rH},p)}),[p]),m=function(){var e=qq(TW,[]);return(0,o.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),g=qq((function(){return VH(m,f)}),[m,f]),v=qq((function(){return mW(au({scrollWindow:WH,scrollDroppable:g.scrollDroppable},rq({move:aH},p)))}),[g.scrollDroppable,p]),y=function(e){var t=(0,o.useRef)({}),n=(0,o.useRef)(null),r=(0,o.useRef)(null),i=(0,o.useRef)(!1),s=zq((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=zq((function(t){var n=EW(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=zq((function(e,t){n.current===e&&(n.current=t)}),[]),c=zq((function(){r.current||i.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),u=zq((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(vW.draggableId)===e&&(n.current=e)}),[]);return CW((function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),qq((function(){return{register:s,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}}),[s,u,c,l])}(t),b=qq((function(){return BH({announce:u,autoScroller:v,dimensionMarshal:g,focusMarshal:y,getResponders:c,styleMarshal:h})}),[u,v,g,y,c,h]);a.current=b;var x=zq((function(){var e=SY(a);"IDLE"!==e.getState().phase&&e.dispatch(hH())}),[]),w=zq((function(){var e=SY(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(qq((function(){return{isDragging:w,tryAbort:x}}),[w,x]));var S=zq((function(e){return HH(SY(a).getState(),e)}),[]),C=zq((function(){return MV(SY(a).getState())}),[]),j=qq((function(){return{marshal:g,focus:y,contextId:t,canLift:S,isMovementAllowed:C,dragHandleUsageInstructionsId:d,registry:m}}),[t,g,d,y,S,C,m]);return xY({contextId:t,store:b,registry:m,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,o.useEffect)((function(){return x}),[x]),o.createElement(FW.Provider,{value:j},o.createElement(dq,{context:OW,store:b},e.children))}var jY=0;function _Y(e){var t=qq((function(){return""+jY++}),[]),n=e.dragHandleUsageInstructions||yz;return o.createElement(pz,null,(function(r){return o.createElement(CY,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var kY=function(e){return function(t){return e===t}},NY=kY("scroll"),EY=kY("auto"),TY=(kY("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),OY=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return TY(n,NY)||TY(n,EY)},IY=function e(t){return null==t||t===document.body||t===document.documentElement?null:OY(t)?t:e(t.parentElement)},RY=function(e){return{x:e.scrollLeft,y:e.scrollTop}},AY=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},MY=function(e){return{closestScrollable:IY(e),isFixedOnPage:AY(e)}},PY=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,s=e.isDropDisabled,a=e.isCombineEnabled,l=e.shouldClipSubject,c=r.closestScrollable,u=function(e,t){var n=tz(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,s=o+t.scrollWidth,a=Wq({top:r,right:s,bottom:i,left:o},n.border);return Jq({borderBox:a,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=Zq(u,o),h=function(){if(!c)return null;var e=tz(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Zq(e,o),scroll:RY(c),scrollSize:t,shouldClipSubject:l}}(),p=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,s=e.client,a=e.page,l=e.closest,c=function(){if(!l)return null;var e=l.scrollSize,t=l.client,n=UH({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:Sz,displacement:Sz}}}}(),u="vertical"===i?tV:nV;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:u,isEnabled:n,client:s,page:a,frame:c,subject:Mz({page:a,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!s,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:i,client:u,page:d,closest:h});return p},DY={passive:!1},FY={passive:!0},LY=function(e){return e.shouldPublishImmediately?DY:FY};function BY(e){var t=(0,o.useContext)(e);return t||hz(!1),t}var UY=function(e){return e&&e.env.closestScrollable||null};function GY(){}var $Y={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},qY=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?$Y:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?xH.placeholder:null}};var zY=o.memo((function(e){var t=(0,o.useRef)(null),n=zq((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,i=e.onTransitionEnd,s=e.onClose,a=e.contextId,l=(0,o.useState)("open"===e.animate),c=l[0],u=l[1];(0,o.useEffect)((function(){return c?"open"!==r?(n(),u(!1),GY):t.current?GY:(t.current=setTimeout((function(){t.current=null,u(!1)})),n):GY}),[r,c,n]);var d=zq((function(e){"height"===e.propertyName&&(i(),"close"===r&&s())}),[r,s,i]),h=qY({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return o.createElement(e.placeholder.tagName,{style:h,"data-rbd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})})),VY=o.createContext(null);var HY=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return du(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(o.PureComponent),WY={dragging:5e3,dropAnimating:4500},YY=function(e,t){return t?xH.drop(t.duration):e?xH.snap:xH.fluid},QY=function(e,t){return e?t?vH.drop:vH.combining:null},JY=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode};function KY(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,o=e.dropping,i=Boolean(r),s=JY(e),a=Boolean(o),l=a?SH.drop(n,i):SH.moveTo(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:YY(s,o),transform:l,opacity:QY(i,a),zIndex:a?WY.dropAnimating:WY.dragging,pointerEvents:"none"}}(e):(t=e,{transform:SH.moveTo(t.offset),transition:t.shouldAnimateDisplacement?null:"none"});var t}function XY(e){var t=DW("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,s=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,c=qq((function(){return{canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}}),[s,l,a]),u=zq((function(e){var t=i();return t||hz(!1),function(e,t,n){void 0===n&&(n=Sz);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=ez(o,r),s=Zq(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:s}}(n,t,e)}),[n,i]),d=qq((function(){return{uniqueId:t,descriptor:n,options:c,getDimension:u}}),[n,u,c,t]),h=(0,o.useRef)(d),p=(0,o.useRef)(!0);CW((function(){return r.draggable.register(h.current),function(){return r.draggable.unregister(h.current)}}),[r.draggable]),CW((function(){if(p.current)p.current=!1;else{var e=h.current;h.current=d,r.draggable.update(d,e)}}),[d,r.draggable])}function ZY(e,t,n){BW()}function eQ(e){e.preventDefault()}var tQ=function(e,t){return e===t},nQ=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function rQ(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var oQ={mapped:{type:"SECONDARY",offset:Sz,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rQ(null)}};var iQ=Uq((function(){var e=function(){var e=oz((function(e,t){return{x:e,y:t}})),t=oz((function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=oz((function(e,n,r,o,i,s,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:s,mode:n,offset:e,dimension:r,forceShouldAnimate:a,snapshot:t(n,o,i,s,null)}}}));return function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var i=r.current.client.offset,s=r.dimensions.draggables[o.draggableId],a=RV(r.impact),l=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(i.x,i.y),r.movementMode,s,o.isClone,a,l,c)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==o.draggableId)return null;var h=o.isClone,p=r.dimensions.draggables[o.draggableId],f=d.result,m=f.mode,g=nQ(f),v=function(e){return e.combine?e.combine.draggableId:null}(f),y={duration:r.dropDuration,curve:gH,moveTo:r.newHomeClientOffset,opacity:v?vH.drop:null,scale:v?yH.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:p,dropping:y,draggingOver:g,combineWith:v,mode:m,forceShouldAnimate:null,snapshot:t(m,h,g,v,y)}}}return null}}(),t=function(){var e=oz((function(e,t){return{x:e,y:t}})),t=oz(rQ),n=oz((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(Sz,e,!0):null},o=function(t,o,i,s){var a=i.displaced.visible[t],l=Boolean(s.inVirtualList&&s.effected[t]),c=Hz(i),u=c&&c.draggableId===t?o:null;if(!a){if(!l)return r(u);if(i.displaced.invisible[t])return null;var d=kz(s.displacedBy.point),h=e(d.x,d.y);return n(h,u,!0)}if(l)return r(u);var p=i.displacedBy.point,f=e(p.x,p.y);return n(f,u,a.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(n,r){return e(n,r)||t(n,r)||oQ}}),{dropAnimationFinished:mH},null,{context:OW,pure:!0,areStatePropsEqual:tQ})((function(e){var t=(0,o.useRef)(null),n=zq((function(e){t.current=e}),[]),r=zq((function(){return t.current}),[]),i=BY(FW),s=i.contextId,a=i.dragHandleUsageInstructionsId,l=i.registry,c=BY(VY),u=c.type,d=c.droppableId,h=qq((function(){return{id:e.draggableId,index:e.index,type:u,droppableId:d}}),[e.draggableId,e.index,u,d]),p=e.children,f=e.draggableId,m=e.isEnabled,g=e.shouldRespectForcePress,v=e.canDragInteractiveElements,y=e.isClone,b=e.mapped,x=e.dropAnimationFinished;ZY(),LW(),y||XY(qq((function(){return{descriptor:h,registry:l,getDraggableRef:r,canDragInteractiveElements:v,shouldRespectForcePress:g,isEnabled:m}}),[h,l,r,v,g,m]));var w=qq((function(){return m?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:eQ}:null}),[s,a,f,m]),S=zq((function(e){"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&x()}),[x,b]),C=qq((function(){var e=KY(b),t="DRAGGING"===b.type&&b.dropping?S:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:w}}),[s,w,f,b,S,n]),j=qq((function(){return{draggableId:h.id,type:h.type,source:{index:h.index,droppableId:h.droppableId}}}),[h.droppableId,h.id,h.index,h.type]);return p(C,b.snapshot,j)}));function sQ(e){return BY(VY).isUsingCloneFor!==e.draggableId||e.isClone?o.createElement(iQ,e):null}function aQ(e){var t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return o.createElement(sQ,au({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var lQ=function(e,t){return e===t.droppable.type},cQ=function(e,t){return t.draggables[e.draggable.id]};var uQ={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||hz(!1),document.body}},dQ=Uq((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=au({},e,{shouldAnimatePlaceholder:!1}),n=oz((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=oz((function(r,o,i,s,a,l){var c=a.descriptor.id;if(a.descriptor.droppableId===r){var u=l?{render:l,dragging:n(a.descriptor)}:null,d={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!o)return t;if(!s)return e;var h={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!0,snapshot:h,useClone:null}}));return function(n,o){var i=o.droppableId,s=o.type,a=!o.isDropDisabled,l=o.renderClone;if(n.isDragging){var c=n.critical;if(!lQ(s,c))return t;var u=cQ(c,n.dimensions),d=RV(n.impact)===i;return r(i,a,d,d,u,l)}if("DROP_ANIMATING"===n.phase){var h=n.completed;if(!lQ(s,h.critical))return t;var p=cQ(h.critical,n.dimensions);return r(i,a,nQ(h.result)===i,RV(h.impact)===i,p,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var f=n.completed;if(!lQ(s,f.critical))return t;var m=RV(f.impact)===i,g=Boolean(f.impact.at&&"COMBINE"===f.impact.at.type),v=f.critical.droppable.id===i;return m?g?e:t:v?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:OW,pure:!0,areStatePropsEqual:tQ})((function(e){var t=(0,o.useContext)(FW);t||hz(!1);var n=t.contextId,r=t.isMovementAllowed,i=(0,o.useRef)(null),s=(0,o.useRef)(null),a=e.children,l=e.droppableId,c=e.type,u=e.mode,d=e.direction,h=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,m=e.snapshot,g=e.useClone,v=e.updateViewportMaxScroll,y=e.getContainerForClone,b=zq((function(){return i.current}),[]),x=zq((function(e){i.current=e}),[]),w=(zq((function(){return s.current}),[]),zq((function(e){s.current=e}),[]));BW();var S=zq((function(){r()&&v({maxScroll:$H()})}),[r,v]);!function(e){var t=(0,o.useRef)(null),n=BY(FW),r=DW("droppable"),i=n.registry,s=n.marshal,a=UW(e),l=qq((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),c=(0,o.useRef)(l),u=qq((function(){return oz((function(e,n){t.current||hz(!1);var r={x:e,y:n};s.updateDroppableScroll(l.id,r)}))}),[l.id,s]),d=zq((function(){var e=t.current;return e&&e.env.closestScrollable?RY(e.env.closestScrollable):Sz}),[]),h=zq((function(){var e=d();u(e.x,e.y)}),[d,u]),p=qq((function(){return iz(h)}),[h]),f=zq((function(){var e=t.current,n=UY(e);e&&n||hz(!1),e.scrollOptions.shouldPublishImmediately?h():p()}),[p,h]),m=zq((function(e,r){t.current&&hz(!1);var o=a.current,i=o.getDroppableRef();i||hz(!1);var s=MY(i),c={ref:i,descriptor:l,env:s,scrollOptions:r};t.current=c;var u=PY({ref:i,descriptor:l,env:s,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),d=s.closestScrollable;return d&&(d.setAttribute(xW.contextId,n.contextId),d.addEventListener("scroll",f,LY(c.scrollOptions))),u}),[n.contextId,l,f,a]),g=zq((function(){var e=t.current,n=UY(e);return e&&n||hz(!1),RY(n)}),[]),v=zq((function(){var e=t.current;e||hz(!1);var n=UY(e);t.current=null,n&&(p.cancel(),n.removeAttribute(xW.contextId),n.removeEventListener("scroll",f,LY(e.scrollOptions)))}),[f,p]),y=zq((function(e){var n=t.current;n||hz(!1);var r=UY(n);r||hz(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),b=qq((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:v,scroll:y}}),[v,m,g,y]),x=qq((function(){return{uniqueId:r,descriptor:l,callbacks:b}}),[b,l,r]);CW((function(){return c.current=x.descriptor,i.droppable.register(x),function(){t.current&&v(),i.droppable.unregister(x)}}),[b,l,v,x,s,i.droppable]),CW((function(){t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,s]),CW((function(){t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,s])}({droppableId:l,type:c,mode:u,direction:d,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:h,getDroppableRef:b});var C=o.createElement(HY,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,i=e.animate;return o.createElement(zY,{placeholder:r,onClose:t,innerRef:w,animate:i,contextId:n,onTransitionEnd:S})})),j=qq((function(){return{innerRef:x,placeholder:C,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}}),[n,l,C,x]),_=g?g.dragging.draggableId:null,k=qq((function(){return{droppableId:l,type:c,isUsingCloneFor:_}}),[l,_,c]);return o.createElement(VY.Provider,{value:k},a(j,m),function(){if(!g)return null;var e=g.dragging,t=g.render,n=o.createElement(sQ,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return Fl.createPortal(n,y())}())}));dQ.defaultProps=uQ;const hQ=e=>!!e&&e.adminOnlyRequests,pQ={id:null,classes:[],lockedStudentIds:[],__typename:"",suggestions:[]},fQ=e=>e&&e.some((({classDetails:e})=>e.maxClassSize||e.maxSizePerGrade.length>0)),mQ=e=>{if(e)return e.reduce(((e,t)=>e+t.counts.total),0)},gQ=e=>{if(e){const t=e.reduce(((e,t)=>{const n=t.classDetails.schoolGrades;return e.concat(n)}),[]);return[...new Set(t)]}},vQ=e=>{if(e)return e.reduce(((e,t)=>e<t.teachers.length?t.teachers.length:e),0)};class yQ extends o.Component{constructor(e){super(e),this.toggleTeacherPanel=()=>{this.setState({teacherPanelIsOpen:!this.state.teacherPanelIsOpen})},this.toggleCharacteristicResponseSort=()=>{this.setState((e=>({sortByCharacteristicResponses:!e.sortByCharacteristicResponses})))},this.componentDidUpdate=e=>{this.props.selectedTeacherId!==e.selectedTeacherId&&this.setState({selectedStudentId:""})},this.toggleSolverModal=()=>{sessionStorage.setItem(Yt,"true"),this.setState({})},this.toggleRunningSolverPrompt=()=>{this.setState((e=>({runningSolverPrompt:!e.runningSolverPrompt})))},this.toggleUnassignedTeacherPrompt=()=>{this.setState((e=>({unassignedTeacherPrompt:!e.unassignedTeacherPrompt})))},this.toggle=e=>()=>this.setState((t=>({[e]:!t[e]}))),this.clearSelectedStudent=()=>{this.props.updateSelectedStudent({variables:{id:"",firstName:"",lastName:"",friends:[],teacherConstraints:[],studentConstraints:[]}}),this.setState({errors:{},metricDifferences:{},highlightStudents:[],selectedStudentId:""})},this.clearStudentsToBeDragged=()=>{this.setState({studentsSelectedForDragging:[]})},this.onActiveGradeChange=e=>{const{updateSolverUndoRedo:t,updateSolverActiveGrade:n}=this.props;this.clearSelectedStudent(),this.clearStudentsToBeDragged(),t({variables:{type:Bt}}),n({variables:{activeGrade:parseInt(e,10)}})},this.onActiveCharacteristicChange=e=>{this.setState({activeCharacteristicId:e.target.value,metricDifferences:{},sortByCharacteristicResponses:!1})},this.getClass=e=>this.state.data.classes.find((t=>t.classDetails.id===e)),this.getClassByStudentId=e=>this.state.data.classes.find((t=>t.students.length>0&&t.students.find((t=>t.id===e)))),this.onErrorMove=e=>{aw(e),this.setState({updateClasses:!0,showLoadingOverlay:!1,data:NF(this.props.data),highlightStudents:[],errors:{move:"Failed to move student"}})},this.moveStudents=(e,t,n)=>{const{classes:r,activeGrade:o}=this.state.data;let i;const s={};for(const l of t){i||(i=n.students);const t=e.reduce(((e,t)=>{const n=l.students.findIndex((e=>e.id===t));return-1!==n?[...e,n]:e}),[]),r=_F(l.students,i,t);i=r.destClone,s[l.classDetails.id]=r.sourceClone}const a=r.map((e=>{const r=t.find((t=>e.classDetails.id===t.classDetails.id));return r?{...r,students:s[r.classDetails.id]}:e.classDetails.id===n.classDetails.id?(LS(o.id.toString(),i),{...n,students:i}):e}));this.setState({data:{...this.state.data,classes:a},highlightStudents:[...this.state.highlightStudents,...e],metricDifferences:{}})},this.onDragStart=({draggableId:e})=>{const t=this.state.data.classes.flatMap((({students:e})=>e)).find((({id:t})=>t===e));this.setState({draggedStudent:t}),this.clearSelectedStudent()},this.onDragEnd=e=>{const{moveStudentMutation:t,updateSolverUndoRedo:n,schoolSettings:r,settings:o}=this.props,{activeCharacteristicId:i,studentsSelectedForDragging:s}=this.state,{id:a,activeGrade:l}=this.state.data,{source:c,destination:u,draggableId:d}=e,h=uw(),p=this.props.assignmentsData[0];if(this.setState({isDropping:!0,draggedStudent:null}),u)if(c.droppableId===u.droppableId);else{this.setState({showLoadingOverlay:!0});const e=this.getClass(c.droppableId),f=0===s.length?[e]:s.reduce(((e,t)=>{const n=this.getClassByStudentId(t.id);return e.find((e=>e.classDetails===n.classDetails))?e:[...e,n]}),[]),m=this.getClass(u.droppableId);if(!f||!m)return;const g=(s.length>0?s.map((e=>({fromClassId:this.getClassByStudentId(e.id).classDetails.id,studentId:e.id,toClassId:m.classDetails.id}))):[{fromClassId:this.getClassByStudentId(d).classDetails.id,studentId:d,toClassId:m.classDetails.id}]).map((e=>({studentId:e.studentId,newClassId:e.toClassId}))),v={moveStudents:g,schoolId:h,solutionId:a,activeGradeId:l.id},y=g.map((e=>e.studentId)),b=[{query:ve,variables:{id:d,adminOnly:hQ(o)}},{query:ge,variables:{schoolId:h,ids:y,adminOnly:hQ(o)}},{query:Nw,variables:{adminOnly:hQ(o),schoolId:h}},{query:B,variables:{gradeId:l.id}}];this.moveStudents(y,f,m),t({variables:{moveStudentParamsList:v,adminOnly:hQ(o)},refetchQueries:b}).then((e=>{this.setState({showLoadingOverlay:!1,data:NF(e.data.moveStudent.solution),metricDifferences:xF(this.state.data.metrics,e.data.moveStudent.solution.metrics,r.maxFriends>0,r.avoidSameTeacher,i),errors:{lock:null,move:null}});const t={toAssignment:{id:p.id,movedStudents:p.movedStudents},fromAssignment:{id:e.data.moveStudent.solution.assignment.id,movedStudents:e.data.moveStudent.solution.assignment.movedStudents}};n({variables:{type:Dt,assignmentObject:t}})})).catch((e=>{this.onErrorMove(e)}))}},this.onLockStudent=(e,t,n)=>{e.stopPropagation();const{lockStudentMutation:r,refetchQueries:o}=this.props,{data:i}=this.state;r({variables:{lockParams:{studentId:t,lockState:n,solutionId:i.id}},refetchQueries:o}).then((()=>{this.updateLockedStudentIdsOptimization([t],n)})).catch((e=>{aw(e),this.setState({updateClasses:!0,errors:{lock:"Unable to lock student"}})}))},this.updateLockedStudentIdsOptimization=(e,t)=>{const n=this.state.data,r=n.lockedStudentIds,o=e.map((e=>parseInt(e,10)));let i=[];i=t?[...r,...o]:r.filter((e=>!o.includes(e))),this.setState({data:{...n,lockedStudentIds:Array.from(new Set(i))}})},this.solverRefetch=()=>{const{refetch:e,refetchAssignments:t,updateSolverUndoRedo:n}=this.props;this.setState({loading:!0}),e().then((e=>{const t=e.data.solution?e.data.solution:e.data.sharedSolution;"SolutionStatus"===t.__typename?this.setState({loading:!1}):this.setState({data:NF(t),loading:!1,unassignedTeacherPrompt:t.warnings&&t.warnings.classesWithoutTeachers})})).catch((e=>{const t=e.message.includes(gF)?{solverRun:vF}:{solverRun:"Network Error"};this.setState({data:pQ,loading:!1,errors:t})})),t().catch((()=>{n({variables:{type:Bt}})}))},this.onRunSolver=()=>{const{updateLastAssignment:e,assignmentsData:t}=this.props;this.setState({loadingModal:!0,loadingMessage:"Running Solver, please wait...",errors:{},highlightStudents:[],metricDifferences:{}}),this.clearSelectedStudent(),this.clearStudentsToBeDragged();const n=t&&t[0]&&t[0].id;n&&e({variables:{lastAssignmentCached:n}})},this.onSuccessfulSolver=e=>{const t=EF(e);this.setState({loadingModal:!1,loadingMessage:"",runningSolverPrompt:t,data:t?e:NF(e),highlightStudents:[]})},this.onErrorSolver=e=>{aw(e),e.message&&e.message.includes(gF)?this.setState({loadingModal:!1,loadingMessage:"",errors:{solverRun:vF}}):this.setState({loadingModal:!1,loadingMessage:"",updateClasses:!0,errors:{solverRun:"Network Error"}})},this.solveActiveGrade=()=>{const{solveActiveGradeMutation:e,activeGradeId:t,settings:n}=this.props,r=uw();let o={solution:{schoolId:r,gradeId:t},adminOnly:hQ(n)};const i=[{query:mg,variables:{schoolId:r}},{query:me,variables:{schoolId:r}},{query:TC,variables:{schoolId:r}},{query:B,variables:{gradeId:t}}];this.onRunSolver(),e({variables:o,refetchQueries:i}).then((e=>{this.onSuccessfulSolver(e.data.runSolveActiveGrade)})).catch((e=>{this.onErrorSolver(e)}))},this.pickAnAssignment=(e,t)=>{const{pickAnAssignmentMutation:n,updateSolverUndoRedo:r}=this.props,o=uw(),i=[{query:TC,variables:{schoolId:o}},{query:B,variables:{gradeId:t}}];let s={pickAssignmentParams:{assignmentId:e,solutionId:this.state.data.id}};this.setState({showLoadingOverlay:!0}),n({variables:s,refetchQueries:i}).then((e=>{this.props.refetch().then((t=>{const n=t.data.solution?t.data.solution:t.data.sharedSolution,o=NF(n),i={toAssignment:{id:this.props.assignmentsData[0].id,movedStudents:[]},fromAssignment:{id:e.data.pickAnAssignment.assignment.id,movedStudents:[]}};r({variables:{type:Dt,assignmentObject:i}}),this.setState({data:o,highlightStudents:[]})})).finally((()=>{this.setState({showLoadingOverlay:!1})}))}))},this.onSuccessfulAssignment=(e,t)=>{if(e.data&&e.data.assignmentWithClasses&&e.data.assignmentWithClasses.classes){const n=((e,t)=>{const n=(0,j.cloneDeep)(e),r=t.toString();return n.sort(((e,t)=>e.classDetails.label.localeCompare(t.classDetails.label))),n.map((e=>(LS(r,e.students),e)))})(e.data.assignmentWithClasses.classes,t);this.setState({classDataPreview:n})}},this.assignmentWithClasses=e=>{const{assignmentWithClassesMutation:t,activeGradeId:n,settings:r}=this.props;t({variables:{assignmentId:e,activeGradeId:n,adminOnly:hQ(r)},refetchQueries:[]}).then((e=>{this.onSuccessfulAssignment(e,n)}))},this.undoRedoMoveStudent=(e,t)=>{const{pickAnAssignmentMutation:n,schoolSettings:r,settings:o}=this.props,{activeCharacteristicId:i}=this.state,{id:s,activeGrade:a}=this.state.data,l=uw(),c=e.fromAssignment?e.fromAssignment.id:null;let u=[{query:B,variables:{gradeId:a.id}}];this.setState({showLoadingOverlay:!0}),u.push({query:Nw,variables:{adminOnly:hQ(o),schoolId:l}});n({variables:{pickAssignmentParams:{assignmentId:c,solutionId:s,type:t===Ft?"UNDO":"REDO"}},refetchQueries:u}).then((()=>{this.props.refetch().then((e=>{const t=e.data.solution?e.data.solution:e.data.sharedSolution,n=NF(t);this.setState({data:n,metricDifferences:xF(this.state.data.metrics,n.metrics,r.maxFriends>0,r.avoidSameTeacher,i)})})).finally((()=>{const n=e.toAssignment?e.toAssignment.movedStudents:null,r=e.fromAssignment?e.fromAssignment.movedStudents:null,o=t===Ft?n:r,i=o?o.map((({student:e})=>e.id)):[];this.setState({showLoadingOverlay:!1,highlightStudents:i})}))}))},this.onUndoRedoClick=e=>{const{updateSolverUndoRedo:t}=this.props;this.clearSelectedStudent(),this.clearStudentsToBeDragged();t({variables:{type:e}}).then((t=>{this.undoRedoMoveStudent(t.data.updateSolverUndoRedo.assignmentObject,e)}))},this.onRunBoost=e=>{this.setState({loadingMessage:"Running Boost, please wait...",loadingModal:!0,highlightStudents:[]}),e&&(this.clearSelectedStudent(),this.clearStudentsToBeDragged())},this.onSuccessfulBoost=e=>{const{updateSolverUndoRedo:t,schoolSettings:n,assignmentsData:r}=this.props;this.setState({loadingMessage:"",loadingModal:!1});const o=r[0],i=NF(e.solution);if(su(e.new)){this.setState({data:i,highlightStudents:[kF(e.new.student1),kF(e.new.student2)],metricDifferences:wF(e,n.maxFriends>0,n.avoidSameTeacher)});const r=o?{id:o.id,movedStudents:o.movedStudents}:null,s=e.solution.assignment?{id:e.solution.assignment.id,movedStudents:e.solution.assignment.movedStudents}:null;t({variables:{type:Dt,assignmentObject:{toAssignment:r,fromAssignment:s}}})}else this.setState({data:i,boostModal:!0})},this.onBoostError=e=>{aw(e),this.setState({loadingMessage:"",showLoadingOverlay:!1,errors:{boost:"Network error running boost, please try again."}})},this.repeatBoost=async(e,t)=>{for(const n of Array(t)){if(this.state.boostModal)break;await e()}},this.maybeMultipleBoostClick=e=>{const{user:t}=this.props;return(n,r)=>{if(t&&cS(t.role)&&n.metaKey&&n.shiftKey){const t=()=>e(r);this.repeatBoost(t,10)}else e(r)}},this.onBoostCharacteristicClick=e=>{const{boostCharacteristicMutation:t,settings:n,friendPreferences:r,schoolSettings:o}=this.props,{data:{id:i,activeGrade:s}}=this.state;this.onRunBoost(!0);return t({variables:{boostCharacteristicParams:{activeGradeId:s.id,characteristicId:e,solutionId:i},adminOnly:hQ(n)},refetchQueries:[{query:B,variables:{gradeId:s.id}}]}).then((t=>{this.onSuccessfulBoost(t.data.boostCharacteristicMetric),this.setState({metricDifferences:{...wF(t.data.boostCharacteristicMetric,r,o.avoidSameTeacher),...this.state.metricDifferences,activeCharacteristic:CF(t.data.boostCharacteristicMetric,e)}})})).catch((e=>{this.onBoostError(e)}))},this.onBoostSolutionMetricClick=e=>{const{boostSolutionMetricMutation:t,settings:n}=this.props,{data:{id:r,activeGrade:o}}=this.state;this.onRunBoost(!0);return t({variables:{boostSolutionParams:{activeGradeId:o.id,metric:e,solutionId:r},adminOnly:hQ(n)},refetchQueries:[{query:B,variables:{gradeId:o.id}}]}).then((e=>{this.onSuccessfulBoost(e.data.boostSolutionMetric)})).catch((e=>{this.onBoostError(e)}))},this.onBoostStudentMetricClick=e=>{const{boostStudentMetricMutation:t,settings:n,selectedStudent:{studentId:r},friendPreferences:o,schoolSettings:i}=this.props,{data:{id:s,activeGrade:a}}=this.state;this.onRunBoost(!1);const l={boostStudentParams:{activeGradeId:a.id,metric:e,solutionId:s,studentId:r},adminOnly:hQ(n)},c=this.state.data.studentMetrics.find((e=>e.student.id===r));return t({variables:l,refetchQueries:[{query:B,variables:{gradeId:a.id}}]}).then((e=>{this.onSuccessfulBoost(e.data.boostStudentMetric),this.setState({metricDifferences:{...wF(e.data.boostStudentMetric,o,i.avoidSameTeacher),student:jF(e.data.boostStudentMetric,r,c,o)}})})).catch((e=>{this.onBoostError(e)}))},this.csvExport=async()=>{const{data:e}=this.state,t=e?e.id:0,{user:n,settings:r}=this.props,o=await this.context.getTokenSilently(),i=uw(),s=n.role;if(!i||!s||!o)return;const a=`${_s()}/export_solution_data/${i}/${t}?filter_sensitive=${r.adminOnlyRequests?"false":"true"}`,l=await $w(o,a);if(!l.ok){const e=await l.text();aw({message:e}),this.setState({errors:{export:"Network error attempting to export"}})}},this.sharedSolutionCsvExport=async e=>{const t=sessionStorage.getItem(Vt),n=`${_s()}/export/shared_solution/${e}`,r=await $w(t,n);if(!r.ok){const e=await r.text();aw({message:e}),this.setState({errors:{export:"Network error attempting to export"}})}},this.onStudentClick=(e,t,n)=>{this.setState({highlightStudents:[],metricDifferences:{}});const r=this.state.data.classes.flatMap((({students:e})=>e)),o=r.find((e=>e.id===t)),i=this.state.data.lockedStudentIds,s=!!su(i)&&i.includes(parseInt(t,10)),a=e.shiftKey;if(a&&s);else if(a&&!s){this.clearSelectedStudent();const e=[...this.state.studentsSelectedForDragging];let n;if(e.filter((e=>e.id===t)).length>0){n=e.filter((e=>e.id!==t))}else{n=[...e,o]}const i=this.props.selectedStudent.studentId;if(""!==i){const e=r.find((e=>i===e.id));n.push(e)}n.sort(((e,t)=>{const n=r.findIndex((t=>e===t)),o=r.findIndex((e=>t===e));return n-o})),this.setState({studentsSelectedForDragging:n})}else n?this.clearSelectedStudent():this.setState({selectedStudentId:t}),this.setState({studentsSelectedForDragging:[]})},this.hasSolution=()=>{const{data:e}=this.state;if(!e||EF(e))return!1;return 0!==e.classes.map((e=>e.students)).flat().length},this.hasActiveSolution=()=>this.hasSolution()&&this.state.data.classes.some((e=>0!==e.counts.total)),this.toggleStep3Video=()=>{this.setState((e=>({...e,showStep3Video:!e.showStep3Video})))},this.allowedInClass=(e,t)=>!e||t.schoolGrades.some((t=>t.id===e.newGrade.id));let t=this.props.data;su(t)&&!EF(t)&&(t=su(ou(this.props,"data.activeGrade"))&&su(ou(this.props,"data.classes"))?NF(t):{...t,classes:t.classes.map((e=>{return{...e,students:(t=e.students,(0,j.sortBy)(t,["lastName","firstName"]))};var t}))});this.state={loading:!1,loadingModal:!1,loadingMessage:"",showLoadingOverlay:!1,errors:{},panelOpen:!0,teacherPanelIsOpen:!1,boostModal:!1,data:t,coldStartModal:!1,highlightStudents:[],updateClasses:!1,activeCharacteristicId:"",shareSolutionModal:!1,selectedStudentId:"",runningSolverPrompt:!1,unassignedTeacherPrompt:(e=>!!(e&&e.warnings&&e.warnings.classesWithoutTeachers)&&e.warnings.classesWithoutTeachers)(t),showStep3Video:!1,draggedStudent:null,studentsSelectedForDragging:[],sortByCharacteristicResponses:!1,classDataPreview:null,classesToShow:[]}}render(){const{undoMoves:e=[],redoMoves:t=[],selectedStudent:n,refetchQueries:r,adminMode:o,schoolSettings:i,solverGrades:s,updateSelectedTeacherId:a,updateSelectedStudent:l,updateStudentEditFlag:c,selectedTeacherId:u,studentFlags:d,solverMode:h,showTeachers:p,showTeacherRequests:f,showStudentRequests:m,showMetrics:g,showCharacteristics:v,showFriendships:y,schoolCharacteristics:b,activeCurrentClasses:x,gettextObj:w,location:S,favouriteAnAssignmentMutation:C,unfavouriteAnAssignmentMutation:j,updateFavouritedAssignmentMutation:_,lastAssignmentCached:k,updateLastAssignment:N,updateSolverUndoRedo:E,assignmentsData:T,favouritesData:O}=this.props,{data:I=pQ,metricDifferences:R={},panelOpen:A,teacherPanelIsOpen:M,highlightStudents:P,boostModal:D,shareSolutionModal:F,activeCharacteristicId:L,loading:B,loadingMessage:U,loadingModal:G,showLoadingOverlay:$,errors:q,selectedStudentId:z,runningSolverPrompt:V,unassignedTeacherPrompt:H,showStep3Video:W,draggedStudent:Y,studentsSelectedForDragging:Q,sortByCharacteristicResponses:J,classDataPreview:K}=this.state,X=(!this.props.loadingNotifications&&this.props.getNotifications?this.props.getNotifications:[]).find((e=>"UNALLOCATED_STUDENTS"===e.notificationId));if(B)return(0,pr.jsx)(qk,{});const Z=EF(I),ee=T&&T[0]&&T[0].id,te=T&&T[0]&&T[0].assignmentType;if(k&&k!==ee){if(T.length>=2&&"SOLVE"===te){const e=T[0],t={toAssignment:{id:T[1].id,movedStudents:[]},fromAssignment:{id:e.id,movedStudents:[]}};E({variables:{type:Dt,assignmentObject:t}})}N({variables:{lastAssignmentCached:null}})}const ne=Z?[]:I.classes.flatMap((({students:e})=>e)),re=ne.reduce(((e,t)=>{if(t.currentClass){const n=t.currentClass,r=e[n.id]?e[n.id].studentCount:0;return{...e,[n.id]:{...n,studentCount:r+1}}}return e}),{}),oe=Object.values(re),{classes:ie,lockedStudentIds:se}=I,ae=K||ie,le={minWidth:"220px",maxWidth:"220px"};let ce={id:L};const ue=ou(this.state.data,"metrics.characteristicScores.characteristicMetrics");ue&&""!==L&&(ce=ue.find((e=>e.characteristic.id.toString()===L.toString()))||{id:L});const de=A?"":"c-solver__classes-container--expand",he=r.concat([{query:TC,variables:{schoolId:uw()}}]),pe=ne.some((e=>"X"===e.gender)),fe=fQ(ie),me=!!ie&&(e=>e.some((({classDetails:e})=>pw(e.entryCriteriaStudentAttribute)||pw(e.entryCriteriaCharacteristicResponse)||pw(e.entryCriteriaNullResponse))))(ie);return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"u-row-fix",children:X&&(0,pr.jsx)(HQ,{notification:X})}),(0,pr.jsx)(_Y,{onDragStart:this.onDragStart,onDragEnd:this.onDragEnd,children:(0,pr.jsxs)("div",{className:"c-solver u-row-fix u-layout-component-grow "+(o?"bg-admin":""),children:[$&&(0,pr.jsx)("div",{className:"c-solver__overlay",children:(0,pr.jsx)(qk,{})}),(0,pr.jsx)(UQ,{isOpen:A,togglePanel:this.toggle("panelOpen"),undoMoves:e,redoMoves:t,metrics:ou(this.state,"data.metrics"),studentMetrics:ou(this.state,"data.studentMetrics"),activeGradeCount:mQ(I.classes)||0,gradesForSolution:gQ(I.classes)||[],adminMode:o,errors:q,schoolSettings:i,metricDifferences:R,selectedStudentId:z,refetchQueries:he,solverGrades:s,solverRefetch:this.solverRefetch,csvExport:this.csvExport,sharedSolutionCsvExport:this.sharedSolutionCsvExport,shareSolution:this.toggle("shareSolutionModal"),onActiveGradeChange:this.onActiveGradeChange,activeGradeId:this.props.activeGradeId,activeCharacteristic:ce,studentFlags:d,updateStudentEditFlag:c,solveActiveGrade:this.solveActiveGrade,onActiveCharacteristicChange:this.onActiveCharacteristicChange,updateSelectedStudent:l,onUndoRedoClick:this.onUndoRedoClick,asyncSolveInProgress:Z,onBoostSolutionMetricClick:this.maybeMultipleBoostClick(this.onBoostSolutionMetricClick),onBoostCharacteristicClick:this.maybeMultipleBoostClick(this.onBoostCharacteristicClick),onBoostStudentMetricClick:this.maybeMultipleBoostClick(this.onBoostStudentMetricClick),solverMode:h,hasSolution:this.hasActiveSolution(),showMetrics:g,showCharacteristics:v,showTeacherRequests:f,showStudentRequests:m,showFriendships:y,currentClasses:x,hasAsyncSolveInProgress:Z,clearSelectedStudent:this.clearSelectedStudent,solutionSuggestions:I.suggestions,unassignedTeacherPrompt:H,toggleCharacteristicResponseSort:this.toggleCharacteristicResponseSort,showClassEntryCriteria:me,location:S,assignments:T,favourites:O,favouriteAnAssignmentMutation:C,unfavouriteAnAssignmentMutation:j,updateFavouritedAssignmentMutation:_,pickAnAssignment:this.pickAnAssignment,assignmentWithClasses:this.assignmentWithClasses,user:this.props.user}),Z?(0,pr.jsx)("div",{className:`c-solver__classes-container container-fluid ${de}`,children:(0,pr.jsx)(_Q,{solverRefetch:this.solverRefetch})}):this.hasSolution()?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:`c-solver__classes-container ${de} d-print-none`,children:su(ae)&&ae.map(((e,t)=>{const o=!this.allowedInClass(Y,e.classDetails);return(0,pr.jsx)($Q,{classStyle:le,clearSelectedStudent:this.clearSelectedStudent,clearStudentsToBeDragged:this.clearStudentsToBeDragged,onStudentClick:this.onStudentClick,studentMetrics:ou(this.state,"data.studentMetrics"),maxTeacherPerClass:vQ(I.classes)||0,schoolSettings:i,lockedStudentIds:se,selectedStudent:n,highlightStudents:P,draggedStudent:Y,studentsSelectedForDragging:Q,classData:e,onLockStudent:this.onLockStudent,updateLockedStudentIdsOptimization:this.updateLockedStudentIdsOptimization,lockStudentsMutation:this.props.lockStudentsMutation,solutionId:I.id,refetch:this.solverRefetch,refetchQueries:r,activeGrade:ou(I,"activeGrade.id"),activeCharacteristic:ce,updateSelectedTeacherId:a,selectedTeacherId:u,solverMode:h,showTeachers:p,showTeacherRequests:f,showStudentRequests:m,showFriendships:y,currentClasses:oe,schoolCharacteristics:b,activeCurrentClasses:x,hasGenderX:pe,isDropDisabled:o,sortByCharacteristicResponses:J,hasMax:fe,showClassEntryCriteria:me,toggleTeacherPanel:this.toggleTeacherPanel,teacherPanelIsOpen:M},t)}))}),(0,pr.jsx)(CQ,{solution:I,showTeachers:p,hasGenderX:pe})]}):h===N$?(0,pr.jsx)("div",{className:`c-solver__classes-container container-fluid ${de}`,children:(0,pr.jsx)(v$,{buttonClick:this.solveActiveGrade})}):(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid align-items-center justify-content-center h4",children:"The solver has not been run for this grade yet. Please contact your school administrator."}),h===N$&&(0,pr.jsxs)(pr.Fragment,{children:[F&&(0,pr.jsx)(PQ,{schoolId:uw(),toggle:this.toggle("shareSolutionModal"),user:this.props.user,allowWritableSharedSolutions:i.allowWritableSharedSolutions}),V&&(0,pr.jsx)(kQ,{toggle:this.toggleRunningSolverPrompt}),null===sessionStorage.getItem(Yt)&&(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:this.toggleSolverModal,toggle:this.toggleSolverModal,heading:"Solver Page Notice",text:`Two or more Administrators can make changes to ${w.gettext("class")} lists at the same time as long as they are not working on the same ${w.gettext("grade (or mixed/composite grade)")}.`,buttonText:"Dismiss",showCancel:!1})]}),D&&(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:this.toggle("boostModal"),toggle:this.toggle("boostModal"),heading:"Boost: No Improvements Found",text:(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("p",{children:"Consider trying the following:"}),(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"1) Student Boost:"})," Clicking on the impacted student and selecting a Boost option at the bottom left section of the Control Panel."]}),(0,pr.jsxs)("p",{children:[(0,pr.jsx)("b",{children:"2) Manual Move:"})," Moving a student (or students) then using the Lock & Boost functions to correct any issues."]}),(0,pr.jsxs)("p",{children:["Learn more in the Fixing Issues section of the"," ",(0,pr.jsx)("a",{className:"color-blue-mid",onClick:this.toggleStep3Video,children:"Step 3 Video"})]})]}),buttonText:"Dismiss",showCancel:!1}),W&&(0,pr.jsx)(vN,{toggle:this.toggleStep3Video,videoUrl:XS,title:"Instruction Step 3"}),G&&(0,pr.jsx)(zk,{isOpen:!0,toggle:this.toggle("loadingModal"),heading:U,loading:""!==U,text:U.includes("Boost")?"Any changes to your lists will be highlighted after Boost is completed.":"",error:q.boost})]})})]})}}yQ.contextType=tu;const bQ=e=>{const{activeGradeId:t}=e,n={gradeId:t},{data:r,loading:i,error:s,refetch:a}=Gm(B,{variables:n,fetchPolicy:"network-only"}),{data:l,loading:c,error:u}=Gm(U,{variables:n,fetchPolicy:"network-only"}),d=ml(),h=o.useContext(Cw).gettextObj;return i||c?(0,pr.jsx)(qk,{}):(0,pr.jsx)(yQ,{location:d,gettextObj:h,assignmentsData:s?[]:ou(r,"assignmentsForGradeId"),favouritesData:u?[]:ou(l,"favouritedAssignmentsForGradeId"),refetchAssignments:a,...e})},xQ=e=>{const t=ml(),n=o.useContext(Cw).gettextObj;return(0,pr.jsx)(yQ,{location:t,gettextObj:n,assignmentsData:[],favouritesData:[],refetchAssignments:()=>null,...e})},wQ=e=>{const{solverMode:t}=e;return t!==E$?(0,pr.jsx)(bQ,{...e}):(0,pr.jsx)(xQ,{...e})},SQ=({class:e,activeGrade:t,showTeachers:n,hasMax:r,hasGenderX:o})=>{const i=e.students.slice().sort(((e,n)=>e.newGrade.id===n.newGrade.id?0:e.newGrade.id===t.id?-1:n.newGrade.id===t.id?1:e.newGrade.order-n.newGrade.order));return(0,pr.jsxs)(z$,{className:"printable-solver-table",children:[(0,pr.jsx)("thead",{children:(0,pr.jsx)("tr",{children:(0,pr.jsxs)("th",{className:"table-header",children:[(0,pr.jsx)(V$,{students:i,classData:e,isPrint:!0,activeGradeId:t.id,hasMax:r,hasGenderX:o}),n&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"table-header-cell",children:e.teachers[0]?Uh(e.teachers[0]):""}),(0,pr.jsx)("div",{className:"table-header-cell",children:e.teachers[1]?Uh(e.teachers[1]):""})]})]})})}),(0,pr.jsx)("tbody",{children:i.map(((e,t)=>{const n=IC(e.gender);return(0,pr.jsx)("tr",{children:(0,pr.jsxs)("td",{className:`table-cell ${n}`,children:[(0,pr.jsx)("span",{className:"float-left",children:Uh(e)}),(0,pr.jsx)("span",{className:"float-right",children:e.newGrade.code})]})},t)}))})]})},CQ=({solution:{classes:e,activeGrade:t},showTeachers:n,hasGenderX:r})=>{const o=((e,t)=>{const n=[];let r=0;for(;r<e.length;)n.push(e.slice(r,t+r)),r+=t;return n})(e,6),i=fQ(e);return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"float-none",children:o.map(((e,o)=>(0,pr.jsx)("div",{className:"printable-solver-page",children:e.map(((e,o)=>(0,pr.jsx)(SQ,{class:e,activeGrade:t,showTeachers:n,hasMax:i,hasGenderX:r},o)))},o)))}),e.map(((e,o)=>(0,pr.jsx)("div",{className:"printable-solver-page",children:(0,pr.jsx)(SQ,{class:e,activeGrade:t,showTeachers:n,hasMax:i,hasGenderX:r})},o)))]})};const jQ=n.p+"static/media/solver-clock-icon.ef865faf94e8d523c95b88cb11da4b4e.svg",_Q=({solverRefetch:e})=>(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"flex-column text-center",children:[(0,pr.jsx)("img",{src:jQ,alt:"Solver Clock Icon"}),(0,pr.jsx)("div",{children:"\xa0"}),(0,pr.jsx)("h1",{className:"mt-3",children:"Currently solving classes for this grade"}),(0,pr.jsxs)("p",{className:"pt-2 font-size-16",children:["The administrator who began the process will receive an ",(0,pr.jsx)("b",{children:"email"})," ","when it is ready (normally within 2 hours)"]}),(0,pr.jsx)(ld,{color:"primary",onClick:e,children:"Refresh page"})]})}),kQ=({toggle:e})=>(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:"Running Solver",toggle:e}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center mt-3",children:[(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"text-primary mb-3",children:"IMPORTANT NOTICE"}),(0,pr.jsxs)("div",{className:"mb-3",children:["We are running the Solver for this grade and will ",(0,pr.jsx)("b",{children:"email"})," you when it is ready (normally less than 2 hours)."]}),(0,pr.jsxs)("div",{children:["You can continue to use the program. Please avoid making any changes to ",(0,pr.jsx)("b",{children:"this grade"})," while this process is underway."]})]})]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:e,children:"Ok, got it!"})]})]})});class NQ extends o.Component{constructor(e){super(e),this.commentsRef=null,this.setCommentsRef=e=>{this.commentsRef=e},this.state={commentExpanded:!1,commentOverflowed:!1}}componentDidUpdate(){const e=this.isEllipsisActive(this.commentsRef);e!==this.state.commentOverflowed&&this.updateCommentOverflowed(e)}UNSAFE_componentWillReceiveProps(e){const{updateSelectedStudent:t}=e;if(this.props.id!==e.id||this.props.friends!==e.friends){const{id:n,firstName:r,lastName:o,friends:i,teacherConstraints:s,studentConstraints:a}=e;t({variables:{id:n,firstName:r,lastName:o,friends:i,teacherConstraints:s,studentConstraints:a}})}}componentDidMount(){if(this.props.id){const{updateSelectedStudent:e,id:t,firstName:n,lastName:r,friends:o,teacherConstraints:i,studentConstraints:s}=this.props;this.updateCommentOverflowed(this.isEllipsisActive(this.commentsRef)),e({variables:{id:t,firstName:n,lastName:r,friends:o,teacherConstraints:i,studentConstraints:s}})}}updateCommentOverflowed(e){this.setState({commentOverflowed:e})}isEllipsisActive(e){return!!e&&(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}render(){const{id:e,toggle:t,firstName:n,lastName:r,gender:o,currentClass:i,comments:s,characteristicResponses:a,studentMetrics:l,onBoostStudentMetricClick:c,studentBoostDifferences:u={},friendPreferences:d,differentTeacherSetting:h,solverMode:p,showTeacherRequests:f,showStudentRequests:m,showCharacteristics:g,showClassEntryCriteria:v}=this.props,{commentExpanded:y,commentOverflowed:b}=this.state,x=p===N$||p===T$,w=[...a].sort(((e,t)=>e.characteristic.priority-t.characteristic.priority));return(0,pr.jsxs)("div",{className:"c-selected-student-details",children:[(0,pr.jsxs)("div",{className:"d-flex flex-column border-bottom py-3",children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,pr.jsxs)("div",{className:`c-selected-student-details__student-overview w-75 text-truncate ${IC(o)}`,children:[t&&(0,pr.jsx)("i",{className:"c-selected-student-details__student-overview__icon fa fa-external-link-alt cursor-pointer",onClick:t,children:"\uf08e"}),(0,pr.jsx)("span",{className:"c-selected-student-details__student-overview__name",children:`${n} ${r}`})]}),(0,pr.jsx)(gm,{label:ou(i,"label")})]}),g&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{"data-tooltip-id":`selected-student-${e}`,className:"c-selected-student-details__characteristics d-flex mt-2",children:w&&w.map(((e,t)=>(0,pr.jsx)(h$,{...e},t)))}),(0,pr.jsx)(p$,{id:`selected-student-${e}`,characteristicResponses:w,className:"c-characteristic-tooltip p-0",place:"right",variant:"light",float:!0})]}),s&&(0,pr.jsxs)("div",{className:"d-flex mt-2",children:[(0,pr.jsx)("div",{ref:this.setCommentsRef,className:"c-selected-student-details__student-overview__comments-"+(y?"expanded":"collapsed"),children:s}),(b||y)&&(0,pr.jsx)("i",{className:"ml-2 color-grey-mid fa "+(y?"fa-chevron-up":"fa-chevron-down"),onClick:()=>{this.setState((e=>({commentExpanded:!e.commentExpanded})))}})]})]}),(m||f)&&l&&(0,pr.jsxs)("div",{children:[(0,pr.jsx)(d$,{label:"Friendship Preferences",icon:"_badge bg-friendships mr-1",className:"mt-4",showMetric:x,disabled:l.friendshipPreferences.count===l.friendshipPreferences.total||!d,count:d?l.friendshipPreferences.count:"-",total:d?l.friendshipPreferences.total:"-",onClick:x&&(e=>{c(e,"FRIENDSHIP_PREFERENCES")}),difference:u.friendshipPreferences}),(0,pr.jsx)(d$,{label:"Mandatory Requests",icon:"_badge bg-requests-mandatory mr-1",className:"mt-4",count:l.mandatoryRequests.count,total:l.mandatoryRequests.total,showMetric:x,onClick:x&&(e=>{c(e,x$)}),difference:u.mandatoryRequests}),(0,pr.jsx)(d$,{label:"Important Requests",icon:"_badge bg-requests-important mr-1",className:"mt-4",count:l.importantRequests.count,total:l.importantRequests.total,showMetric:x,onClick:x&&(e=>{c(e,w$)}),difference:u.importantRequests}),v&&(0,pr.jsx)(d$,{label:"Class Entry Criteria",icon:"_badge bg-class-entry-criteria mr-1",className:"mt-4",count:l.classEntryCriteria,showMetric:x,onClick:x&&(e=>{c(e,C$)})}),x&&(0,pr.jsx)(d$,{label:"Different Teacher",icon:"_badge bg-requests-teacher mr-1",className:"mt-4",count:l.differentTeacher,showMetric:x,onClick:x&&(e=>{c(e,S$)}),disabled:!h,differentTeacher:u.differentTeacher})]})]})}}const EQ=({onDeleteRowClick:e,isDisabled:t,firstColumnProps:n={options:[],onChange:()=>{},value:[],styles:{}},secondColumnProps:r={options:[],onChange:()=>{},value:[],styles:{}}})=>(0,pr.jsxs)("div",{className:"row py-2",children:[(0,pr.jsx)("div",{className:"col-1",children:(0,pr.jsx)("i",{className:"fa fa-trash c-classes__delete-icon",onClick:e})}),(0,pr.jsx)("div",{className:"col-5",children:(0,pr.jsx)(Xx,{options:n.options,onChange:n.onChange,value:n.value,isMulti:!0,styles:n.styles,closeMenuOnSelect:!1})}),(0,pr.jsx)("div",{className:"col-6",children:(0,pr.jsx)(Xx,{options:r.options,onChange:r.onChange,value:r.value,isMulti:!0,styles:r.styles,closeMenuOnSelect:!1,isDisabled:t})})]}),TQ=e=>/.+example.com$/.test(e),OQ=(e,t)=>TQ(e)||null!==t&&!((e,t)=>new RegExp(t).test(e))(e,t),IQ={...fN,multiValue:(e,{data:t,theme:{colors:n}})=>TQ(t.email)?{...e,backgroundColor:n.dangerLight,border:`0.5px solid ${n.danger}`}:{...e,backgroundColor:n.primary25,border:`0.5px solid ${n.primary50}`}},RQ=({assignments:e=[],assignmentsToSelect:t,teacherWithSharedSolutionToEdit:n,availableGradesOrClasses:r,availableTeachers:i,onAssignmentsChange:s,shareType:a})=>{const l=e=>()=>{const n=[...t];n.splice(e,1),s(n)},c=e=>n=>{const r=[...t],o={...r[e],gradesOrClasses:n||[]};r.splice(e,1,o),s(r)},u=e=>n=>{const r=[...t],o={...r[e],teachers:n||[]};r.splice(e,1,o),s(r)},d=r.map((({id:e,label:t,defaultTeachers:n})=>({value:e,label:t,defaultTeachers:n}))),h=i.map((e=>({value:e.id,label:`${e.firstName} ${e.lastName}`,email:e.email}))),p=o.useContext(Cw).gettextObj;return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsx)("div",{className:"shared-solutions-menu__heading col-1"}),(0,pr.jsx)("div",{className:"shared-solutions-menu__heading col-5",children:a===_$?p.gettext("Grade/s"):p.gettext("Class/es")}),(0,pr.jsx)("div",{className:"shared-solutions-menu__heading col-6",children:"Teacher/s"})]}),t.map(((e,r)=>{const o={options:d,onChange:c(r),value:e.gradesOrClasses||[],styles:fN},i={options:h,onChange:u(r),value:n?t[0].teachers:e.teachers||[],styles:IQ};return(0,pr.jsx)(EQ,{onDeleteRowClick:l(r),firstColumnProps:o,secondColumnProps:i,isDisabled:!!n},r)})),(0,pr.jsx)(Lh,{text:`Add ${a===_$?p.gettext("Grade"):p.gettext("Class")}`,onClick:()=>s([...e,j$])})]})},AQ={showTeachers:"View Assigned Teachers",showTeacherRequests:"View Teacher Requests",showStudentRequests:"View Student Requests",showFriendships:"View Friendships",showCharacteristics:"View Characteristics",writable:"Move Students"},MQ=({message:e,setMessage:t,shareOptions:n,setShareOptions:r,onShareClick:i,shareErrorMessage:s,unshareErrorMessage:a,toggle:l,assignmentsToSelect:c,setAssignmentsToSelect:u,shareType:d,setShareType:h,shareMode:p,setShareMode:f,defaultAssignments:m,availableClasses:g,availableGrades:v,availableTeachers:y,allowWritableSharedSolutions:b,teacherWithSharedSolutionToEdit:x})=>{const w=c.flatMap((({teachers:e})=>e)).some((e=>TQ(e.email))),S=c.filter((e=>!iu(j$,e))),C=0===S.length||S.some((({gradesOrClasses:e,teachers:t})=>0===e.length||0===t.length))||w,j=e=>({value:e.id,label:`${e.firstName} ${e.lastName}`,email:e.email}),_=e=>({value:e.id,label:e.label,defaultTeachers:e.defaultTeachers}),k=({id:e,label:t,defaultTeachers:n})=>({value:e,label:t,defaultTeachers:n}),N=(e,t)=>{if(x)return t;const n=t.gradesOrClasses.filter((t=>!e.gradesOrClasses.some((e=>e.value===t.value)))).flatMap((({defaultTeachers:e})=>(e||[]).map(j))),r=(o=t.teachers||[],i=n,o.concat(i).reduce(((e,t)=>e.some((e=>e.value===t.value))?e:[...e,t]),[]));var o,i;return{...t,teachers:r}},E=x?[{value:x.id,label:`${x.firstName} ${x.lastName}`,email:x.email}]:[],T=b&&n.writable,O=o.useContext(Cw).gettextObj,I=x?`ALLOW ${x.firstName.toUpperCase()} ${x.lastName.toUpperCase()} TO`:"ALLOW TEACHERS TO";return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)(Qg,{className:"c-teachers-invite-modal__text pb-2",children:"MESSAGE"}),(0,pr.jsx)(Zg,{type:"textarea",className:"c-teachers-invite-modal__message",name:"message",value:e,rows:5,onChange:e=>{t(e.target.value)}})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsx)("legend",{className:"c-teachers-invite-modal__text pb-2",children:I}),(0,pr.jsx)("div",{className:"d-flex",children:Object.entries(n).map((([e,t])=>{const o="writable"!==e||b?AQ[e]:null;return o?(0,pr.jsx)("div",{className:"mx-4",children:(0,pr.jsxs)(Qg,{check:!0,children:[(0,pr.jsx)(Zg,{type:"checkbox",checked:t,disabled:!["writable","showTeachers"].includes(e)&&T,onChange:()=>{r({...n,[e]:!t})}}),o]})},e):null}))})]}),(0,pr.jsxs)(Gg,{children:[(0,pr.jsxs)(Qg,{className:"c-teachers-invite-modal__text pb-2",children:["SHARE ",O.gettext("CLASSES")," OR"," ",O.gettext("GRADES")]}),(0,pr.jsx)("div",{className:"py-3",children:(0,pr.jsxs)(av,{children:[(0,pr.jsxs)(ld,{className:"btn-mid",active:1===p,onClick:()=>{u(m),h(_$),f(1)},children:["Share ",O.gettext("Grade")]}),(0,pr.jsxs)(ld,{className:"btn-mid",active:2===p,onClick:()=>{(()=>{const e=v.map((e=>N(j$,{gradesOrClasses:[_(e)],teachers:E})));u(e)})(),h(_$),f(2)},children:["Share All ",O.gettext("Grades")]}),(0,pr.jsxs)(ld,{className:"btn-mid",active:3===p,disabled:T,onClick:()=>{u(m),h(k$),f(3)},children:["Share ",O.gettext("Class")]}),(0,pr.jsxs)(ld,{className:"btn-mid",active:4===p,disabled:T,onClick:()=>{(()=>{const e=g.map((e=>N(j$,{gradesOrClasses:[k(e)],teachers:E})));u(e)})(),h(k$),f(4)},children:["Share All ",O.gettext("Classes")]})]})}),(0,pr.jsx)(RQ,{assignments:1===p||3===p?c:[],assignmentsToSelect:c,setAssignmentsToSelect:u,teacherWithSharedSolutionToEdit:x,availableGradesOrClasses:d===_$?v:g,availableTeachers:y,onAssignmentsChange:e=>{if(e.length>c.length){const t=e.slice(c.length);u(c.concat(t.map((e=>N(j$,e)))))}else e.length<c.length?u(e):u(e.map(((e,t)=>N(c[t],e))))},shareType:d})]}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-end mt-3",children:[(0,pr.jsx)(Ef,{disabled:C,cancelText:"Close",onCancelClick:l,onButtonClick:i(d),buttonText:"Share Lists"}),w&&(0,pr.jsx)($k,{text:"One or more teachers do not have a real email"}),s&&(0,pr.jsx)($k,{text:s}),a&&(0,pr.jsx)($k,{text:a})]})]})},PQ=({toggle:e,schoolId:t,user:n,allowWritableSharedSolutions:r})=>{const{data:o,loading:i}=Gm(de,{variables:{schoolId:t},fetchPolicy:"network-only"}),{data:s,loading:a}=Gm(rg,{variables:{schoolId:t},fetchPolicy:"network-only"}),{data:l,loading:c}=Gm(ee,{variables:{schoolId:t}}),{data:u,loading:d}=Gm(mg,{variables:{schoolId:t}}),h=[{query:de,variables:{schoolId:t}}],[p,{error:f}]=Km(he,{refetchQueries:h,onError:()=>{}}),[m,{error:g}]=Km(pe,{refetchQueries:h,onError:()=>{}}),[v,{error:y}]=Km(I,{refetchQueries:h,onError:()=>{}});if(i||a||d||c)return(0,pr.jsx)(qk,{});const b=l.allGradesWithNewClasses.map((e=>{const t=e.newClasses.flatMap((e=>e.teachers));return{...e,defaultTeachers:t}})),x=u.newClasses.map((e=>({...e,defaultTeachers:e.teachers})));return(0,pr.jsx)(LQ,{teachers:s.teachers,teachersWithSharedSolutions:o.teachersWithSharedSolutions,shareSolution:p,unshareSolution:m,toggle:e,schoolId:t,user:n,availableGrades:b,availableClasses:x,shareError:f,unshareError:g,requestNewToken:v,requestNewTokenError:y,allowWritableSharedSolutions:r})},DQ=(e,t)=>{const n={value:e.id,label:`${e.firstName} ${e.lastName}`,email:e.email},r=e.sharedSolutionToken,o=r.grades.map((e=>({value:e.id,label:e.label,defaultTeachers:[n]}))),i=r.newClasses.map((e=>({value:e.id,label:e.label,defaultTeachers:[n]})));return[{gradesOrClasses:t===_$?o:i,teachers:[n]}]},FQ={showTeachers:!1,showTeacherRequests:!1,showStudentRequests:!1,showFriendships:!1,showCharacteristics:!1,showMetrics:!0,writable:!1},LQ=({teachers:e,teachersWithSharedSolutions:t,shareSolution:n,unshareSolution:r,toggle:i,schoolId:s,user:a,availableGrades:l,availableClasses:c,shareError:u,unshareError:d,requestNewToken:h,requestNewTokenError:p,allowWritableSharedSolutions:f})=>{const[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(),[b,x]=(0,o.useState)(!1),[w,S]=(0,o.useState)(!1),C=(e=>{if(e)switch(e.graphQLErrors[0].message){case"missing-teacher-email":return"Some teachers are missing emails";case"teacher-not-found":return"Some teachers do not exist in system";case"teacher-not-in-school":return"You are not allowed to share a solution to some teachers";case"characteristics-needs-metrics":return"Characteristics needs metrics";case"requests-needs-metrics":return"Requests needs metrics";default:return"Error trying to share solution"}})(u),j=(e=>{if(e)return e.graphQLErrors[0].message,"Error trying to unshare solution"})(d),[_,k]=(0,o.useState)(!1),[N,E]=(0,o.useState)(),[T,O]=(0,o.useState)(1),[I,R]=(0,o.useState)(_$),A=o.useContext(Cw).gettextObj,M=`Hello Teachers\n\nPlease click on the link above to view the ${A.gettext("class")} lists.  Please let me know if you have any feedback.\nThanks!`,[P,D]=(0,o.useState)(M),[F,L]=(0,o.useState)(FQ),B=N?N.sharedSolutionToken:null;(0,o.useEffect)((()=>{const e=B?{showTeachers:B.showTeachers,showTeacherRequests:B.showTeacherRequests,showStudentRequests:B.showStudentRequests,showFriendships:B.showFriendships,showCharacteristics:B.showCharacteristics,showMetrics:B.showMetrics,writable:B.writable}:FQ;L(e)}),[L,B]);const[U,G]=(0,o.useState)([]),$=N?DQ(N,I):[j$];(0,o.useEffect)((()=>{const e=N?DQ(N,I):[];N&&2!==T&&4!==T&&G(e)}),[N,I,T]);const q=()=>{S(!w)};return(0,pr.jsx)("div",{children:(0,pr.jsxs)(Yf,{isOpen:!0,className:"shared-solution-modal modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:`Share ${A.gettext("class")} lists with teachers`,toggle:i,toggle2:q,className:"px-5 py-4"}),(0,pr.jsx)(Xk,{text:"This function grants teachers access to the Solver page ONLY. They will be able to see Student Notes, but cannot see Admin Only Requests."}),(0,pr.jsxs)(Ig,{className:"px-5 py-4",children:[!N&&(0,pr.jsx)(y$,{sharedTeachers:t,onUnshareClick:e=>{r({variables:{schoolId:s,teachers:[e.id]}})},onResendClick:e=>{y(e),g(!0)},onUnshareAllClick:()=>{const e=t.map((({id:e})=>e));r({variables:{schoolId:s,teachers:e}})},availableGrades:l,allowWritableSharedSolutions:f,editClick:e=>{E(e),k(!0)}}),_?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"u-separator-border-top pb-4"}),(0,pr.jsx)(MQ,{message:P,setMessage:D,shareOptions:F,setShareOptions:e=>{L((t=>f&&e.writable&&!t.writable?{showTeachers:!0,showTeacherRequests:!0,showStudentRequests:!0,showFriendships:!0,showCharacteristics:!0,showMetrics:!0,writable:!0}:e))},onShareClick:e=>()=>{const t=U.reduce(((t,{gradesOrClasses:n,teachers:r})=>{const o=r.map((({value:e})=>e)),i=n.map((({value:e})=>e)),s=e===_$?(e=>{const t=l.filter((({id:t})=>e.includes(t))).flatMap((({newClasses:e})=>e.map((({id:e})=>e))));return[...new Set(t)]})(i):i;for(const e of s)t[e]=(t[e]||[]).concat(o);return t}),{}),r=Object.entries(t).map((([e,t])=>({classId:e,teacherIds:[...new Set(t)],shareOptions:F})));n({variables:{classTeachersAssignments:r,message:P,ccList:[a.email]}}).then((e=>{e&&(k(!1),x(!0),E(null),O(1),R(_$),L(FQ))}))},shareErrorMessage:C,unshareErrorMessage:j,toggle:N?()=>{k(!1),E(null)}:i,assignmentsToSelect:U,setAssignmentsToSelect:G,defaultAssignments:$,shareType:I,setShareType:R,shareMode:T,setShareMode:O,availableClasses:c,availableGrades:l,availableTeachers:e,allowWritableSharedSolutions:f,teacherWithSharedSolutionToEdit:N})]}):(0,pr.jsx)(Lh,{text:"Add New Share",onClick:()=>(E(null),G([]),void k(!0))}),m&&(0,pr.jsx)(Qf,{isOpen:!0,toggle:()=>g(!1),heading:"Resend?",text:"Are you sure you want to resend shared lists for this teacher?",buttonText:"Yes, send",onButtonClick:()=>{(e=>{const t=e.sharedSolutionToken.token;h({variables:{currentToken:t,tokenType:"SHARED_SOLUTION",ccList:[a.email]}}),g(!1)})(v)},error:p}),b&&(0,pr.jsx)(aN,{isOpen:!0,toggle:()=>x(!1),heading:"List shared with teacher/s"}),w&&(0,pr.jsx)(vN,{toggle:q,videoUrl:"https://player.vimeo.com/video/853214187?h=d0c588cf85"})]})]})})},BQ=()=>(0,pr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 23 23",strokeWidth:"2.5",stroke:"currentColor",children:(0,pr.jsx)("path",{strokeLinecap:"butt",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})});class UQ extends o.Component{constructor(e){super(e),this.togglePanel=()=>{this.setState({isOpen:!this.state.isOpen})},this.toggleDropdownReports=()=>{this.setState((e=>({dropdownReportsOpen:!e.dropdownReportsOpen})))},this.toggleDropdownExports=()=>{this.setState((e=>({dropdownExportsOpen:!e.dropdownExportsOpen})))},this.print=()=>window.print(),this.togglePrompt=()=>{this.setState({promptModal:!this.state.promptModal})},this.studentModalToggle=()=>{const{studentFlags:{studentNewGradeChange:e,studentUpdated:t},updateStudentEditFlag:n,clearSelectedStudent:r}=this.props,o=!this.state.studentModal;this.setState({studentModal:o}),!o&&t&&(this.props.solverRefetch(),e?(n({variables:{type:Ut,value:!1}}),r()):n({variables:{type:Gt,value:!1}}))},this.state={studentModal:!1,promptModal:!1,dropdownReportsOpen:!1,dropdownExportsOpen:!1,solutionsDropDownOpen:!1}}render(){const{isOpen:e,togglePanel:t,adminMode:n,undoMoves:r,redoMoves:i,schoolSettings:s,selectedStudentId:a,solveActiveGrade:l,solverGrades:c,updateSelectedStudent:u,activeGradeId:d,onActiveGradeChange:h,metrics:p={},studentMetrics:f=[],activeGradeCount:m,activeCharacteristic:g,onActiveCharacteristicChange:v,onUndoRedoClick:y,asyncSolveInProgress:b,onBoostSolutionMetricClick:x,onBoostCharacteristicClick:w,onBoostStudentMetricClick:S,csvExport:C,sharedSolutionCsvExport:j,shareSolution:_,metricDifferences:k,errors:N,solverMode:E,refetchQueries:T,hasSolution:O,showMetrics:I,showCharacteristics:R,showTeacherRequests:A,showStudentRequests:M,showFriendships:P,currentClasses:D,hasAsyncSolveInProgress:F,solutionSuggestions:L,unassignedTeacherPrompt:B,toggleCharacteristicResponseSort:U,showClassEntryCriteria:G,location:$,assignments:q,favourites:z,favouriteAnAssignmentMutation:V,unfavouriteAnAssignmentMutation:H,updateFavouritedAssignmentMutation:W,pickAnAssignment:Y,assignmentWithClasses:Q}=this.props,{studentModal:J,dropdownExportsOpen:K,dropdownReportsOpen:X,solutionsDropDownOpen:Z,promptModal:ee}=this.state,{atLeastOneFriend:te={},characteristicScores:ne={},mandatoryRequests:re={},importantRequests:oe={},genderBalance:ie={},differentTeacher:se={},classEntryCriteria:ae={}}=p||{},le=E===N$||E===T$,ce=e?"open":"close",ue=e?"fa-angle-left":"fa-angle-right",de=s.maxFriends>0,he=s.avoidSameTeacher,pe=s.minFriendPrefs,fe=L&&L.find((({type:e})=>"FRIENDSHIP_SETTING"===e)),me=fe?{id:"friendship-setting",tooltip:(0,pr.jsxs)("div",{className:"p-1",children:[(0,pr.jsxs)("div",{className:"d-flex align-items-center",children:[(0,pr.jsx)("h2",{className:"mb-0 mr-1",children:"Tip: Green Warning Flags"}),(0,pr.jsx)("div",{className:"c-badge__no-friend-pref",children:(0,pr.jsx)(BQ,{})})]}),(0,pr.jsx)(ws,{children:fe.text})]})}:null,ge=B?{id:"unassignedteacher-setting",tooltip:(0,pr.jsxs)("div",{className:"p-1",children:[(0,pr.jsx)("h2",{children:" Important: Teachers have not been assigned"}),(0,pr.jsx)("div",{className:"c-unassigned-teacher-content",children:"There are Requests for students to be paired or separated from teachers, but the teachers have not yet been assigned to classes. Therefore, these Requests have not been considered."}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:"Please assign teachers by:"}),(0,pr.jsxs)("ul",{children:[(0,pr.jsx)("li",{children:"Clicking on the pencil next to \u201cNo Teacher Assigned\u201d"}),(0,pr.jsx)("li",{children:"Selecting the teacher\u2019s name"}),(0,pr.jsx)("li",{children:"Click \u201cSave\u201d"})]})]}),(0,pr.jsx)("div",{children:"You may need to Boost or Rerun the Solver to ensure these Requests are considered."})]})}:null;let ve=[{label:`At Least ${Bh(pe,"Friend","Friends")}`,className:"mt-4",icon:"_badge bg-friendships mr-1",count:de?te.count:"-",total:te.total,onClick:e=>{x(e,"AT_LEAST_ONE_FRIEND")},difference:k.atLeastOneFriend,disabled:!de,suggestionContent:me},{label:"Mandatory Requests",icon:"_badge bg-requests-mandatory",count:re.count,total:re.total,onClick:e=>x(e,x$),difference:k.mandatoryRequests,warningContent:ge},{label:"Important Requests",className:"mt-4",icon:"_badge bg-requests-important mr-1",count:oe.count,total:oe.total,onClick:e=>{x(e,w$)},difference:k.importantRequests,warningContent:ge}];G&&(ve=ve.concat([{label:"Class Entry Criteria",className:"mt-4",icon:"_badge bg-class-entry-criteria mr-1",count:ae.count,total:ae.total,onClick:e=>{x(e,C$)},difference:k.classEntryCriteria}])),E!==N$&&E!==T$||(ve=ve.concat([{label:"Different Teacher",className:"mt-4",icon:"_badge bg-requests-teacher mr-1",count:he?se.count:"-",total:se.total,onClick:e=>{x(e,S$)},difference:k.differentTeacher,disabled:!he},{label:"Gender Balance",className:"mt-4",icon:"_badge _badge-white mr-1",count:ie.count,total:ie.total,percentage:!0,onClick:e=>{x(e,"GENDER_BALANCE")},difference:k.genderBalance}]));const ye=JSON.parse(sessionStorage.getItem(Wt));return(0,pr.jsxs)("div",{className:"c-side-bar d-print-none",children:[(0,pr.jsx)("span",{className:`c-side-bar__hide-button c-side-bar__hide-button--${ce} d-flex align-items-center justify-content-center cursor-pointer d-print-none`,onClick:t,children:(0,pr.jsx)("i",{className:"fa "+ue})}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:`c-side-bar__panel p-4 c-side-bar__panel--${ce}`,children:[E===N$&&(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)("div",{className:"container c-side-bar__panel__minor-actions-container pb-4 d-print-none",children:(0,pr.jsxs)("div",{className:"row",children:[(0,pr.jsx)("div",{className:"col-8 pl-0 pr-1",children:(0,pr.jsx)(I$,{dropdownReportsOpen:X,toggle:this.toggleDropdownReports})}),(0,pr.jsx)("div",{className:"col p-0",children:(0,pr.jsx)(O$,{dropdownExportsOpen:K,toggle:this.toggleDropdownExports,solverMode:E,print:this.print,csvExport:C,shareSolution:_})})]})}),N.export&&(0,pr.jsx)($k,{text:N.export}),(0,pr.jsx)("div",{className:"c-side-bar__panel__divider-line d-print-none"})]})}),(E===E$||E===T$)&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("img",{className:"w-50 my-4",src:xN,alt:"Class Solver Logo"}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between my-3",children:[(0,pr.jsx)(ld,{className:"mr-1 flex-grow-1",disabled:!O,color:"secondary",onClick:this.print,children:"Print"}),ye.showFriendships?(0,pr.jsxs)(Ku,{className:"ml-1 ",isOpen:K,toggle:this.toggleDropdownExports,children:[(0,pr.jsx)(hd,{caret:!0,disabled:!O,children:"More ..."}),(0,pr.jsxs)(Ih,{children:[(0,pr.jsx)(Ph,{onClick:()=>j(d),children:"Export"}),(0,pr.jsx)(Ph,{children:(0,pr.jsx)(tc,{to:`sociogram${$.search}`,children:"Sociogram View"})})]})]}):(0,pr.jsx)(ld,{className:"ml-1 flex-grow-1",disabled:!O,color:"secondary",onClick:()=>j(d),children:"Export"})]})]}),(0,pr.jsx)("div",{children:(0,pr.jsx)(WQ,{hasSolution:O,canUndo:r.length>0,canRedo:i.length>0,onUndoRedoClick:y,asyncSolveInProgress:b,activeGradeId:d,onActiveGradeChange:h,solverGrades:c,toggle:O?this.togglePrompt:l,errors:N,solverMode:E,hasAsyncSolveInProgress:F,assignments:q,favourites:z,solutionsDropDownOpen:Z,favouriteAnAssignmentMutation:V,unfavouriteAnAssignmentMutation:H,updateFavouritedAssignmentMutation:W,pickAnAssignment:Y,assignmentWithClasses:Q})}),(0,pr.jsxs)("span",{className:"c-side-bar__count",children:["Total - ",m," Students"]}),(0,pr.jsx)("div",{children:I&&ve.map((({label:e,icon:t,count:n,total:r,onClick:o,difference:i,percentage:s,suggestionContent:a,warningContent:l})=>(0,pr.jsx)(d$,{label:e,className:"mt-4",icon:`${t} mr-1`,count:n,total:r,percentage:s,onClick:le&&o,difference:i,showMetric:E===N$||E===T$,suggestionContent:a,warningContent:l},e)))}),(0,pr.jsx)(YQ,{activeCharacteristic:g,onActiveCharacteristicChange:v,characteristicScores:ne,onBoostCharacteristicClick:w,metricDifferences:k,selectedStudentId:a,adminMode:n,studentMetrics:f,updateSelectedStudent:u,onBoostStudentMetricClick:S,friendPreferences:de,differentTeacherSetting:he,studentModal:J,studentModalToggle:this.studentModalToggle,refetchQueries:T,solverMode:E,showCharacteristics:R,showTeacherRequests:A,showStudentRequests:M,showFriendships:P,currentClasses:D,toggleCharacteristicResponseSort:U,showClassEntryCriteria:G}),(0,pr.jsx)(qQ,{isOpen:ee,toggle:this.togglePrompt,solveActiveGrade:l})]})})]})}}var GQ=n(1237);class $Q extends o.Component{constructor(){super(),this.toggleModal=()=>{const{clearSelectedStudent:e,updateSelectedTeacherId:t}=this.props;e(),t({variables:{selectedTeacherId:""}}),this.setState({classModal:!this.state.classModal})},this.isStudentInClass=e=>-1!==this.props.classData.students.findIndex((t=>t.id===e)),this.isTeacherOfClass=e=>-1!==this.props.classData.teachers.findIndex((t=>t.id===e)),this.lockClassStudents=()=>{const{lockStudentsMutation:e,refetchQueries:t,updateLockedStudentIdsOptimization:n}=this.props;let r=this.props.solutionId,o=this.calculateClassLockState(),i=this.props.classData.students.map((e=>e.id));e({variables:{studentIds:i,lockedState:!o,solutionId:r},refetchQueries:t}).then((()=>{n(i,!o)}))},this.calculateClassLockState=()=>{let e=(this.props.lockedStudentIds||[]).map((e=>`${e}`)),t=this.props.classData.students.map((e=>e.id));return 0!==t.length&&t.every((t=>e.includes(t)))},this.state={classModal:!1,idOfStudentBeingDragged:""}}getItemStyle(e,t){return{...t,backgroundColor:"white",border:e?"1px solid #d7dbe0":""}}render(){const{classStyle:e,classData:t,onLockStudent:n,onStudentClick:r,maxTeacherPerClass:o,schoolSettings:i,updateSelectedTeacherId:s,selectedTeacherId:a,selectedStudent:l,highlightStudents:c,activeGrade:u,activeCharacteristic:d,studentMetrics:h,lockedStudentIds:p,refetch:f,solverMode:m,showTeachers:g,showTeacherRequests:v,showStudentRequests:y,showFriendships:b,currentClasses:x,schoolCharacteristics:w,activeCurrentClasses:S,hasGenderX:C,isDropDisabled:_,sortByCharacteristicResponses:k,hasMax:N,showClassEntryCriteria:E,draggedStudent:T,studentsSelectedForDragging:O,toggleTeacherPanel:I,teacherPanelIsOpen:R}=this.props,{key:A,classDetails:{id:M,label:P,schoolGrades:D,maxClassSize:F,maxSizePerGrade:L,entryCriteriaCharacteristicResponse:B,entryCriteriaStudentAttribute:U,entryCriteriaNullResponse:G},teachers:$,students:q}=t,z=ou(l,"teacherConstraints"),V=m===E$,H=d.characteristic?d.characteristic.id:null,W=d.characteristic?d.characteristic:null,Y="all"===d.id,Q=(e=>e?e.slice().sort(((e,t)=>t.studentCount-e.studentCount)).map(((t,n)=>{const r=ZC[n%ZC.length];return{id:t.label,label:t.label,colour:r,characteristic:{id:"-1",name:"Current Class"},value:e.length-n}})).concat([{id:"NO_CURRENT_CLASS",label:"No Current Class",colour:"#80debcff",characteristic:{id:"-1"},value:0}]):[])(x),J=q.map((e=>{const t=Q.find((t=>e.currentClass?t.label===e.currentClass.label:"NO_CURRENT_CLASS"===t.id)),n=e.characteristicResponses.concat([t]);return{...e,characteristicResponses:n}})),K=k?((e,t,n)=>(0,j.orderBy)(e,[BS(n),US(t)],["asc","desc"]))(J,H,u):J,X=O.map((e=>((e,t)=>{const n=t.find((t=>e.currentClass?t.label===e.currentClass.label:"NO_CURRENT_CLASS"===t.id)),r=e.characteristicResponses.concat([n]);return{...e,characteristicResponses:r}})(e,Q))),Z=T?X.filter((e=>e.id!==T.id)):[];return(0,pr.jsxs)("div",{className:"c-solver-class d-flex flex-column",style:e,children:[(0,pr.jsx)(V$,{students:J,lockState:this.calculateClassLockState(),lockClassStudents:this.lockClassStudents,editable:i.showTeachersInSolver,classData:t,toggleEditClassModal:this.toggleModal,hasGenderX:C,readMode:m!==N$,activeGradeId:u,hasMax:N,activeCharacteristic:W,currentClassResponses:Q}),g&&(0,pr.jsx)(zQ,{updateSelectedTeacherId:s,teacherConstraints:z,maxTeacherPerClass:o,isStudentInClass:this.isStudentInClass,selectedStudentId:l.studentId,teachers:$,selectedTeacherId:a,toggleModal:this.toggleModal,readMode:m!==N$,toggleTeacherPanel:I,teacherPanelIsOpen:R}),(0,pr.jsx)(dQ,{droppableId:M,index:A,isDropDisabled:_,children:(e,t)=>(0,pr.jsx)("div",{ref:e.innerRef,...e.draggableProps,...e.dragHandleProps,className:"c-solver-class__students",children:(0,pr.jsxs)(GQ.default,{onOutsideClick:e=>{(e.target.classList.contains("u-layout-component-grow")||e.target.classList.contains("c-solver-class__students"))&&(this.props.clearSelectedStudent(),this.props.clearStudentsToBeDragged())},children:[K.map(((e,t)=>{const o=c.includes(e.id),s=O.filter((t=>t.id===e.id)).length>0,d=!!su(p)&&p.includes(parseInt(e.id,10));let f,m={};b&&l.friends.forEach((t=>{t.studentTo.id===e.id&&e.id!==l.studentId&&(m={isFriend:!0,isMet:this.isStudentInClass(q,l.studentId)})})),y&&l.studentConstraints.forEach((t=>{e.id!==l.studentId&&(t.studentTo.id!==e.id&&t.studentFrom.id!==e.id||(f={mandatory:t.mandatory,pair:t.pair,isMet:t.pair?this.isStudentInClass(l.studentId):!this.isStudentInClass(l.studentId)}))}));let x,w={};h&&(w=h.find((t=>t.student.id===e.id))),v&&e.teacherConstraints&&e.teacherConstraints.forEach((e=>{e.teacherToId.toString()===a&&(x={mandatory:e.mandatory,pair:e.pair,isMet:e.pair?this.isTeacherOfClass(a):!this.isTeacherOfClass(a)})}));const S=u.toString()===e.newGrade.id,C=(0,pr.jsx)(VQ,{classId:M,onStudentClick:r,lockState:d,studentMetrics:w,onLockStudent:n,studentDropped:o,studentToBeDragged:s,friendConstraint:m,studentConstraint:f,teacherConstraint:x,inActiveGrade:S,activeCharacteristic:W,showAllCharacteristics:Y,selectedTeacherId:a,student:e,schoolSettings:i,selectedStudentId:l.studentId,readMode:V,showTeacherRequests:v,showStudentRequests:y,showFriendships:b,showTeachers:g,showClassEntryCriteria:E}),j=(T?X:[]).map(((e,t)=>{const n=u.toString()===e.newGrade.id;return(0,pr.jsx)("div",{children:(0,pr.jsx)(VQ,{activeCharacteristic:W,student:e,selectedStudentId:e.id,studentToBeDragged:s,inActiveGrade:n})},t)}));return(0,pr.jsx)(aQ,{index:t,draggableId:e.id,isDragDisabled:V||d,children:(t,n)=>{const r=Z.filter((t=>t.id===e.id)).length>0;let o;return o=T&&r&&e.id!==T.id?null:T&&Z.length>0&&n.isDragging?(0,pr.jsx)(pr.Fragment,{children:j}):C,(0,pr.jsx)("div",{ref:t.innerRef,...t.draggableProps,...t.dragHandleProps,style:this.getItemStyle(n.isDragging,t.draggableProps.style),onClick:this.onClick,children:o})}},e.id)})),e.placeholder]})})}),this.state.classModal&&(0,pr.jsx)(fk,{isOpen:this.state.classModal,toggle:this.toggleModal,disableInput:!0,id:M,label:P,maxClassSize:F,maxSizePerGrade:L,schoolGrades:D,teachers:$,heading:"Edit Class",buttonText:"Save Class",edit:!0,canDelete:!1,refetch:f,refetchQueries:[{query:mg,variables:{schoolId:sessionStorage.getItem(Ht)}}],characteristics:w,currentClasses:S,entryCriteriaCharacteristicResponse:B,entryCriteriaStudentAttribute:U,entryCriteriaNullResponse:G})]})}}const qQ=({isOpen:e,toggle:t,solveActiveGrade:n})=>(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)(Yf,{isOpen:e,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:"Run Solver?",toggle:t}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center mt-3",children:[(0,pr.jsxs)("div",{className:"mt-3 d-flex justify-content-between",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-4"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"text-primary mb-3",children:"IMPORTANT NOTICE"}),(0,pr.jsxs)("div",{className:"mb-3",children:["Clicking Run will completely replace your current lists with new lists for the selected grade. If Students are locked (",(0,pr.jsx)("i",{className:"fa fa-lock text-primary font-size-16"}),"), these students will not be moved."]}),(0,pr.jsxs)("div",{children:["You can still revert back to the original list by clicking on 'Undo' (",(0,pr.jsx)("i",{className:"fa fa-undo text-primary font-size-15"}),") or the Timeline (",(0,pr.jsx)("i",{className:"fa fa-clock-o text-primary font-size-16"}),")."]})]})]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-5 w-50",onClick:()=>{t(),n()},children:"Yes, Run"}),(0,pr.jsx)("span",{className:"text-primary p-3 pl-5 pr-5 mt-2 cursor-pointer",onClick:t,children:"Cancel"})]})]})})}),zQ=({isStudentInClass:e,selectedStudentId:t,teachers:n,selectedTeacherId:r,teacherConstraints:o,maxTeacherPerClass:i,updateSelectedTeacherId:s,toggleModal:a,readMode:l,toggleTeacherPanel:c,teacherPanelIsOpen:u})=>{let d=!1;const h=n.map(((n,i)=>{const a=n.id===r;let c="c-solver-teachers__teacher d-flex d-print-inline-flex justify-content-between";a&&(d=!0,c+=a?" c-solver-teachers__teacher--selected":"");let u=[];return o.forEach((r=>{if(r.teacherTo.id===n.id){const{mandatory:n,pair:o}=r;u.push({mandatory:n,pair:o,isMet:o?e(t):!e(t)})}})),(0,pr.jsxs)("span",{className:c,onClick:(h=()=>s({variables:{selectedTeacherId:n.id}}),l?void 0:h),children:[`${n.firstName} ${n.lastName}`,u.map(((e,t)=>(0,pr.jsx)("span",{className:"ml-1",children:(0,pr.jsx)(xk,{mandatory:e.mandatory,pair:e.pair,isMet:e.isMet})},t)))]},i);var h})),p=0===n.length&&i>0?i-n.length-1:i-n.length;for(let v=0;v<p;v++){let e="c-solver-teachers__teacher w-100 d-flex d-print-inline-flex justify-content-between";h.push((0,pr.jsx)("span",{className:e},`empty-${v}`))}const f=u?"fa-angle-up":"fa-angle-down",m=i<=1||u?"c-solver-teachers--open":"c-solver-teachers--close",g=d?"c-solver-teachers--selected":"";return(0,pr.jsxs)("div",{className:`c-solver-teachers_outer ${g}`,children:[(0,pr.jsxs)("div",{className:`c-solver-teachers ${m}`,children:[(0,pr.jsx)(bk,{hide:l,children:(0,pr.jsx)("i",{className:"fa fa-pencil ml-2 cursor-pointer d-print-none c-solver-teachers__pencil",onClick:a})}),(0,pr.jsxs)("div",{className:"w-100 d-flex flex-column align-items-start text-truncate",children:[0===n.length&&(0,pr.jsx)("span",{className:"c-solver-teachers__teacher",children:"No Teacher Assigned"}),(0,pr.jsx)("div",{className:"w-80",children:h})]})]}),i>2&&(0,pr.jsx)("div",{className:"c-solver-teachers__arrow_space",children:n.length>2&&(0,pr.jsx)("i",{onClick:c,className:`fa ${f} c-solver-teachers__arrow`})})]})};class VQ extends o.Component{render(){const{student:e,lockState:t,onStudentClick:n,studentMetrics:r,studentDropped:o,studentToBeDragged:i,inActiveGrade:s,activeCharacteristic:a,friendConstraint:l,studentConstraint:c,teacherConstraint:u,onLockStudent:d,selectedStudentId:h,selectedTeacherId:p,schoolSettings:f,readMode:m,showTeachers:g,showStudentRequests:v,showFriendships:y,showClassEntryCriteria:b,showAllCharacteristics:x}=this.props,{id:w,firstName:S,lastName:C,gender:j,currentClass:_}=e,k=!!f&&f.maxFriends>0,N=!!f&&f.avoidSameTeacher,E=!!f&&f.includeStudentsWithNoValidFriends,T=h===w,O=""===h&&""===p&&s,I=e.characteristicResponses||[];let R=IC(j);const A=[T&&!i&&"c-student-list-item--selected",o&&"c-student-list-item--dropped",i&&"c-student-list-item--dropped",s||"c-student-list-item--inactive",m&&"cursor-pointer"].filter((e=>e)).join(" "),M=x?"c-student-list-item--all-characteristics ":"",P=I.filter((e=>RD(e.colour)>0));let D={};if(a){const e=I.find((e=>e.characteristic.id===a.id));if(e&&e.colour){if(RD(e.colour)>0){const t=DD(AD(e.colour));D={backgroundColor:FD(t)},R=LD(t)}}}let F=[];if(r&&r.requestsMet){const{mandatoryRequests:e,importantRequests:t,differentTeacher:n,friendshipPreferences:o,classEntryCriteria:i}=r.requestsMet;F=[{isMet:e,className:"mandatory",isVisible:v},{isMet:t,className:"important",isVisible:v},{isMet:n,className:"teacher",isVisible:g},{isMet:!E&&0===r.metrics.friendshipPreferences.total||o,className:"friendship",isVisible:y,friendshipPreferences:r.metrics.friendshipPreferences},{isMet:i,className:"class-entry-criteria",isVisible:b}]}return(0,pr.jsxs)("div",{className:"c-student-list-item d-flex justify-content-between align-items-center "+A,style:D,onClick:e=>{n(e,w,T)},children:[(0,pr.jsxs)("div",{className:`d-inline-flex u-opacity-100 pr-1 text-truncate ${M}`,children:[!m&&(0,pr.jsx)("i",{className:"d-print-none d-flex align-items-center "+(t?"fa fa-lock":"fa fa-unlock"),onClick:i?null:e=>d(e,w,!t)}),(0,pr.jsx)("span",{className:`c-student-list-item__name c-student-list-item__name--${j} ${R} text-truncate`,children:`${S} ${C}`})]}),(0,pr.jsx)("div",{className:"d-inline-flex",children:x?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("span",{"data-tooltip-id":`student-${w}`,className:"p-0",children:[P.slice(0,5).map(((e,t)=>(0,pr.jsx)(h$,{...e},t))),P.length>5&&"+"+(P.length-5)]}),(0,pr.jsx)(p$,{id:`student-${w}`,className:"c-characteristic-tooltip p-0",place:"right",variant:"light",float:!0,characteristicResponses:I})]}):(0,pr.jsxs)("div",{className:"c-student-list-item__flags d-flex",children:[O?(0,pr.jsx)("span",{className:"c-student-list-item__flags__container",children:F.map(((e,t)=>e.isMet||!e.isVisible||!k&&"friendship"===e.className||!N&&"teacher"===e.className?null:"friendship"===e.className?e.friendshipPreferences.count>0?(0,pr.jsx)("div",{className:"c-badge__circle not-met-friend",children:e.friendshipPreferences.count},t):0===e.friendshipPreferences.total?(0,pr.jsx)("div",{className:"c-badge__no-friend-pref",children:(0,pr.jsx)(BQ,{})},t):(0,pr.jsx)("i",{className:"c-student-list-item__flags__not-met\n                        c-student-list-item__flags__not-met--friendship\n                        fa fa-ban d-print-none"},t):(0,pr.jsx)("i",{className:`c-student-list-item__flags__not-met\n                        c-student-list-item__flags__not-met--${e.className}\n                        fa fa-ban d-print-none `},t)))}):(0,pr.jsxs)("span",{className:"d-flex align-items-center",children:[l&&l.isFriend&&(0,pr.jsx)(b$,{isMet:l.isMet}),c&&(0,pr.jsx)(xk,{mandatory:c.mandatory,pair:c.pair,isMet:c.isMet}),u&&(0,pr.jsx)(xk,{mandatory:u.mandatory,pair:u.pair,isMet:u.isMet})]}),rj(a)&&(0,pr.jsx)("span",{className:`c-student-list-item--current-class ${R}`,children:_?_.label:"N/A"})]})})]})}}const HQ=({notification:e})=>{const t=e?e.title.toLowerCase():"",n=o.useContext(Cw).gettextObj;return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)("div",{className:"c-modal-expired-note text-center pop",children:["You have ",t,". Please click"," ",(0,pr.jsx)(tc,{style:{textDecoration:"underline"},to:{pathname:"/Students",search:new URLSearchParams({filterId:"unallocated-students"}).toString()},children:"here"}),", open the student's card, select 'Edit', and assign a 'New"," ",n.gettext("Class"),"'."]})})},WQ=({canUndo:e,canRedo:t,onUndoRedoClick:n,asyncSolveInProgress:r,activeGradeId:i,onActiveGradeChange:s,solverGrades:a,toggle:l,errors:c,hasSolution:u,solverMode:d,hasAsyncSolveInProgress:h,assignments:p,favourites:f,favouriteAnAssignmentMutation:m,unfavouriteAnAssignmentMutation:g,updateFavouritedAssignmentMutation:v,pickAnAssignment:y})=>{const[b,x]=o.useState(!1),w=d!==E$,S=e&&!r?"color-blue-mid cursor-pointer":"color-grey-mid",C=t&&!r?"color-blue-mid cursor-pointer":"color-grey-mid",j=h?"color-grey-mid":"color-blue-mid cursor-pointer";return(0,pr.jsxs)(o.Fragment,{children:[(d===N$||d===T$)&&(0,pr.jsxs)("div",{className:"c-side-bar__panel__menu justify-content-start d-print-none",children:[(0,pr.jsxs)("div",{className:`c-side-bar__panel__menu__run ${j}`,onClick:()=>{h||l()},children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),(0,pr.jsx)("span",{className:"d-inline-block",children:u?"Re-Run":"Run"})]}),(0,pr.jsxs)("div",{className:`c-side-bar__panel__menu__undo ${S}`,onClick:()=>{e&&!r&&n(Ft)},children:[(0,pr.jsx)("i",{className:"fa fa-undo mr-2"}),(0,pr.jsx)("span",{className:"d-inline-block",children:"Undo"})]}),(0,pr.jsxs)("div",{className:`c-side-bar__panel__menu__redo ${C}`,onClick:()=>{t&&!r&&n(Lt)},children:[(0,pr.jsx)("i",{className:"fa fa-repeat mr-2"}),(0,pr.jsx)("span",{className:"d-inline-block",children:"Redo"})]})]}),c.solverRun&&(0,pr.jsx)($k,{text:c.solverRun}),c.move&&(0,pr.jsx)($k,{text:c.move}),c.lock&&(0,pr.jsx)($k,{text:c.lock}),(0,pr.jsxs)("div",{className:"d-flex flex-row",children:[(0,pr.jsx)(Zg,{type:"select",className:"c-side-bar__panel__grade-select",name:"gradeId",value:i,onChange:e=>{s(e.target.value)},children:a.map(((e,t)=>(0,pr.jsx)("option",{value:e.id,children:e.label},t)))}),w&&(0,pr.jsx)(U$,{solutionsDropDownOpen:b,toggleSolutionsDropDown:()=>{x(!b)},assignments:p||[],favourites:f||[],favouriteAnAssignmentMutation:m,unfavouriteAnAssignmentMutation:g,updateFavouritedAssignmentMutation:v,pickAnAssignment:y,activeGradeId:i})]})]})},YQ=({activeCharacteristic:e,onActiveCharacteristicChange:t,characteristicScores:n,onBoostCharacteristicClick:r,metricDifferences:i,selectedStudentId:s,adminMode:a,studentMetrics:l,updateSelectedStudent:c,onBoostStudentMetricClick:u,friendPreferences:d,differentTeacherSetting:h,studentModal:p,studentModalToggle:f,refetchQueries:m,solverMode:g,showCharacteristics:v,showTeacherRequests:y,showStudentRequests:b,showFriendships:x,currentClasses:w,toggleCharacteristicResponseSort:S,showClassEntryCriteria:C})=>{const j=e.characteristic&&e.characteristic.characteristicResponses[0]&&e.characteristic.characteristicResponses[0].colour,_=RD(j),k=g===N$,N=k||g===T$;let E,T;return E=""===e.id||"all"===e.id?null:(0,pr.jsx)("i",{className:"fa fa-sort-amount-desc color-blue-mid cursor-pointer px-2","aria-hidden":"true",onClick:S}),T=""===e.id||"all"===e.id?(0,pr.jsx)(d$,{icon:"_badge _badge-white mr-1",count:ou(n,"aggregate.count"),total:ou(n,"aggregate.total"),percentage:!0,showMetric:N,onClick:N&&(e=>{r(e,void 0)}),difference:i.characteristicScores}):null===e.metric?(0,pr.jsx)(d$,{icon:`_badge ${_>0?"":"_badge-white"} mr-1`,iconStyle:_>0?{backgroundColor:j}:{},count:"-",total:"-",showMetric:N,onClick:N&&(e=>{r(e,void 0)}),onBadgeClick:S}):(0,pr.jsx)(d$,{icon:`_badge ${_>0?"":"_badge-white"} mr-1`,iconStyle:_>0?{backgroundColor:j}:{},count:ou(e,"metric.count"),total:ou(e,"metric.total"),percentage:!0,showMetric:N,onClick:N&&(t=>{r(t,e.characteristic.id)}),difference:i.activeCharacteristic,onBadgeClick:S}),(0,pr.jsxs)(o.Fragment,{children:[v&&(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)("div",{className:"c-side-bar__panel__characteristics-container w-100 d-flex justify-content-between align-items-center pt-4 d-print-none m-0",children:[(0,pr.jsxs)(Zg,{type:"select",className:"c-side-bar__panel__characteristics-container__input",value:e.id,onChange:t,children:[(0,pr.jsx)("option",{value:"",children:"No Characteristic"}),n.characteristicMetrics&&n.characteristicMetrics.map(((e,t)=>(0,pr.jsx)("option",{value:e.characteristic.id,children:e.characteristic.name},t))),(0,pr.jsx)("option",{value:"all",children:"All Characteristics"})]}),E,T]})}),(0,pr.jsx)("div",{className:"c-side-bar__panel__divider-line d-print-none pt-4"}),(0,pr.jsx)("div",{className:"d-print-none",children:""===s?(0,pr.jsx)("div",{className:"c-side-bar__panel__no-student",children:"No Student Selected"}):(0,pr.jsx)(Vm,{query:J,variables:{id:s,adminOnly:a},children:({loading:e,error:t,data:n,refetch:r})=>{if(e)return(0,pr.jsx)("div",{className:"position-relative mt-5",children:(0,pr.jsx)(qk,{})});if(t)return(0,pr.jsx)(eN,{error:t,refetch:r});const o=m.concat({query:J,variables:{id:s}}),a=m,S=l&&l.find((e=>e.student.id===s));return(0,pr.jsxs)("div",{children:[(0,pr.jsx)(NQ,{solverMode:g,toggle:f,updateSelectedStudent:c,studentMetrics:ou(S,"metrics"),onBoostStudentMetricClick:u,studentBoostDifferences:i.student,friendPreferences:d,differentTeacherSetting:h,showTeacherRequests:y,showStudentRequests:b,showCharacteristics:v,showClassEntryCriteria:C,...n.student}),(0,pr.jsx)(uj,{isOpen:p,toggle:f,showTeacherRequests:y,showStudentRequests:b,showCharacteristics:v,showFriendships:x,teacherRequestsEditable:k,studentRequestsEditable:k,studentEditable:k,friendshipEditable:k,characteristicsEditable:k,currentClasses:w,refetchQueries:o,deleteRefetchQueries:a,studentId:ou(n,"student.id")})]})}})})]})},QQ=()=>{const e=sessionStorage.getItem(Ht),t=JSON.parse(sessionStorage.getItem(Wt)),{data:n,loading:r}=Gm(se),{data:o,loading:i}=Gm(ee,{variables:{schoolId:e}}),{data:s,loading:a}=Gm(Ge,{variables:{schoolId:e}}),{data:l,loading:c}=Gm(ke),[u]=Km(ce),[d]=Km(te),[h]=Km(ie),[p]=Km(ne),[f]=Km(V),[m]=Km(K),[g]=Km(Z),[v]=Km(X),[y]=Km(ae),[b]=Km(le),[x]=Km(H),[w]=Km(W),[S]=Km(Y),[C]=Km(Q);if(a||r||i||c)return(0,pr.jsx)(qk,{});const{solver:{selectedStudent:j,activeGrade:_,undoMoves:k,redoMoves:N,lastAssignmentCached:E}}=n,T=""!==_?_.toString():ou(o.allGradesWithNewClasses[0],"id");return(0,pr.jsx)(Vm,{query:z,variables:{solution:{schoolId:e,gradeId:T}},fetchPolicy:"network-only",errorPolicy:"all",children:({loading:e,error:n,data:r,refetch:i})=>{if(e)return(0,pr.jsx)(qk,{});if(n)return(0,pr.jsx)(eN,{error:n,refetch:i});const a=ou(r,"sharedSolution")||void 0,c=t.writable?T$:E$;return(0,pr.jsxs)(pr.Fragment,{children:[c===T$&&(0,pr.jsx)(uE,{color:"primary",children:"Your administrator has provided you with the ability to move students. Please do not move students at the same time as other teachers or administrators as it may result in you losing information."}),(0,pr.jsx)(wQ,{data:a,refetch:i,activeGradeId:T,friendPreferences:!1,studentFlags:l,schoolSettings:s.schoolSettings,solverGrades:o.allGradesWithNewClasses,selectedStudent:j,selectedTeacherId:"",updateSelectedStudent:d,updateSolverUndoRedo:y,updateLastAssignment:b,updateSolverActiveGrade:u,solverMode:c,showTeachers:t.showTeachers,showStudentRequests:t.showStudentRequests,showTeacherRequests:t.showTeacherRequests,showMetrics:t.showMetrics,showCharacteristics:t.showCharacteristics,showFriendships:t.showFriendships,refetchQueries:[],moveStudentMutation:h,lockStudentMutation:p,solveActiveGradeMutation:f,boostCharacteristicMutation:m,boostSolutionMetricMutation:g,boostStudentMetricMutation:v,favouriteAnAssignmentMutation:x,unfavouriteAnAssignmentMutation:w,updateFavouritedAssignmentMutation:S,pickAnAssignmentMutation:C,undoMoves:k,redoMoves:N,lastAssignmentCached:E}),(0,pr.jsx)(YD,{className:"ml-0"})]})}},T)},JQ=ng()(eg(O,{props:({data:{myprofile:e}})=>({user:e})}),eg(ee,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,error:t,allGradesWithNewClasses:n}})=>({loadingOne:e,solverGrades:n,error:t})}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolSettings:t}})=>({loadingTwo:e,schoolSettings:t})}),eg(se,{props:({data:{solver:{selectedStudent:e,selectedTeacherId:t,activeGrade:n,undoMoves:r,redoMoves:o,lastAssignmentCached:i}}})=>({selectedStudent:e,selectedTeacherId:t,activeGrade:n,undoMoves:r,redoMoves:o,lastAssignmentCached:i})}),eg(ke,{props:({data:{studentFlags:e}})=>({studentFlags:e})}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Dw,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loadingThree:e,schoolCharacteristics:t})}),eg(TC,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,getNotifications:t}})=>({loadingNotifications:e,getNotifications:t})}),eg(gg,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,activeCurrentClasses:t}})=>({loadingFour:e,activeCurrentClasses:t})}),eg(V,{name:"solveActiveGradeMutation"}),eg(K,{name:"boostCharacteristicMutation"}),eg(Z,{name:"boostSolutionMetricMutation"}),eg(X,{name:"boostStudentMetricMutation"}),eg(oe,{name:"moveStudentMutation"}),eg(ne,{name:"lockStudentMutation"}),eg(re,{name:"lockStudentsMutation"}),eg(ce,{name:"updateSolverActiveGrade"}),eg(te,{name:"updateSelectedStudent"}),eg(ue,{name:"updateSelectedTeacherId"}),eg(ae,{name:"updateSolverUndoRedo"}),eg(le,{name:"updateLastAssignment"}),eg(Ne,{name:"updateStudentEditFlag"}),eg(H,{name:"favouriteAnAssignmentMutation"}),eg(W,{name:"unfavouriteAnAssignmentMutation"}),eg(Y,{name:"updateFavouritedAssignmentMutation"}),eg(Q,{name:"pickAnAssignmentMutation"}),eg(G,{name:"assignmentWithClassesMutation"}))((e=>{aw(e.error);const{loadingOne:t,loadingTwo:n,loadingThree:r,loadingFour:o,solverGrades:i,schoolSettings:s,settings:a,activeGrade:l}=e;if(t||n||r||o)return(0,pr.jsx)(qk,{});const c={gradeId:""!==l?l.toString():ou(i[0],"id"),schoolId:uw()},u=a.adminOnlyRequests,d=s.maxFriends>0;if(!su(c.gradeId))return(0,pr.jsx)(Ml,{to:"/",replace:!0});const h={solution:c,adminOnly:u};return(0,pr.jsx)(Vm,{query:q,variables:h,fetchPolicy:"network-only",children:({loading:t,error:n,data:r,refetch:o})=>{if(t)return(0,pr.jsx)(qk,{});if(n&&(!su(n.message)||!n.message.includes(yF)))return(0,pr.jsx)(eN,{error:n,refetch:o});const i=[{query:q,variables:{solution:c}}];return(0,pr.jsx)(wQ,{data:ou(r,"solution"),activeGradeId:c.gradeId,refetchQueries:i,adminMode:u,friendPreferences:d,refetch:o,solverMode:N$,showTeachers:s.showTeachersInSolver,showTeacherRequests:!0,showStudentRequests:!0,showMetrics:!0,showCharacteristics:!0,showFriendships:!0,...e})}},JSON.stringify(h))})),KQ=ng()(eg(yt,{name:"studentImportMatchers"}),eg(bt,{name:"schoolUploads",options:({studentImportMatchers:e})=>{const t=[...e.studentsImport.columns];return{fetchPolicy:"network-only",errorPolicy:"all",variables:{schoolId:uw(),columnMap:t}}}}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeLeaving:!0},fetchPolicy:"network-only"}),name:"schoolGrades"}),eg(wt,{name:"updateBulkUploadJob"}),eg(vt,{name:"updateStudentImportMatchers"}),eg(xt,{name:"importUploadedFileFromJob"}))((e=>{const{schoolGrades:t,studentImportMatchers:n,...r}=e,o=vl();if(hw(e))return(0,pr.jsx)(qk,{});const{job:i}=vC(e.schoolUploads,"STUDENT");if(!i)return(0,pr.jsx)(Ml,{to:"/Students",replace:!0});let s;return s=n&&n.studentsImport.grades.length?n.studentsImport.grades:i.fileSummary.grades,(0,pr.jsx)(e_,{matchingGrades:s,schoolGrades:t.currentSchoolGrades,currentUploadJob:i,knownWarnings:bC,navigate:o,...r})})),XQ=ng()(eg(bt,{options:()=>({fetchPolicy:"network-only",errorPolicy:"all",variables:{schoolId:uw()}}),name:"schoolUploads"}),eg(vt,{name:"updateStudentImportMatchers"}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0}}),name:"currentSchoolGrades"}),eg(wt,{name:"updateBulkUploadJob"}))((e=>{if(hw(e))return(0,pr.jsx)(qk,{});const{job:t}=vC(e.schoolUploads,"STUDENT");return t?(0,pr.jsx)(t_,{...e,currentUploadJob:t}):(0,pr.jsx)(Ml,{to:"/Students",replace:!0})})),ZQ=e=>{const t=vl(),{currentUploadJob:n,updateBulkUploadJob:r,updateStudentImportMatchers:i}=e,{fileSummary:s}=n,a=o.useMemo((()=>({student_code:["student id","student_code","eq id","eq_id"],first_name:["first name","f name","fname","given name","first_name","firstname"],last_name:["last name","l name","lname","surname","last_name","family name","lastname"],gender:["gender","sex"],current_grade:["current grade","curr. grade","curr grade","current_grade","year"],current_class:["current class","curr. class","curr class","current_class","roll class"]})),[]),l=o.useMemo((()=>({student_code:"Student ID",first_name:"First Name",last_name:"Last Name",gender:"Gender",current_grade:"Current Grade",current_class:{label:"Current Class",tooltip:"e.g. 1A or 1 Mrs Smith"}})),[]),[c,u]=o.useState((()=>{const e={};return Object.keys(l).forEach((t=>{const n=a[t];s.headers.forEach((r=>{const o=r.toLowerCase(),i=o.replace(/\s/g,"");(n.includes(r)||n.includes(o)||n.includes(i)||n.some((e=>{var t=new RegExp(`${e}`,"i");return r.match(t)})))&&(e[t]=r)}))})),e})),[d,h]=o.useState(!1),[p,f]=o.useState(!1),m=o.useMemo((()=>{const e=Object.keys(c),t=Object.keys(l),n=Object.values(c),r=new Set(n).size===n.length;return!!(e.length>=t.length&&r)&&t.every((t=>e.includes(t)))}),[c,l]),g=o.useCallback((()=>{h((e=>!e))}),[]),v=o.useCallback((({selectedOption:e,mapTo:t})=>{f(!0),u((n=>({...n,[t]:e})))}),[]),y=o.useCallback((e=>{u((t=>(delete t[e],{...t})))}),[]),b=o.useCallback((()=>{const e={jobParams:{id:n.id,type:n.type,status:"CANCELLED"}};r({variables:e}).then((()=>{i({variables:{newMatchers:{grades:[],columns:[]}}}).then((()=>{t("/Students")}))}))}),[r,i,t,n.id,n.type]),x=o.useCallback((()=>{const e=Object.keys(c).map((e=>({columnNameInFile:c[e],columnName:e})));return i({variables:{newMatchers:{columns:e}}}).then((()=>{t("/Students/Upload/IdChangeWarning")}))}),[i,c,t]);return o.useEffect((()=>{m&&!p&&x()}),[m,p,x]),(0,pr.jsx)(Vk,{importType:"Students",handleToggleHelpModal:g,showHelpModal:d,uploadJob:n,requiredColumns:l,mappedColumns:c,options:s.headers,handleColumnMapped:v,handleColumnClear:y,isMappingComplete:m,isUpdatingJob:!m,handleContinue:x,handleCancel:b})},eJ=ng()(eg(wt,{name:"updateBulkUploadJob"}),eg(bt,{name:"schoolUploads",options:()=>({fetchPolicy:"network-only",errorPolicy:"all",variables:{schoolId:uw()}})}),eg(vt,{name:"updateStudentImportMatchers"}))((e=>{if(hw(e))return(0,pr.jsx)(qk,{});const{job:t}=vC(e.schoolUploads,"STUDENT");return t?(0,pr.jsx)(ZQ,{...e,currentUploadJob:t}):(0,pr.jsx)(Ml,{to:"/Students",replace:!0})})),tJ="%[a-f0-9]{2}",nJ=new RegExp("("+tJ+")|([^%]+?)","gi"),rJ=new RegExp("("+tJ+")+","gi");function oJ(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],oJ(n),oJ(r))}function iJ(e){try{return decodeURIComponent(e)}catch{let t=e.match(nJ)||[];for(let n=1;n<t.length;n++)t=(e=oJ(t,n).join("")).match(nJ)||[];return e}}function sJ(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"};let n=rJ.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const e=iJ(n[0]);e!==n[0]&&(t[n[0]]=e)}n=rJ.exec(e)}t["%C2"]="\ufffd";const r=Object.keys(t);for(const o of r)e=e.replace(new RegExp(o,"g"),t[o]);return e}(e)}}function aJ(e,t){if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function lJ(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);t?.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,r);if(o.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,o)}}return n}const cJ=e=>null===e||void 0===e,uJ=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),dJ=Symbol("encodeFragmentIdentifier");function hJ(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function pJ(e,t){return t.encode?t.strict?uJ(e):encodeURIComponent(e):e}function fJ(e,t){return t.decode?sJ(e):e}function mJ(e){return Array.isArray(e)?e.sort():"object"===typeof e?mJ(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function gJ(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function vJ(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function yJ(e){const t=(e=gJ(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function bJ(e,t){hJ((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"===typeof n&&n.includes(e.arrayFormatSeparator),i="string"===typeof n&&!o&&fJ(n,e).includes(e.arrayFormatSeparator);n=i?fJ(n,e):n;const s=o||i?n.split(e.arrayFormatSeparator).map((t=>fJ(t,e))):null===n?n:fJ(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const o=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!o)return void(r[t]=n?fJ(n,e):n);const i=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>fJ(t,e)));void 0!==r[t]?r[t]=[...r[t],...i]:r[t]=i};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;const e=t.decode?o.replaceAll("+"," "):o;let[i,s]=aJ(e,"=");void 0===i&&(i=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:fJ(s,t),n(fJ(i,t),s,r)}for(const[o,i]of Object.entries(r))if("object"===typeof i&&null!==i)for(const[e,n]of Object.entries(i))i[e]=vJ(n,t);else r[o]=vJ(i,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?mJ(n):n,e}),Object.create(null))}function xJ(e,t){if(!e)return"";hJ((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&cJ(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[pJ(t,e),"[",o,"]"].join("")]:[...n,[pJ(t,e),"[",pJ(o,e),"]=",pJ(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[pJ(t,e),"[]"].join("")]:[...n,[pJ(t,e),"[]=",pJ(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[pJ(t,e),":list="].join("")]:[...n,[pJ(t,e),":list=",pJ(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[pJ(n,e),t,pJ(o,e)].join("")]:[[r,pJ(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,pJ(t,e)]:[...n,[pJ(t,e),"=",pJ(r,e)].join("")]}}(t),o={};for(const[s,a]of Object.entries(e))n(s)||(o[s]=a);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map((n=>{const o=e[n];return void 0===o?"":null===o?pJ(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?pJ(n,t)+"[]":o.reduce(r(n),[]).join("&"):pJ(n,t)+"="+pJ(o,t)})).filter((e=>e.length>0)).join("&")}function wJ(e,t){t={decode:!0,...t};let[n,r]=aJ(e,"#");return void 0===n&&(n=e),{url:n?.split("?")?.[0]??"",query:bJ(yJ(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:fJ(r,t)}:{}}}function SJ(e,t){t={encode:!0,strict:!0,[dJ]:!0,...t};const n=gJ(e.url).split("?")[0]||"";let r=xJ({...bJ(yJ(e.url),{sort:!1}),...e.query},t);r&&=`?${r}`;let o=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if("string"===typeof e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,o=t[dJ]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${r}${o}`}function CJ(e,t,n){n={parseFragmentIdentifier:!0,[dJ]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=wJ(e,n);return SJ({url:r,query:lJ(o,t),fragmentIdentifier:i},n)}function jJ(e,t,n){return CJ(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const _J=r,kJ=ng()(eg(O,{name:"userProfileQuery"}),eg(bt,{options:()=>({fetchPolicy:"network-only",errorPolicy:"all",variables:{schoolId:uw()}}),name:"schoolUploadsQuery"}),eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(me,{options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"}),name:"studentsQuery"}),eg(Mw,{skip:()=>null===uw(),options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"}),name:"dashboardQuery"}),eg(Dw,{options:()=>({variables:{schoolId:uw()}}),name:"characteristicsQuery"}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),name:"preferencesQuery"}),eg(gg,{options:()=>({variables:{schoolId:uw()}}),name:"activeCurrentClassesQuery"}),eg(mg,{options:()=>({variables:{schoolId:uw()}}),name:"newClassesQuery"}),eg(Le,{options:()=>({variables:{schoolId:uw()}}),name:"schoolWithSisQuery"}),eg(wg,{options:()=>({variables:{schoolId:uw()}}),name:"schoolGradesWithSolutionsQuery"}),eg(yg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0},fetchPolicy:"network-only"}),name:"currentSchoolGradesQuery"}),eg(vg,{options:()=>({variables:{schoolId:uw(),includeNew:!0,includeLeaving:!0},fetchPolicy:"network-only"}),name:"newSchoolGradesQuery"}),eg(ke,{props:({data:{studentFlags:e}})=>({studentFlags:e})}),eg(xe,{name:"createOrUpdateInactiveStudentMutation"}),eg(_e,{name:"bulkUploadStudentsMutation"}))((e=>{const{activeCurrentClassesQuery:{activeCurrentClasses:t},bulkUploadStudentsMutation:n,characteristicsQuery:{schoolCharacteristics:r},createOrUpdateInactiveStudentMutation:i,currentSchoolGradesQuery:{currentSchoolGrades:s},dashboardQuery:{dashboard:a},newClassesQuery:{newClasses:l},newSchoolGradesQuery:{newSchoolGrades:c},preferencesQuery:{schoolSettings:u},schoolGradesWithSolutionsQuery:{schoolGradesWithSolutions:d},schoolUploadsQuery:h,schoolWithSisQuery:{school:p},settings:f,studentFlags:m,studentsQuery:{students:g},userProfileQuery:{myprofile:v}}=e,[y,b]=(0,o.useState)(),{cancel:[x]}=bE(y),w=vl(),S=ml(),C=Pm(),{data:j}=Gm(Ae),_=_J.parse(S.search);if(_.filterId&&C.writeQuery({query:Ae,data:{studentPage:{__typename:"studentPage",filterId:_.filterId}}}),aw(Dw.error),hw(e))return(0,pr.jsx)(qk,{});const{job:k,error:N}=vC(h,"STUDENT");if(k&&N){if(!y)return b(k.id),(0,pr.jsx)(qk,{});x()}else if(k)return(0,pr.jsx)(Ml,{to:"/Students/Upload/Columns",replace:!0});const{job:E,error:T}=vC(h,"STUDENT_CHARACTERISTIC");if(E&&T){if(!y)return b(E.id),(0,pr.jsx)(qk,{});x()}else if(E){const e=E.id;return(0,pr.jsx)(Ml,{to:"/Students/Characteristics/MapColumns",state:{jobId:e},replace:!0})}const O=j&&j.studentPage.filterId||null;return(0,pr.jsx)(UC,{bulkUploadStudentsMutation:n,createOrUpdateInactiveStudentMutation:i,currentClasses:t,currentSchoolGrades:s,dashboard:a,location:S,navigate:w,newClasses:l,newSchoolGrades:c,school:p,schoolCharacteristics:r,schoolGradesWithSolutions:d,schoolSettings:u,selectedFilterId:O,setFilterId:e=>{const t=new URLSearchParams({filterId:e}).toString();w({search:t})},settings:f,studentFlags:m,studentsData:g,user:v})})),NJ=ng()(eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(yt,{name:"studentImportMatchers"}),eg(Mw,{name:"dashboard",skip:()=>null===uw(),options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"})}),eg(bt,{name:"schoolUploads",options:({studentImportMatchers:e})=>{const t=[...e.studentsImport.columns];return{fetchPolicy:"network-only",errorPolicy:"all",variables:{schoolId:uw(),columnMap:t}}}}))((e=>{const t=vl(),[n]=Km(wt),r=(0,o.useCallback)((()=>t("/Students/Upload/Grades")),[t]);if(hw(e))return(0,pr.jsx)(qk,{});const{job:i}=vC(e.schoolUploads,"STUDENT");if(!i)return(0,pr.jsx)(Ml,{to:"/Students",replace:!0});const{dashboard:s}=e,a=i.fileSummary.existingStudents.length,l=s.studentCount,c=s.inactiveStudentCount,u=0===a&&0===l&&c>50;if(!u)return(0,pr.jsx)(Ml,{to:"/Students/Upload/Grades"});const d=()=>{const e={jobParams:{id:i.id,type:i.type,status:"CANCELLED"}};n({variables:e}).then((()=>{t("/Students")}))};return u?(0,pr.jsx)(n_,{currentUploadJob:i,handleContinue:r,handleCancel:d}):null})),EJ=e=>e?`${e.id} - ${e.stateCode}, ${e.suburb} - ${e.name}`:"";class TJ extends o.Component{constructor(e){super(e),this.toggleDeleteSchoolModal=()=>{this.setState({deleteSchoolModal:{}})},this.onChange=(e,t)=>{const{updateSchoolSettingMutation:n,preferencesQuery:r,school:o}=this.props,i={schoolId:o.id,[e.target.name]:!t};this.setState({loading:!0}),n({variables:{schoolSettingParams:i},refetchQueries:[{query:r,variables:{schoolId:o.id}}]}).then((()=>{setTimeout((()=>{this.setState({loading:!1})}),500)})).catch((e=>{aw(e),this.setState({loading:!1})}))},this.onIntegerSchoolSettingChange=e=>{const{updateSchoolSettingMutation:t,preferencesQuery:n,school:r}=this.props,o={schoolId:r.id,[e.target.name]:parseInt(e.target.value)};this.setState({loading:!0}),t({variables:{schoolSettingParams:o},refetchQueries:[{query:n,variables:{schoolId:r.id}}]}).then((()=>{setTimeout((()=>{this.setState({loading:!1})}),500)})).catch((e=>{aw(e),this.setState({loading:!1})}))},this.onDeleteButtonClick=()=>{const{school:e}=this.props;this.setState({deleteSchoolModal:{heading:"Delete WHOLE School?",text:`This will permanently delete the "${EJ(e)}" school and everything associated with it. Are you sure you want to continue?`,onClick:this.deleteSchool}})},this.onRemoveDataButtonClick=()=>{const{school:e}=this.props;this.setState({deleteSchoolModal:{heading:"Delete School's Data?",text:`This will delete the data for "${EJ(e)}". Are you sure you want to continue?`,onClick:this.deleteSchoolData}})},this.deleteSchool=()=>{const{deleteSchoolMutation:e,school:{id:t}}=this.props;this.setState({loading:!0}),e({variables:{schoolId:t}}).then((()=>{this.setState({loading:!1,deleteSchoolModal:{}}),sessionStorage.removeItem(Ht),window.location.href="/"})).catch((()=>{this.setState({loading:!1,errors:{deleteSchool:"Network Error"}})}))},this.deleteSchoolData=()=>{const{deleteSchoolDataMutation:e,school:{id:t}}=this.props;this.setState({loading:!0}),e({variables:{schoolId:t}}).then((()=>{this.setState({loading:!1,deleteSchoolModal:{}}),window.location.reload()})).catch((()=>{this.setState({loading:!1,errors:{deleteSchool:"Network Error"}})}))},this.state={loading:!1,errors:{},deleteSchoolModal:{}}}render(){const{myprofile:e={},schoolSettings:t,school:n={},rollOverData:r,deactivateAllStudentsMutation:o}=this.props,{loading:i,deleteSchoolModal:s,errors:a}=this.state;return(0,pr.jsxs)("div",{className:"container "+(i?"cursor-wait":""),children:[(0,pr.jsx)("div",{className:"pt-5",children:(0,pr.jsx)(kw,{isSuper:!0})}),(0,pr.jsx)(Uw,{isSuper:uS(e.role),school:n}),(0,pr.jsx)(P_,{rollOverDataMutation:r,deactivateAllStudentsMutation:o,isSuper:uS(e.role)}),(0,pr.jsx)(D_,{onRemoveDataButtonClick:this.onRemoveDataButtonClick,onDeleteButtonClick:this.onDeleteButtonClick,toggleDeleteSchoolModal:this.toggleDeleteSchoolModal,deleteSchoolModal:s,loading:i,error:a.deleteSchool,isSuper:uS(e.role)}),(0,pr.jsx)(rS,{}),(0,pr.jsxs)("div",{className:"u-content-border-bottom pb-4",children:[(0,pr.jsx)("h2",{className:"mb-5 mt-5 u-blue-primary",children:"Preferences"}),(0,pr.jsx)(k_,{id:"newAccountLock",name:"newAccountLock",title:"Blind Ding Lock",description:"Apply Blind Ding lock which prevents users proceeding past Step 1",checked:t.newAccountLock,onChangeHandler:e=>this.onChange(e,t.newAccountLock)}),(0,pr.jsx)(k_,{id:"overrideSolverLock",name:"overrideSolverLock",title:"Solver Lock",description:"Apply the Solver lock for this school",checked:!t.overrideSolverLock,onChangeHandler:e=>this.onChange(e,t.overrideSolverLock)}),(0,pr.jsx)(k_,{id:"autoServicing",name:"autoServicing",title:"Auto Servicing",description:"Turn on Auto Servicing",checked:t.autoServicing,onChangeHandler:e=>this.onChange(e,t.autoServicing)}),(0,pr.jsx)(k_,{id:"requireOtp",name:"requireOtp",title:"Turn on One-Time Passwords",description:"Whether this school uses One-Time Passwords",checked:t.requireOtp,onChangeHandler:e=>this.onChange(e,t.requireOtp)}),(0,pr.jsx)(k_,{id:"requireMfa",name:"requireMfa",title:"Require Multi-Factor Authentication (MFA)",description:"Whether this school requires MFA",checked:t.requireMfa,onChangeHandler:e=>this.onChange(e,t.requireMfa)}),(0,pr.jsx)(k_,{id:"autoRollover",name:"autoRollover",title:"Whether to automatically rollover this school",description:"Sets the auto rollover",checked:t.autoRollover,onChangeHandler:e=>this.onChange(e,t.autoRollover)}),(0,pr.jsx)(k_,{id:"allowWritableSharedSolutions",name:"allowWritableSharedSolutions",title:"Allow editable shared solutions",description:"Allows the school to share editable shared solutions",checked:t.allowWritableSharedSolutions,onChangeHandler:e=>this.onChange(e,t.allowWritableSharedSolutions)}),(0,pr.jsx)(k_,{id:"currentClassAsCharacteristic",name:"currentClassAsCharacteristic",title:"Current Class as characteristic",description:"Use the current class as a characteristic in solutions",checked:t.currentClassAsCharacteristic,onChangeHandler:e=>this.onChange(e,t.currentClassAsCharacteristic)}),(0,pr.jsx)(k_,{id:"depersonaliseStudents",name:"depersonaliseStudents",title:"Depersonalise Student Data",description:"Turn on Depersonalise Student Data",checked:t.depersonaliseStudents,onChangeHandler:e=>this.onChange(e,t.depersonaliseStudents)}),(0,pr.jsxs)("div",{className:"mb-3",children:[(0,pr.jsx)("p",{className:"mb-0",children:"Minimum Friend Preferences"}),(0,pr.jsx)(Zg,{type:"number",name:"minFriendPrefs",onChange:this.onIntegerSchoolSettingChange,value:t.minFriendPrefs,min:1})]}),(0,pr.jsxs)("div",{className:"mb-3",children:[(0,pr.jsx)("p",{className:"mb-0",children:"Current Class Characteristic Priority"}),(0,pr.jsx)(Zg,{type:"number",name:"currentClassCharacteristicPriority",onChange:this.onIntegerSchoolSettingChange,value:t.currentClassCharacteristicPriority,min:1,disabled:!t.currentClassAsCharacteristic})]}),(0,pr.jsxs)("div",{className:"mb-3",children:[(0,pr.jsx)("p",{className:"mb-0",children:"Current Class Characteristic Minimum Count"}),(0,pr.jsx)(Zg,{type:"number",name:"currentClassCharacteristicMinRc",onChange:this.onIntegerSchoolSettingChange,value:t.currentClassCharacteristicMinRc,min:1,disabled:!t.currentClassAsCharacteristic})]}),(0,pr.jsxs)("div",{className:"mb-3",children:[(0,pr.jsx)("p",{className:"mb-0",children:"Minimum Student ID Length (adds zeroes to the front of numeric IDs that don't meet this length when exporting)."}),(0,pr.jsx)(Zg,{type:"number",name:"minStudentCodeLength",onChange:this.onIntegerSchoolSettingChange,value:t.minStudentCodeLength,min:0})]})]}),(0,pr.jsx)(S_,{schoolId:n.id}),(0,pr.jsx)(p_,{schoolId:n.id,isSuper:uS(e.role)}),uS(e.role)&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Hw,{}),(0,pr.jsx)(U_,{myprofile:e,isSuper:uS(e.role)})]})]})}}class OJ extends o.Component{render(){const{loadingPreferences:e,loadingSchool:t,myprofile:n,createOrUpdateUserMutation:r,updateSchoolSettingMutation:o,deleteSchoolMutation:i,deleteSchoolDataMutation:s,schoolSettings:a,school:l,rollOverData:c,deactivateAllStudentsMutation:u}=this.props;return cS(n.role)?e||t?(0,pr.jsx)(qk,{}):(0,pr.jsx)(TJ,{myprofile:n,createOrUpdateUserMutation:r,updateSchoolSettingMutation:o,schoolSettings:a,preferencesQuery:Ge,school:l,deleteSchoolDataMutation:s,deleteSchoolMutation:i,rollOverData:c,deactivateAllStudentsMutation:u}):(0,pr.jsx)(Ml,{to:"/",replace:!0})}}const IJ=ng()(eg(O,{props:({data:{myprofile:e}})=>({myprofile:e})}),eg(Ve,{name:"createOrUpdateUserMutation"}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{schoolSettings:e,loading:t}})=>({loadingPreferences:t,schoolSettings:e})}),eg(qe,{name:"updateSchoolSettingMutation"}),eg(Be,{options:()=>({variables:{schoolId:uw()}}),props:({data:{school:e,loading:t}})=>({loadingSchool:t,school:e})}),eg(Je,{name:"deleteSchoolMutation"}),eg(Xe,{name:"deleteSchoolDataMutation"}),eg(tt,{name:"rollOverData",options:()=>({variables:{schoolId:uw()},refetchQueries:[{query:Nw,variables:{adminOnly:!0,schoolId:uw()}},{query:TC,variables:{schoolId:uw()}}]})}),eg(De,{name:"deactivateAllStudentsMutation",options:()=>({variables:{schoolId:uw()}})}))(OJ);class RJ extends o.Component{constructor(){super(),this.toggle=()=>{this.setState({studentModal:!this.state.studentModal})},this.toggleCaution=()=>{this.setState({caution:!this.state.caution})},this.onSearchChange=e=>{void 0===e?this.setState({searchValue:""}):this.setState({searchValue:e.target.value})},this.onRowClick=e=>{this.setState({studentModal:!0,studentId:e})},this.onAddRequestClick=e=>{this.setState({studentModal:!0,studentId:e})},this.logOut=()=>{localStorage.clear(),sessionStorage.clear(),this.props.client.resetStore(),window.location.reload()},this.onCompleteSurvey=()=>{const{closeOrOpenTeacherSurveyMutation:e,teacherId:t}=this.props,n={surveyCloseOpenParams:{teacherId:t,completed:!0}};this.setState({loading:!0}),e({variables:n}).then((()=>{this.setState({loading:!1}),this.logOut()})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could not mark survey as complete"}})}))},this.nextStudent=()=>{const{surveyStudents:e}=this.props,{studentId:t}=this.state,n=e.findIndex((e=>e.id===t)),r=e[n===e.length-1?0:n+1];this.setState({studentId:r.id})},this.prevStudent=()=>{const{surveyStudents:e}=this.props,{studentId:t}=this.state,n=e.findIndex((e=>e.id===t)),r=e[0===n?e.length-1:n-1];this.setState({studentId:r.id})},this.toggleShowSurveyInstructionsVideo=()=>{this.setState((e=>({...e,showSurveyInstructionsVideo:!e.showSurveyInstructionsVideo})))},this.state={studentModal:!1,caution:!1,studentId:"",searchValue:"",errors:{},showSurveyInstructionsVideo:!1}}render(){const{surveyStudents:e,loadingOne:t,loadingTwo:n,schoolSettings:r,schoolCharacteristics:o,refetchQueries:i}=this.props,{loading:s,errors:a,studentId:l,studentModal:c,searchValue:u,caution:d}=this.state;if(s||t||n)return(0,pr.jsx)(qk,{});const h=""===u?Array.from(e):Array.from(e).filter((e=>[e.firstName,e.lastName,e.studentCode].join(" ").toLowerCase().includes(u.toLowerCase())));$S(h);const p=r.teachersToAddTeacherRequests||r.teachersToAddStudentRequests?"https://player.vimeo.com/video/288935385?h=5f42cb74c3":"https://player.vimeo.com/video/288935635?h=73cbddefd6";return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"u-row-fix",children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100 py-2 px-3",children:[(0,pr.jsx)(ld,{color:"primary",onClick:this.toggleCaution,children:"Mark Survey complete"}),(0,pr.jsx)($k,{text:a.mutation}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{style:{justifyContent:"space-between",display:"flex"},children:[(0,pr.jsx)("i",{className:"fa fa-info-circle color-blue-mid mt-3","data-tooltip-id":"survey-info"}),(0,pr.jsx)("b",{className:"d-block align-middle color-blue-mid mx-2 mt-2 survey-learn-more",children:"Instructions: Learn more"}),(0,pr.jsx)(iN,{onChange:this.onSearchChange,value:u,placeholder:"Search students..."}),(0,pr.jsxs)(kf,{style:{},"data-tooltip-id":"survey-info",className:"survey-tooltip",id:"survey-info",variant:"light",clickable:!0,opacity:1,children:[(0,pr.jsxs)("div",{className:"d-flex flex-row justify-content-between",children:[(0,pr.jsx)("b",{children:"INSTRUCTIONS:"}),(0,pr.jsxs)("a",{className:"d-block mb-3 color-blue-mid",onClick:this.toggleShowSurveyInstructionsVideo,children:[(0,pr.jsx)("i",{className:"fa fa-play ml-2 mr-1 color-blue-mid"}),"Watch Video"]})]}),(0,pr.jsx)("p",{className:"",children:"Click on each student and then 'Edit' their details."}),(0,pr.jsx)("p",{children:"Your responses are automatically saved as you go, and you don't need to finish the survey in one session."}),(0,pr.jsx)("p",{children:"Once you have completed the survey for all students click 'Mark Survey Complete'. This will notify your Administrator that you have finished."}),(0,pr.jsx)("p",{children:"You will not be able to access the survey after you have clicked 'Mark Survey complete\u2019. However your Administrator can resend a link to your Survey if required."})]})]})})]}),(0,pr.jsx)(KC,{teacherMode:!0,teacherRequestsEditable:r.teachersToAddTeacherRequests,studentRequestsEditable:r.teachersToAddStudentRequests,students:h,onAddRequestClick:this.onAddRequestClick,maxFriends:r.maxFriends,schoolCharacteristics:o,onRowClick:this.onRowClick}),(0,pr.jsxs)("span",{className:"c-students__total",children:["Total - ",e.length," Students"]}),this.state.showSurveyInstructionsVideo&&(0,pr.jsx)(vN,{toggle:this.toggleShowSurveyInstructionsVideo,videoUrl:p,title:"Survey Instructions"}),(0,pr.jsx)(Qf,{isOpen:d,toggle:this.toggleCaution,heading:"Mark As Complete?",text:"Are you sure you want to mark this survey as complete? The survey will only be accessible by the school administrator afterward.",buttonText:"Yes",onButtonClick:this.onCompleteSurvey}),(0,pr.jsx)(uj,{studentEditable:!0,showFriendships:!0,friendshipEditable:!0,showCharacteristics:!0,characteristicsEditable:!0,teacherRequestsEditable:r.teachersToAddTeacherRequests,studentRequestsEditable:r.teachersToAddStudentRequests,showTeacherRequests:r.teachersToAddTeacherRequests,showStudentRequests:r.teachersToAddStudentRequests,isOpen:c,studentId:l,toggle:this.toggle,refetchQueries:i,isTeacher:!0,nextStudent:this.nextStudent,prevStudent:this.prevStudent})]}),(0,pr.jsx)(YD,{className:"ml-0"})]})}}class AJ extends o.Component{render(){const{teacherId:e,client:t,schoolCharacteristics:n,schoolSettings:r,loadingOne:o,loadingTwo:i,createOrUpdateStudentMutation:s,closeOrOpenTeacherSurveyMutation:a,school:l,loadingSchool:c}=this.props,u=void 0!==r&&r.adminOnlyRequests;return(0,pr.jsx)(Vm,{query:fe,variables:{teacherId:e,adminOnly:u},children:({loading:d,error:h,data:p,refetch:f})=>{if(d||o||i||c)return(0,pr.jsx)(qk,{});if(h)return(0,pr.jsx)(eN,{error:h,refetch:f});const{surveyStudents:m}=p,g=[{query:fe,variables:{teacherId:e,adminOnly:u}}];return(0,pr.jsx)(jw,{school:l,children:(0,pr.jsx)(RJ,{teacherId:e,client:t,surveyStudents:m||[],schoolSettings:r,schoolCharacteristics:n,createOrUpdateStudentMutation:s,closeOrOpenTeacherSurveyMutation:a,refetchQueries:g})})}})}}const MJ=ng()(eg(Dw,{options:()=>({variables:{schoolId:sessionStorage.getItem(Ht)}}),props:({data:{loading:e,schoolCharacteristics:t}})=>({loadingOne:e,schoolCharacteristics:t})}),eg(Ge,{options:()=>({variables:{schoolId:sessionStorage.getItem(Ht)}}),props:({data:{loading:e,schoolSettings:t}})=>({loadingTwo:e,schoolSettings:t})}),eg(Fe,{options:()=>({variables:{schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{loading:e,school:t}})=>({loadingSchool:e,school:t})}),eg(be,{name:"createOrUpdateStudentMutation"}),eg(cg,{name:"closeOrOpenTeacherSurveyMutation"}))(lj(AJ));class PJ extends o.Component{constructor(e){super(e),this.toggleSuccessModal=()=>{this.setState({successModal:!this.state.successModal})},this.openVideo=()=>{this.setState({showVideo:!0})},this.closeVideo=()=>{this.setState({showVideo:!1})},this.transformClass=e=>({id:e.id,label:e.label,value:e.id}),this.handleClassChange=e=>this.setState({allocatedClasses:e}),this.handleInviteMessageChange=(e,t)=>{const n=e.target.value;this.setState({inviteMessage:n}),t(n)},this.handleRestrictedCheckboxChange=e=>{this.setState({restricted:e.target.checked},(()=>{this.updateSurveysWithNoNotification()}))},this.sendInvites=()=>{const{inviteTeachersToSurveysMutation:e,teacher:t,ccList:n,schoolId:r,toggle:o}=this.props,{inviteMessage:i,allocatedClasses:s,restricted:a}=this.state;this.setState({loading:!0});const l={teacherId:t.id,currentClassIds:s.map((e=>e.id))},c=pw(s);e({variables:{message:i,classAssignments:l,ccList:n,schoolId:r,restricted:a},refetchQueries:[{query:rg,variables:{schoolId:r}}]}).then((()=>{this.setState({loading:!1}),c?this.toggleSuccessModal():o()})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"There was an error, please try again"}})}))},this.updateSurveysWithNoNotification=()=>{const{inviteTeachersToSurveysMutation:e,teacher:t,ccList:n,schoolId:r}=this.props,{inviteMessage:o,allocatedClasses:i,restricted:s}=this.state;e({variables:{message:o,classAssignments:{teacherId:t.id,currentClassIds:i.map((e=>e.id))},ccList:n,schoolId:r,restricted:s,sendNotification:!1},refetchQueries:[{query:rg,variables:{schoolId:r}}]}).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"There was an error, please try again"}})}))};const{teacher:t,inviteMessage:n}=this.props,r=pw(t.allocatedClasses)?t.allocatedClasses:t.currentClasses;this.state={successModal:!1,showVideo:!1,allocatedClasses:r.map(this.transformClass),inviteMessage:n,errors:{},restricted:t.restricted}}render(){const{toggle:e,classes:t,changeInviteMessage:n,teacher:r,feederSchool:o}=this.props,{loading:i,showVideo:s,errors:a,allocatedClasses:l,inviteMessage:c,restricted:u}=this.state,d=t.map(this.transformClass),h=`${r.firstName} ${r.lastName}`,p=su(r.email),f=pw(l),m=r.restricted||o;return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:`Invite ${h} to complete survey`,toggle:e,toggle2:this.openVideo,className:"px-5 py-4"}),i?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-5 py-4",children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)(Qg,{className:"c-teachers-invite-modal__text pb-2",children:"MESSAGE"}),m&&(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Qg,{children:[(0,pr.jsx)(Zg,{type:"checkbox",id:"restricted",name:"restricted",checked:u,onChange:this.handleRestrictedCheckboxChange}),"Feeder School Survey"]}),(0,pr.jsx)(eK,{id:"inviteSingleTeacherRestrictedSurveyTooltip"})]})]}),(0,pr.jsx)(Zg,{type:"textarea",className:"c-teachers-invite-modal__message",name:"message",value:c,rows:12,onChange:e=>this.handleInviteMessageChange(e,n)})]}),(0,pr.jsx)(Gg,{children:(0,pr.jsxs)(rv,{children:[(0,pr.jsx)(Qg,{className:"c-teachers-invite-modal__text pb-2",children:"ASSIGNED CLASSES"}),(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:"Select class(es)",options:d,value:l,onChange:this.handleClassChange,closeMenuOnSelect:!1,isMulti:!0,styles:fN})]})}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-end mt-3",children:[(0,pr.jsx)(Ef,{onCancelClick:e,onButtonClick:this.sendInvites,buttonText:"Send Survey",disabled:!p||!f}),(0,pr.jsx)($k,{text:a.mutation}),p||(0,pr.jsx)($k,{text:"Teacher is missing an email"})]})]})]}),this.state.successModal&&(0,pr.jsx)(aN,{isOpen:!0,toggle:e,heading:"Survey invite has been sent to the teacher",text:"A copy of the invite has also been sent to Administrators."}),s&&(0,pr.jsx)(vN,{toggle:this.closeVideo,videoUrl:ZS,title:"Instruction Step 1"})]})}}const DJ=eg(dg,{name:"inviteTeachersToSurveysMutation"})(PJ),FJ=({toggle:e,navToCharacteristics:t})=>{const[n,r]=(0,o.useState)(!1),i=()=>{r(!n)};return(0,pr.jsxs)("div",{className:"c-teachers-invite",children:[(0,pr.jsx)(Fg,{children:(0,pr.jsx)("span",{className:"c-teachers-invite__heading",children:"SURVEY"})}),(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-column justify-content-center align-items-center",children:[(0,pr.jsx)("h1",{children:"Invite teachers to complete Survey"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",onClick:i,children:[(0,pr.jsx)("i",{className:"fa fa-play mr-2"}),"Watch Video"]}),(0,pr.jsxs)("div",{className:"mt-3 w-75 text-center",children:["If you have confirmed the\xa0",(0,pr.jsx)("a",{onClick:t,className:"text-primary",children:"Characteristics"}),"\xa0you would like to use to balance your classes, and all of your students and teachers have been added, it is time to invite your Teachers to complete the Survey."]}),(0,pr.jsx)(ld,{color:"primary",className:"mt-4",onClick:e,children:(0,pr.jsx)("span",{className:"pr-5 pl-5 text-white",children:"Invite Teachers"})}),(0,pr.jsx)("p",{className:"c-text-small pt-2",children:"(You will be asked which teachers before the survey goes out)"})]}),n&&(0,pr.jsx)(vN,{toggle:i,videoUrl:ZS,title:"Instruction Step 1"})]})},LJ=e=>e.map((e=>({...e,label:e.firstName+" "+e.lastName,value:e.id})));class BJ extends o.Component{constructor(e){var t;super(e),this.toggleSuccessModal=()=>{this.setState({successModal:!this.state.successModal})},this.openVideo=()=>{this.setState({showVideo:!0})},this.closeVideo=()=>{this.setState({showVideo:!1})},this.onChange=e=>{this.setState({[e.target.name]:e.target.value})},this.onDataChange=(e,t)=>{const{classes:n}=this.state,r=n.findIndex((e=>e.id===t));n[r]={...n[r],teachers:e||[]},this.setState({classes:n})},this.handleRestrictedCheckboxChange=e=>{this.setState({restricted:e.target.checked})},this.sendInvites=()=>{const{inviteTeachersToSurveysMutation:e,toggle:t,ccList:n,schoolId:r}=this.props,{message:o,classes:i,restricted:s}=this.state;this.setState({loading:!0});if(i.flatMap((({teachers:e})=>e)).some((e=>!e.email)))return void this.setState({loading:!1,errors:{dataError:"Please make sure all teachers have email addresses"}});const a=this.props.classes.reduce(((e,{id:t,teachers:n})=>n.reduce(((e,n)=>({...e,[n.id]:[...e[n.id]||[],t]})),e)),{}),l=i.reduce(((e,{id:t,teachers:n})=>n.reduce(((e,n)=>({...e,[n.id]:[...e[n.id]||[],t]})),e)),{}),c=Object.entries(l).reduce(((e,[t,n])=>[...e,{teacherId:t,currentClassIds:n.concat(a[t]||[])}]),[]);c.length>0?e({variables:{message:o,classAssignments:c,ccList:n,schoolId:r,restricted:s},refetchQueries:[{query:rg,variables:{schoolId:r}}]}).then((()=>{this.setState({loading:!1}),this.toggleSuccessModal(),t()})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"There was an Error, please try again"}})})):this.setState({loading:!1,errors:{noAssignments:"Please assign at least one teacher to one class"}})},this.state={successModal:!1,showVideo:!1,message:this.props.inviteMessage,classes:(t=this.props.classes,t.map((e=>({...e,teachers:[]})))),restricted:!!this.props.feederSchool,errors:{}}}render(){const{isOpen:e,toggle:t,teachers:n}=this.props,{loading:r,showVideo:o,classes:i,errors:s,restricted:a}=this.state;return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Yf,{isOpen:e,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:"Invite Teachers to Survey",toggle:t,toggle2:this.openVideo,className:"px-5 py-4"}),r?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-5 py-4",children:[(0,pr.jsxs)(Gg,{children:[(0,pr.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,pr.jsx)(Qg,{className:"c-teachers-invite-modal__text pb-2",children:"MESSAGE"}),this.props.feederSchool&&(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Qg,{children:[(0,pr.jsx)(Zg,{type:"checkbox",id:"restricted",name:"restricted",checked:a,onChange:this.handleRestrictedCheckboxChange}),"Feeder School Survey"]}),(0,pr.jsx)(eK,{id:"inviteTeachersRestrictedSurveyTooltip"})]})]}),(0,pr.jsx)(Zg,{type:"textarea",className:"c-teachers-invite-modal__message",name:"message",value:this.state.message,rows:12,onChange:this.onChange})]}),(0,pr.jsx)("h3",{className:"c-teachers-invite-modal__text pt-4",children:"ALLOCATE TEACHERS"}),(0,pr.jsx)(GJ,{classes:i,teachers:LJ(n),onDataChange:this.onDataChange}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-end mt-3",children:[(0,pr.jsx)(Ef,{onCancelClick:t,onButtonClick:this.sendInvites,buttonText:"Send Survey"}),(0,pr.jsx)($k,{text:s.noAssignments}),(0,pr.jsx)($k,{text:s.mutation}),(0,pr.jsx)($k,{text:s.dataError})]})]})]}),(0,pr.jsx)(aN,{isOpen:this.state.successModal,toggle:this.toggleSuccessModal,heading:"Survey invite sent to Teachers",text:"A copy of the invite is also sent to Administrators."}),o&&(0,pr.jsx)(vN,{toggle:this.closeVideo,videoUrl:ZS,title:"Instruction Step 1"})]})}}const UJ=eg(dg,{name:"inviteTeachersToSurveysMutation"})(BJ);class GJ extends o.Component{render(){const{classes:e,teachers:t,onDataChange:n}=this.props;return(0,pr.jsx)("div",{className:"c-teachers-invite-table mt-4",children:(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)(Fg,{children:[(0,pr.jsx)(nS,{xs:"2",className:"c-teachers-invite-table__header",children:"Class"}),(0,pr.jsx)(nS,{xs:"2",className:"c-teachers-invite-table__header text-right pr-4",children:"# of Students"}),(0,pr.jsx)(nS,{xs:"4",className:"c-teachers-invite-table__header",children:"Allocated Teachers"})]}),(0,pr.jsx)("div",{className:"c-teachers-invite-table__data-container px-3",children:e.map((e=>(0,pr.jsxs)(Fg,{className:"c-teachers-invite-table__data py-1",children:[(0,pr.jsx)(nS,{xs:"2",children:(0,pr.jsx)(gm,{label:e.label})}),(0,pr.jsx)(nS,{className:"text-right pr-4",xs:"2",children:`${Bh(e.studentCount,"student","students")}`}),(0,pr.jsx)(nS,{xs:"8",children:(0,pr.jsx)(Xx,{name:"teacherId",className:"c-teachers-invite-table__multiselect",placeholder:"Select Teacher(s)",options:t,value:e.teachers,onChange:t=>n(t,e.id),closeMenuOnSelect:!1,isMulti:!0,styles:fN})})]},e.id)))})]})})}}const $J=({toggle:e})=>(0,pr.jsxs)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:[(0,pr.jsx)(Kk,{title:"Updating teachers after rollover",toggle:e,className:"p-3"}),(0,pr.jsx)(Ig,{className:"pb-0 d-flex flex-column align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex justify-content-between mr-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle u-caution-icon mr-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("h2",{children:"How do I update the list?"}),(0,pr.jsxs)("ol",{className:"pl-4",children:[(0,pr.jsx)("li",{className:"mb-2",children:"Delete any teachers who have left the school."}),(0,pr.jsx)("li",{className:"mb-2",children:"Add any teachers who are not listed."}),(0,pr.jsx)("li",{children:"Assign each teacher\u2019s Current Class by clicking on a teacher and selecting \u2018Current Class\u2019 from the dropdown. If they do not teach a homeroom, then leave the current class as \u2019N/A\u2019."})]})]})]})}),(0,pr.jsx)(Yj,{children:(0,pr.jsx)(ld,{color:"link",onClick:e,children:"Close"})})]}),qJ=()=>{const[e,t]=(0,o.useState)(!1),n=()=>t((e=>!e));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"c-modal-note text-center",children:["Your account has been rolled over and the following teachers were found from last year. Please update the list and assign their current classes."," ",(0,pr.jsx)("span",{className:"cursor-pointer text-primary",onClick:n,children:"Learn more"})]}),e&&(0,pr.jsx)($J,{toggle:n})]})},zJ=({firstName:e,lastName:t,email:n,currentClassesToUpdate:r,classOptions:i,onMultiClassSelectChange:s,onChange:a,errors:l,editMode:c})=>{const u=0===r.length,d=i?i.map((e=>({value:e.id,label:e.label}))):[],h=r?r.map((e=>({value:e.value,label:e.label}))):[],p=TQ(n);return(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(Gg,{className:"col sm-6 pl-0",children:[(0,pr.jsx)(Qg,{children:"First Name"}),(0,pr.jsx)(Zg,{type:"text",placeholder:"First Name",value:e,name:"firstName",onChange:a,maxLength:35}),l.firstName&&(0,pr.jsx)($k,{text:l.firstName})]}),(0,pr.jsxs)(Gg,{className:"col sm-6 pl-0",children:[(0,pr.jsx)(Qg,{children:"Last Name"}),(0,pr.jsx)(Zg,{type:"text",placeholder:"Last Name",value:t,name:"lastName",onChange:a,maxLength:35}),l.lastName&&(0,pr.jsx)($k,{text:l.lastName})]})]}),(0,pr.jsxs)(Fg,{children:[(0,pr.jsxs)(Gg,{className:"col-6 pl-0",children:[(0,pr.jsx)(Qg,{children:"Email Address"}),(0,pr.jsx)(Zg,{className:p?"c-teacher-modal-details__teacher-email-generated":"",type:"text",placeholder:"Email Address",value:n,name:"email",onChange:a,maxLength:100}),(0,pr.jsx)("span",{className:"u-text-12 u-grey-mid",children:p&&"[System-generated Email] - Please update with the correct email when available"}),0===n.length&&c&&(0,pr.jsx)($k,{text:"Teacher email cannot be empty"}),l.email&&(0,pr.jsx)($k,{text:l.email})]}),(0,pr.jsxs)(Gg,{className:"col sm-6 pl-0",children:[(0,pr.jsxs)("div",{style:{justifyContent:"space-between",display:"flex"},children:[(0,pr.jsx)(Qg,{children:"Current Class/s (Current School Year)"}),u&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-info-circle color-blue-mid m-2","data-tooltip-id":"optional-info"}),(0,pr.jsxs)(kf,{className:"c-badge-tooltip",style:{zIndex:100},id:"optional-info",variant:"light",opacity:1,children:[(0,pr.jsx)("p",{children:"This drop-down list is automatically created off the Current Class column when students are imported.\xa0"}),(0,pr.jsx)("p",{children:"For example, if there were no students imported with the Current Class \u201c1A\u201d then this class will not be shown in the drop-down list."})]})]})]}),(0,pr.jsx)(rv,{children:(0,pr.jsxs)(o.Fragment,{children:[(0,pr.jsx)(Xx,{className:"c-input__multiselect",placeholder:"Select classes",options:d,value:h,onChange:s,closeMenuOnSelect:!1,isMulti:!0,name:"currentClasses",styles:fN}),l.schoolGrades&&(0,pr.jsx)($k,{text:l.schoolGrades})]})})]})]})]})},VJ=({isOpen:e,toggle:t,loading:n,edit:r,onChange:o,onMultiClassSelectChange:i,teacher:s,classOptions:a,onAddEditClick:l,onDeleteTeacherClick:c,errors:u})=>(0,pr.jsxs)(Yf,{isOpen:e,className:"modal-dialog-centered",children:[(0,pr.jsx)(Kk,{title:(r?"Edit":"Add")+" Teacher",toggle:t,className:"py-4 px-5"}),n?(0,pr.jsx)("div",{className:"position-relative p-5",children:(0,pr.jsx)(qk,{})}):(0,pr.jsxs)(Ig,{className:"px-5",children:[(0,pr.jsx)(zJ,{...s,onChange:o,onMultiClassSelectChange:i,classOptions:a,errors:u,editMode:r}),(0,pr.jsxs)("div",{className:"row my-4 justify-content-end align-items-center",children:[r?(0,pr.jsx)("span",{className:"text-primary col-3 cursor-pointer",onClick:c,children:"Delete Teacher"}):null,(0,pr.jsxs)("div",{className:"col-9 d-flex justify-content-end align-items-center",children:[(0,pr.jsx)("span",{className:"text-primary px-4 cursor-pointer",onClick:t,children:"Cancel"}),(0,pr.jsx)(ld,{className:"ml-2",onClick:()=>l(!0),color:"primary",children:"Save Teacher"}),r?null:(0,pr.jsx)(ld,{className:"ml-2",onClick:()=>l(!1),color:"primary",children:"Save & Add Another Teacher"})]})]}),u.mutation&&(0,pr.jsx)($k,{text:u.mutation})]})]}),HJ="email",WJ="Email must be unique",YJ={id:null,firstName:"",lastName:"",email:"",currentClassesToUpdate:[]};class QJ extends o.Component{constructor(e){super(e),this.toggleDeleteModal=()=>{this.setState({deleteModal:!this.state.deleteModal,errors:{}})},this.toggleSuccessModal=()=>{this.setState({successModal:!this.state.successModal,cautionModal:{isOpen:!1}})},this.toggleTeacherModal=()=>{this.setState({teacherModal:!this.state.teacherModal,edit:!1,teacher:YJ,errors:{}})},this.toggleInviteSingleTeacherModal=()=>{this.setState({inviteSingleTeacherModal:!this.state.inviteSingleTeacherModal})},this.toggleInviteTeachersModal=()=>{this.setState({inviteTeachersModal:!this.state.inviteTeachersModal})},this.toggleCautionModal=e=>{const t=e&&"isOpen"in e?e:{isOpen:!1};this.setState({cautionModal:t,teacherModal:!1,edit:!1})},this.changeInviteMessage=e=>{this.setState({inviteMessage:e})},this.onSendClick=(e,t,n)=>{e.stopPropagation(),this.setState({teacher:{id:t.id,firstName:t.firstName,lastName:t.lastName,email:t.email,currentClasses:t.currentClasses,allocatedClasses:su(t.survey)?t.survey.allocatedClasses:[],restricted:t.survey?t.survey.restricted:this.props.schoolSettings.feederSchool}}),this.toggleInviteSingleTeacherModal()},this.onChange=e=>{this.setState({teacher:{...this.state.teacher,[e.target.name]:e.target.value}})},this.onMultiClassSelectChange=e=>{this.setState({teacher:{...this.state.teacher,currentClassesToUpdate:e.map((e=>({value:e.value,label:e.label})))}})},this.teacherAddEdit=e=>{const{updateTeachersMutation:t,refetchQueries:n,schoolId:r,client:o,teachersData:i}=this.props,{teacher:s}=this.state,{id:a,firstName:l,lastName:c,email:u,currentClassesToUpdate:d}=s,h=this.validateTeacher(s);if(0!==Object.keys(h).length)return void this.setState({errors:h});this.setState({loading:!0,teacherModal:e});const p=d.map((e=>parseInt(e.value))),f=i.find((({id:e})=>e===s.id));t({variables:{teacherParams:Object.fromEntries(Object.entries({id:a,firstName:l,lastName:c,email:u,currentClasses:p,schoolId:r,active:!0}).filter((([e,t])=>!f||!["lastName"].includes(e)||f[e]!==t)))},refetchQueries:n}).then((()=>{this.setState({loading:!1}),this.toggleTeacherModal()})).catch((e=>{aw(e),e.message.includes(HJ)?(this.reactivateTeacherWithNoClasses(o,u,r,n),this.setState({loading:!1,errors:{email:WJ,mutation:"Could not save teacher"}})):this.setState({loading:!1,errors:{mutation:"Error, please try again"}})}))},this.reactivateTeacherWithNoClasses=async(e,t,n,r)=>{const{data:{teacher:o}}=await e.query({query:sg,variables:{email:t,schoolId:n},fetchPolicy:"network-only"});if(!o.active){const e={id:o.id,currentClasses:[],schoolId:o.schoolId,active:!0};this.props.updateTeachersMutation({variables:{teacherParams:e},refetchQueries:r})}},this.onSearchChange=e=>{void 0===e?this.setState({searchValue:""}):this.setState({searchValue:e.target.value})},this.onTeacherClick=e=>{su(e.id)?this.setState({teacherModal:!0,edit:!0,teacher:{id:e.id,firstName:e.firstName,lastName:e.lastName,email:e.email,currentClassesToUpdate:e.currentClasses.map((e=>({value:ou(e,"id"),label:e.label}))),survey:e.survey}}):this.toggleTeacherModal()},this.deleteTeacher=()=>{const{deleteTeacherMutation:e,refetchQueries:t}=this.props,{id:n}=this.state.teacher;this.setState({showComponentLoading:!0}),e({variables:{id:n},refetchQueries:t}).then((()=>{this.setState({showComponentLoading:!1,deleteModal:!1,teacherModal:!1,errors:{}})})).catch((e=>{aw(e),this.setState({showComponentLoading:!1,errors:{delete:"Could not delete Teacher, try again"}})}))},this.resendSurvey=()=>{const{requestNewTokenForTeacherMutation:e,refetchQueries:t}=this.props,{id:n,survey:r}=this.state.teacher;r?(this.setState({loading:!0}),e({variables:{teacherId:n,tokenType:"SURVEY",ccList:this.ccList()},refetchQueries:t}).then((()=>{this.setState({cautionModal:{isOpen:!1},teacherModal:!1,edit:!1}),this.toggleSuccessModal(),this.setState({loading:!1})})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"There was an Error, please try again"}})}))):this.setState({loading:!1,errors:{mutation:"Could not resend survey invites"}})},this.closeAllSurveys=()=>{const{closeOrOpenAllSurveysMutation:e,refetchQueries:t,schoolId:n}=this.props;this.setState({loading:!0}),e({variables:{schoolId:n,completed:!0},refetchQueries:t}).then((()=>{this.toggleCautionModal(),this.setState({loading:!1})})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could Not Close Surveys For Teachers"}})}))},this.closeSurvey=e=>{const{closeOrOpenTeacherSurveyMutation:t,refetchQueries:n}=this.props,r={surveyCloseOpenParams:{teacherId:e,completed:!0}};this.setState({loading:!0}),t({variables:r,refetchQueries:n}).then((()=>{this.toggleCautionModal(),this.setState({loading:!1})})).catch((e=>{aw(e),this.setState({loading:!1,errors:{mutation:"Could Not Close Survey For teacher"}})}))},this.navToCharacteristics=()=>{const{navigate:e,location:t}=this.props;e("/Characteristics",{state:{navFrom:t.pathname}})},this.getCloseAllSurveysCautionObject=()=>({isOpen:!0,heading:"Close all surveys?",text:"All teacher access will be closed. Only Admin Users will have access to the student details.",buttonText:"Yes, close",onClick:()=>this.closeAllSurveys()}),this.getCloseSurveyCautionObject=e=>({isOpen:!0,heading:"Close survey?",text:"Teacher access for this survey will be closed. Only Admin Users will have access to the student details.",buttonText:"Yes, close",onClick:()=>this.closeSurvey(e)}),this.toggleBulkUploadScreen=()=>{this.setState((({displayBulkUploadScreen:e})=>({displayBulkUploadScreen:!e})))},this.ccList=()=>[this.props.myprofile.email],this.csvExport=async()=>{const[e,t]=await zw("teachers",this.props.schoolId,this.context,!0);t&&(aw({errorMessage:t}),this.setState({errors:{export:t}}))},this.openLatestSurvey=async(e,t)=>{try{const{data:{teacher:{survey:{url:n}}}}=await e.query({query:ag,variables:{id:t.id},fetchPolicy:"network-only"});window.open(n,"_blank")}catch(BK){window.open("/UnavailableSurvey","_blank")}};this.props.schoolSettings.teachersToAddTeacherRequests||this.props.schoolSettings.teachersToAddStudentRequests;this.state={loading:!1,teacherModal:!1,inviteTeachersModal:!1,inviteSingleTeacherModal:!1,cautionModal:{isOpen:!1},successModal:!1,edit:!1,searchValue:"",teacher:YJ,errors:{},deleteModal:!1,inviteMessage:"Hello,\n\nWe kindly ask you to complete the following survey by clicking the blue **Access Survey** button above.\n\n**Important Information:**\n\n- You can complete the survey over multiple sessions if needed; your progress will be saved automatically.\n\n- You can access the survey up to **5 times** within **2 weeks**. If you reach this limit or the time expires, you can request a new link yourself without needing to contact your Administrator or Class Solver.\n\n- Once you\u2019ve finished, please click **Mark Survey Complete** to notify your Administrator.\n\n- Please keep this link confidential and do not share it with others.\n\n- There\u2019s no need to create an account with Class Solver.\n",displayBulkUploadScreen:!1,showDeleteAllTeachers:!1}}validateTeacher(e){const t={};return aC(e.firstName)||(t.firstName="Required Field"),aC(e.lastName)||(t.lastName="Required Field"),aC(e.email)&&!lC(e.email)&&(t.email="Invalid Email"),t}render(){const{teachersData:e,currentClasses:t,settings:n,schoolId:r,firstAdmin:o,deactivateAllTeachersMutation:i,dashboard:s,schoolSettings:a,client:l}=this.props,{loading:c,showComponentLoading:u,edit:d,searchValue:h,teacher:p,teacherModal:f,inviteTeachersModal:m,inviteSingleTeacherModal:g,errors:v,successModal:y,cautionModal:b,deleteModal:x,inviteMessage:w,displayBulkUploadScreen:S,showDeleteAllTeachers:C}=this.state;if(c)return(0,pr.jsx)(qk,{});const j=e.every((({currentClasses:e})=>0===e.length)),_=e.some((({survey:e})=>null===e)),k=s.inactiveStudentCount>0&&j&&_,N=n.adminOnlyRequests,E=(e=>{if(void 0===e)return null;const[,t]=e.email.split("@");return t})(o),T={isOpen:!0,heading:"Resend?",text:"Are you sure you want to resend email invites for this teacher?",buttonText:"Yes, send",onClick:this.resendSurvey},O=WS(t);if(e.length<1||S)return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(aT,{toggleTeacherModal:this.toggleTeacherModal}),f&&(0,pr.jsx)(VJ,{classOptions:O,toggle:this.toggleTeacherModal,isOpen:!0,edit:d,onChange:this.onChange,teacher:p,onAddEditClick:this.teacherAddEdit,errors:v,loading:this.state.loading,onMultiClassSelectChange:this.onMultiClassSelectChange})]});let I=!1,R=!0,A=e;if(""!==h)A=e.filter((e=>{su(e.survey)&&(I=!0,R=R&&e.survey.completed);return[e.firstName,e.lastName].join(" ").toLowerCase().includes(h.toLowerCase())}));else for(let L=0;L<A.length;L++)if(su(A[L].survey)&&(I=!0,!1===A[L].survey.completed)){R=!1;break}A=A.map((e=>{const t=null!==e.survey,n=t&&pw(e.survey.allocatedClasses),r=t&&e.survey.completed;let o;o=r?(0,pr.jsx)("span",{className:"color-green-light",children:"Completed"}):t?(0,pr.jsx)("span",{className:"color-purple",children:"Sent"}):(0,pr.jsx)("span",{className:"color-grey-dark",children:"Not Sent"});const i=(0,pr.jsx)("span",{className:"mr-2 cursor-pointer color-blue-mid u-bold",onClick:t=>this.onSendClick(t,e,E),children:"Edit"}),s=(0,pr.jsx)("span",{className:"mr-2 cursor-pointer color-blue-mid u-bold",onClick:()=>this.toggleCautionModal(T),children:"Re-send"}),c=(0,pr.jsx)("span",{className:"mr-2 cursor-pointer color-blue-mid u-bold",onClick:t=>this.onSendClick(t,e,E),children:"Re-send"}),u=e=>(0,pr.jsx)("span",{className:"mr-2 cursor-pointer color-blue-mid u-bold",onClick:t=>{t.stopPropagation(),this.openLatestSurvey(l,e)},children:"View"}),d=e=>(0,pr.jsx)("span",{className:"mr-2 cursor-pointer color-blue-mid u-bold",onClick:()=>this.toggleCautionModal(this.getCloseSurveyCautionObject(e)),children:"Close"});let h;h=r?(0,pr.jsxs)("div",{children:[i,c]}):n?(0,pr.jsxs)("div",{children:[i,s,a.requireOtp||u(e),d(e.id)]}):(0,pr.jsx)("span",{onClick:t=>this.onSendClick(t,e,E),children:"New"});let p={...e,allClasses:(0,pr.jsx)(vm,{classes:e.currentClasses,rowId:`allClasses-${e.id}`}),status:o,resend:h,highlighted:{email:OQ(e.email,E)}};return t?{...p,date:qh(e.survey.updatedAt),allocated:(0,pr.jsx)(vm,{classes:e.survey.allocatedClasses,rowId:`allocatedClasses-${e.id}`})}:p})),A.length<1?A.push({firstName:"",lastName:"",email:""}):(e=>{e.sort(VS)})(A);const M=(0,pr.jsx)("span",{className:"c-teachers__close-survey",onClick:()=>this.toggleCautionModal(this.getCloseAllSurveysCautionObject(R)),children:R?"":"Close all Surveys"}),P=A.reduce(((e,t)=>(su(t.survey)?t.survey.allocatedClasses:[]).reduce(((e,n)=>({...e,[n.id]:[...e[n.id]||[],t]})),e)),{}),D=O.map((e=>({...e,teachers:P[e.id]||[]}))),F=[{onClick:()=>this.props.navigate("/Teachers/Upload"),text:"Bulk Import Teachers",icon:"fa-upload"},{onClick:this.csvExport,text:"Export all Teachers",icon:"fa-download"},{onClick:()=>this.setState({showDeleteAllTeachers:!0}),text:"Remove all Teachers",icon:"fa-trash"}];return(0,pr.jsxs)("div",{className:"c-teachers u-row-fix",children:[k&&(0,pr.jsx)(qJ,{}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)(Fh,{addText:"Add Teacher",onAddClick:this.toggleTeacherModal,searchValue:h,adminMode:N,onSearchChange:this.onSearchChange,searchPlaceholder:"Search teachers...",additionalActions:F}),I?(0,pr.jsxs)("div",{className:"c-teachers__table-container",children:[(0,pr.jsx)(KJ,{adminEmailDomain:E,teachers:A,closeSurveysButton:M,onRowClick:this.onTeacherClick,onSendMultipleSurveysClick:this.toggleInviteTeachersModal,surveysSent:!0}),(0,pr.jsx)(Qf,{isOpen:b.isOpen,toggle:this.toggleCautionModal,heading:b.heading,text:b.text,buttonText:b.buttonText,onButtonClick:b.onClick,error:v.mutation}),(0,pr.jsx)(aN,{isOpen:y,toggle:this.toggleSuccessModal,heading:"Survey invite sent to Teacher",text:"A copy of the invite is also sent to Administrators."})]}):(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsx)("div",{className:"c-teachers__table-container",children:(0,pr.jsx)(KJ,{adminEmailDomain:E,teachers:A,closeSurveysButton:M,onRowClick:this.onTeacherClick,onSendMultipleSurveysClick:this.toggleInviteTeachersModal,surveysSent:!1})}),(0,pr.jsx)(FJ,{toggle:this.toggleInviteTeachersModal,navToCharacteristics:this.navToCharacteristics})]}),(0,pr.jsxs)("div",{className:"u-total-text mt-2 ml-2",children:["Total - ",e.length," Teachers"]}),(0,pr.jsxs)("div",{children:[m&&(0,pr.jsx)(UJ,{classes:D,teachers:A,toggle:this.toggleInviteTeachersModal,inviteMessage:w,isOpen:!0,ccList:this.ccList(),schoolId:r,feederSchool:a.feederSchool}),g&&(0,pr.jsx)(DJ,{classes:D,toggle:this.toggleInviteSingleTeacherModal,inviteMessage:w,changeInviteMessage:this.changeInviteMessage,teacher:p,ccList:this.ccList(),schoolId:r,feederSchool:a.feederSchool}),!b.isOpen&&(0,pr.jsx)(VJ,{classOptions:D,currentClasses:t,toggle:this.toggleTeacherModal,isOpen:f,edit:d,onChange:this.onChange,onMultiClassSelectChange:this.onMultiClassSelectChange,teacher:p,onAddEditClick:this.teacherAddEdit,onDeleteTeacherClick:this.toggleDeleteModal,errors:v,loading:this.state.loading})]})]}),(0,pr.jsx)(Ck,{toggle:this.toggleDeleteModal,isOpen:x,loading:u,heading:"Delete Teacher?",text:"Deleting a current teacher will also delete any Requests associated with this teacher, unassign this teacher from any classes they have been assigned to next year, and remove the ability for this teacher to complete surveys about students.",onButtonClick:this.deleteTeacher,error:v.delete}),C&&(0,pr.jsx)(DS,{dangerousMutation:i,cautionHeading:"Remove all Teachers",cautionText:(0,pr.jsxs)("span",{children:["Deleting teachers will also delete any Requests associated with the teachers, unassign the teachers from any classes they have been assigned to next year, and remove the ability for the teachers to complete surveys about students.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"You can not 'undo' this operation. Are you sure you would like to remove all the teachers?"]}),cautionButtonText:"Yes, Proceed",successMessage:"All teachers have been removed.",errorMessage:"Could not remove data",toggleComponent:()=>this.setState({showDeleteAllTeachers:!1}),showSuccess:!1})]})}}QJ.contextType=tu;const JJ=e=>{const t=vl(),n=ml();return(0,pr.jsx)(QJ,{...e,location:n,navigate:t})},KJ=e=>{const{teachers:t,onRowClick:n,closeSurveysButton:r,onSendMultipleSurveysClick:i,adminEmailDomain:s,surveysSent:a}=e,l=o.useMemo((()=>[{Header:"Teacher Details",columns:[{Header:"First Name",accessor:"firstName",className:"first-name-cell"},{Header:"Last Name",accessor:"lastName",className:"last-name-cell"},{Header:"Email",Cell:XJ,accessor:"email",className:"email-cell wide-cell",adminEmailDomain:s}]},{Header:"CURRENT CLASS OR CLASSES",headerClassName:"first-in-group-header text-nowrap current-class-heading",columns:[{Header:"Current School Year",accessor:"allClasses",id:"allClasses",className:"current-class-cell class-1-cell first-in-group-cell",headerClassName:"first-in-group-header classes-header"}]},{Header:"Survey",headerClassName:"first-in-group-header text-nowrap survey-class-heading",columns:[{Header:"Allocated to Class",accessor:"allocated",className:"survey-class-cell class-1-cell first-in-group-cell passive-cell",headerClassName:"first-in-group-header passive-cell ",disableSortBy:!0}]},{id:"send-multiple-new-surveys",Header:()=>(0,pr.jsx)("span",{onClick:i,children:"Send Multiple New Surveys"}),headerClassName:"button-header less-wide-cell",columns:[{Header:"Status",Cell:ZJ,accessor:"status",className:"less-wide-cell passive-cell",headerClassName:"passive-cell",disableSortBy:!0}]},{id:"close-all-surveys",Header:()=>r,headerClassName:"button-header close-header",columns:[{Header:"",accessor:"resend",className:"passive-cell button-cell end-cell",headerClassName:"passive-cell",disableSortBy:!0}]}]),[s,r,i]),c=o.useMemo((()=>t),[t]),u={...e,data:c,columns:l,initialState:{hiddenColumns:!0===a?[]:["status","allocated","resend"]}},{getTableProps:d,getTableBodyProps:h,headerGroups:p,rows:f,prepareRow:m}=(0,GC.useTable)(u,GC.useSortBy);return(0,pr.jsx)("div",{className:"teacher-sortable-table",children:(0,pr.jsxs)("table",{...d(),cellSpacing:"0",children:[(0,pr.jsx)("thead",{className:0===t.length?"no-data":"",children:p.map((e=>(0,pr.jsx)("tr",{...e.getHeaderGroupProps(),children:e.headers.map((e=>{const t={...e.getHeaderProps({...e.getSortByToggleProps(),className:e.headerClassName})};return(0,pr.jsxs)("th",{...t,title:"",children:[e.render("Header"),(0,pr.jsx)("span",{children:e.isSorted?e.isSortedDesc?" \u2193":" \u2191":""})]})}))})))}),0===t.length&&(0,pr.jsx)("tbody",{children:(0,pr.jsx)("tr",{className:"empty-row",children:(0,pr.jsx)("td",{className:"empty-data-cell",colspan:"100",children:"There are no teachers to view. Try adding a new one."})})}),t.length>0&&(0,pr.jsx)("tbody",{...h(),children:f.map((e=>{m(e);return(0,pr.jsx)("tr",{onClick:()=>n(c[e.index]),...e.getRowProps(),children:e.cells.map((e=>{const t=e.getCellProps({className:e.column.className});return(0,pr.jsx)("td",{...t,children:e.render("Cell")})}))})}))})]})})},XJ=e=>{const t=OQ(e.value,e.column.adminEmailDomain);return(0,pr.jsx)("span",{className:`highlight-${t}`,children:e.value})},ZJ=e=>{const t=e.row.index,n=e.data[t];return(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center w-100",children:[(0,pr.jsx)("div",{children:e.value}),n.survey&&(0,pr.jsx)("span",{className:"font-weight-light pr-1",children:qh(n.survey.updatedAt)})]})},eK=({id:e})=>(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("i",{className:"fa fa-exclamation-circle px-2 cursor-pointer color-red","data-event":"click focus","data-tooltip-id":e}),(0,pr.jsx)(kf,{className:"c-teachers-invite-modal__restricted-survey-tooltip ",id:e,clickable:!0,variant:"light",opacity:1,openEvents:{click:!0,focus:!0},closeEvents:{click:!0,blur:!0},globalCloseEvents:{clickOutsideAnchor:!0,scroll:!0},children:(0,pr.jsxs)("div",{className:"p-1",children:[(0,pr.jsx)("h2",{children:"Feeder School Survey"}),(0,pr.jsxs)("p",{className:"mb-0",children:["Select \u2018Feeder School Survey\u2019 if you are sending your surveys to another school (e.g. students transitioning from another school or external kindergarten).",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"This ensures that the survey recipient will only be able to view information about their school (e.g. they will not be able to enter friends or requests for students at another school).",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If this school would like to enter information about students from a different school, they can either enter this in the \u201cNotes section\u201d or contact you directly as the Administrator."]})]})})]}),tK={maxWidth:150};class nK extends o.Component{constructor(...e){super(...e),this.UNSAFE_componentWillReceiveProps=e=>{aw(e.error)}}render(){const{loadingOne:e,loadingTwo:t,loadingThree:n,loadingFour:r,loadingFive:o,loadingAdmins:i,loadingDashboard:s,teachers:a,students:l,settings:c,users:u,...d}=this.props;if(e||t||n||r||o||i||s)return(0,pr.jsx)(qk,{});const[h]=u,p=uw(),f=[{query:rg,variables:{schoolId:p}},{query:Mw,variables:{adminOnly:c.adminOnlyRequests,schoolId:uw()}}];return(0,pr.jsx)(JJ,{refetchQueries:f,teachersData:a,studentsData:l,schoolId:p,settings:c,firstAdmin:h,...d})}}const rK=ng()(eg(Ze,{props:({data:{settings:e}})=>({settings:e})}),eg(Ge,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,schoolSettings:t}})=>({loadingOne:e,schoolSettings:t})}),eg(Fe,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,school:t}})=>({loadingTwo:e,school:t})}),eg(rg,{options:()=>({fetchPolicy:"network-only",variables:{schoolId:uw()}}),props:({data:{loading:e,error:t,teachers:n,refetch:r}})=>({loadingThree:e,error:t,teachers:n,teacherRefetch:r})}),eg(Mw,{skip:()=>null===uw(),options:({settings:e})=>({variables:{adminOnly:e.adminOnlyRequests,schoolId:uw()},fetchPolicy:"network-only"}),props:({data:{dashboard:e,loading:t}})=>({loadingDashboard:t,dashboard:e})}),eg(gg,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,activeCurrentClasses:t}})=>({loadingFour:e,currentClasses:t})}),eg(me,{options:()=>({variables:{schoolId:uw()}}),props:({data:{loading:e,students:t}})=>({loadingFive:e,students:t})}),eg(O,{props:({data:{myprofile:e}})=>({myprofile:e})}),eg($e,{options:()=>({variables:{schoolId:uw(),filterRole:iS}}),props:({data:{users:e,loading:t,error:n}})=>({loadingAdmins:t,error:n,users:e})}),eg(dg,{name:"inviteTeachersToSurveysMutation"}),eg(ug,{name:"updateTeachersMutation"}),eg(hg,{name:"deleteTeacherMutation"}),eg(pg,{name:"bulkUploadTeachersMutation"}),eg(lg,{name:"closeOrOpenAllSurveysMutation"}),eg(cg,{name:"closeOrOpenTeacherSurveyMutation"}),eg(fg,{name:"deactivateAllTeachersMutation",options:()=>({variables:{schoolId:uw()},refetchQueries:[{query:rg,variables:{schoolId:uw()}}]})}),eg(R,{name:"requestNewTokenForTeacherMutation"}))(lj(nK)),oK=({authenticationError:{message:e}})=>{const t=ml(),n=_J.parse(t.search),r=()=>window.location.href="/Logout",o=(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"}),i=(0,pr.jsx)("a",{href:"https://time.is/",target:"_blank",rel:"noopener noreferrer",className:"ml-1 color-blue-mid",children:"https://time.is/"});let s="";switch(e){case"auth0_error":s="access_denied"===n.error?(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{children:[n.error_description,(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If the error persists, please contact us at ",o]})}):(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("div",{children:["Sorry, there was an error with your login. Please try closing your browser and logging in again.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If the error persists, please contact us at ",o]}),(0,pr.jsx)("br",{}),(0,pr.jsxs)("p",{children:["Error details:",(0,pr.jsx)("br",{}),(0,pr.jsxs)("code",{children:[n.error," - ",n.error_description]})]})]});break;case"id_token was issued in the future (invalid iat)":s=(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{children:"It seems like the time on your computer/network is out of sync with the time on the internet."}),(0,pr.jsx)("br",{}),(0,pr.jsxs)("div",{children:["To help ensure your data remains protected with industry-leading security we require these times to match (within 1 minute). You can check the current internet time at ",i]}),(0,pr.jsx)("br",{}),(0,pr.jsxs)("div",{children:["Please contact your IT department to fix the time for your computer/network. If you need more details or assistance, please contact us at ",o]})]});break;default:s=(0,pr.jsxs)("div",{children:["Sorry, there was an error with your login. Please try closing your browser and logging in again.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If the error persists, please contact us at ",o]})}return(0,pr.jsx)(Qf,{isOpen:!0,toggle:r,onButtonClick:r,buttonText:"Dismiss",showCancel:!1,heading:"Login Error",text:s})},iK=()=>{const e=ml(),t=_J.parse(e.search),{isAuthenticated:n,loginWithRedirect:r}=nu(),o=t.country;return o?(js(o),window.location.href=window.location.pathname,null):(Cs()&&!n?r({authorizationParams:{redirect_uri:window.location.origin}}):window.location.href="https://classsolver.com",null)},sK=()=>{const{logout:e}=nu(),t=Pm(),n=ml(),r=_J.parse(n.search),i=()=>{const n=window.location.origin+"/Login?country="+Cs();localStorage.clear(),sessionStorage.clear(),t.resetStore(),e({logoutParams:{returnTo:n}})};return(0,pr.jsx)(o.Fragment,{children:"true"===r.expired?(0,pr.jsx)(Qf,{isOpen:!0,onButtonClick:i,buttonText:"Dismiss",showCancel:!1,heading:"Session Expired",text:(0,pr.jsxs)("div",{children:["Your login session has expired or the school requires Multi-Factor Authentication (MFA) and you do not have it activated, please log in again",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If you see this error again, please contact your school administrator."]})}):i()})},aK="token-not-found",lK="token-expired",cK="invalid-token";class uK extends o.Component{render(){const{info:e,promoBanner:t}=this.props;return(0,pr.jsxs)("div",{className:"text-left w-50",children:[e&&(0,pr.jsxs)("div",{className:"font-weight-bold h5",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2 text-warning"}),e.title]}),(0,pr.jsx)("div",{className:"u-grey-dark",children:e&&e.body}),t&&(0,pr.jsx)(hT,{heading:t.title,message:t.message,button:t.button})]})}}const dK={maxWidth:150};class hK extends o.Component{render(){const{message:e,additional:t,info:n,promoBanner:r}=this.props;return(0,pr.jsxs)("div",{className:"c-survey-login-error",children:[(0,pr.jsx)(tc,{to:"/",children:(0,pr.jsx)("img",{src:xN,alt:"Class Solver Logo",style:dK,className:"ml-5 mt-5"})}),(0,pr.jsxs)("div",{className:"c-survey-login-error__container",children:[(0,pr.jsx)("div",{className:"h4 pb-2 w-75 text-center",children:e}),(0,pr.jsx)("div",{className:"pb-4",children:t}),(0,pr.jsx)(uK,{info:n,promoBanner:r})]})]})}}const pK=({currentToken:e,tokenType:t})=>{const[n,{data:r,error:o,loading:i}]=Km(I,{variables:{currentToken:e,tokenType:t},onError:()=>{}}),s=!!(r||i||o);return(0,pr.jsxs)("div",{className:"mt-4 d-flex flex-column align-items-center",children:[(0,pr.jsx)("div",{children:(0,pr.jsx)(ld,{color:"primary",onClick:()=>n(),disabled:s,children:"Send email with new link"})}),(0,pr.jsxs)("div",{className:"mt-2",style:{fontSize:"1rem"},children:[r&&"Success! A new link has been sent to your email.",o&&"There was an error requesting a new link. Please contact your school administrator."]})]})},fK={maxWidth:150},mK=({loginQuery:e,passwordIncorrect:t,setPasswordIncorrect:n,requestOtpSuccessful:r,requestOtp:i,resendTimeout:s})=>{const[a,l]=(0,o.useState)(""),c=0!==s;let u;return u=c?`Resend in ${s} seconds`:r?"Request Password Again":"Request Password",(0,pr.jsxs)("div",{className:"c-survey-login-error",children:[(0,pr.jsx)(tc,{to:"/",children:(0,pr.jsx)("img",{src:xN,alt:"Class Solver Logo",style:fK,className:"ml-5 mt-5"})}),(0,pr.jsxs)("div",{className:"c-survey-login-error__container",children:[(0,pr.jsx)("div",{className:"h4 pb-3 w-75 text-center",children:"Please click below to request a one-time password (OTP) to access Class Solver."}),(0,pr.jsx)(ld,{disabled:c,className:"u-font-weight-medium",color:"primary",onClick:i,children:u}),r&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"u-font-weight-medium mt-2",children:"Didn't receive an email?"}),(0,pr.jsx)("div",{className:"u-font-weight-medium",children:"Check your junk/spam folder."}),(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-column align-items-center justify-content-center",children:[(0,pr.jsx)("div",{className:"h4",children:"Please check your email and enter the password below"}),(0,pr.jsx)(Zg,{className:"w-auto mt-3 mb-4",type:"text",value:a,name:"password",onChange:e=>{l(e.target.value)},maxLength:6,size:"6"})]}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"primary",onClick:()=>{e({variables:{password:a},onError:()=>{n(!0)}})},children:"Submit"}),t&&(0,pr.jsx)($k,{text:"Invalid password. Please try again."})]}),!1===r&&(0,pr.jsx)($k,{text:(0,pr.jsxs)("div",{className:"mt-2 text-center",children:[(0,pr.jsx)("div",{children:"Oops, something went wrong. Please try it again."}),(0,pr.jsx)("div",{children:"If the issue persists, please contact your school Administrator"})]})})]})]})},gK=()=>{sessionStorage.clear()},vK=({tokenType:e,loginMutation:t,mutationName:n,errorMessages:r})=>{const i=yl(),s=ml(),a=_J.parse(s.search);js(a.country);const l=i.token,[c]=Km(D),[u,d]=(0,o.useState)(!1),[h,p]=(0,o.useState)(null),[f,m]=(0,o.useState)(!1),[g,v]=(0,o.useState)(0),[y,b]=(0,o.useState)(),x=e=>{v(e),e>0&&setTimeout((()=>{x(e-1)}),1e3)},[w]=Km(A,{variables:{currentToken:l,tokenType:e},onCompleted:()=>{b(!0),x(10)},onError:()=>{b(!1)}}),[S,{error:C}]=Km(t,{variables:{token:l},onCompleted:e=>{const t=e[n];(e=>{sessionStorage.setItem(Vt,e.token),e.user.schoolId?sessionStorage.setItem(Ht,e.user.schoolId):sessionStorage.removeItem(Ht)})(t),d(!0),p(t)},onError:()=>{}});if((0,o.useEffect)((()=>{const e=sessionStorage.getItem(Vt);e?c({variables:{bearerToken:e,temporaryToken:l}}).then((({data:{verifyBearerToken:e}})=>{e?d(e):(gK(),S())})).catch((()=>{gK(),S()})):(gK(),S())}),[S,c,l]),u)return[!0,null,null,h];if(C){const t=C.graphQLErrors[0].message,n=r[t];let o,i;return"unauthorized"===t?(o=mK,i={loginQuery:S,requestOtp:w,passwordIncorrect:f,setPasswordIncorrect:m,requestOtpSuccessful:y,resendTimeout:g}):(o=hK,i={message:n.message,additional:t===lK&&(0,pr.jsx)(pK,{currentToken:l,tokenType:e}),info:n.info,promoBanner:n.promoBanner}),[!1,o,i,null]}return[!1,qk,{},null]},yK=()=>{const e=yl(),t=ml(),n={[lK]:{message:"To access shared class lists, please click below to get a new link sent to your email.",info:{title:"Why do I need a new link to access shared lists?",body:"For your security, the links can only be opened a certain number of times within a set period of time.  However, you can easily send yourself a new link by clicking \u201cSend email with new link\u201d. "}},[aK]:{message:"This link is no longer available.  Please contact your school administrator if you would like it re-opened."},[cK]:{message:"This link is invalid or incomplete.  Please double check that you have copied the entire link and try again."}},[r,o,i,s]=vK({tokenType:"SHARED_SOLUTION",loginMutation:M,mutationName:"loginWithSolutionToken",errorMessages:n}),{data:a,loading:l}=Gm(Fe,{variables:{schoolId:uw()},fetchPolicy:"network-only",skip:!r});if(l)return null;if(r){if(s&&s.permissions){const e=s.permissions;sessionStorage.setItem(Wt,JSON.stringify(e))}const n=JSON.parse(sessionStorage.getItem(Wt));if("sociogram"===e.subPath&&n.showFriendships){const e=t.pathname,n=e.substring(0,e.lastIndexOf("/"))+t.search;return(0,pr.jsx)(jw,{school:a.school,children:(0,pr.jsx)(o$,{solverPath:n})})}return(0,pr.jsx)(jw,{school:a.school,children:(0,pr.jsx)(QQ,{})})}return(0,pr.jsx)(o,{...i})},bK={logo:{maxWidth:150}};class xK extends o.Component{constructor(e){super(e),this.onChange=e=>{this.setState((t=>({data:{...t.data,[e.target.name]:e.target.value},errors:{...t.errors,[e.target.name]:null}})))},this.onSubmit=e=>{const{signupMutation:t}=this.props;e.preventDefault();const n=cC(this.state.data);if(this.setState({errors:n}),0===Object.keys(n).length){this.setState({loading:!0});const e={...this.state.data,numberOfStudents:parseInt(this.state.data.numberOfStudents,10)},n={us:"us",ca:"ca",cn:"us",au:"au",nz:"au",za:"au"}[this.state.data.countryCode.toLowerCase()]||"us";js(n),t({variables:e}).then((()=>{this.props.updateEmail({variables:{email:e.contactEmail}}),this.props.navigate("/Signup/Success")})).catch((e=>{let t;t="invalid-email-domain"===e.message?"Please use your school email address":"The email address is already associated with a user account, please use a different email address",this.setState({loading:!1,errors:{signUp:t}})}))}},this.state={data:{schoolName:"",addressLine1:"",suburb:"",countryCode:null,stateCode:"",postcode:"",contactFirstName:"",contactLastName:"",contactNumber:"",contactEmail:"",contactPositionTitle:"",numberOfStudents:"",administrationSystem:""},errors:{},loading:!1}}render(){const{errors:e,data:t,loading:n}=this.state;if(n)return(0,pr.jsx)(qk,{});const r=(0,pr.jsx)("a",{href:"https://classsolver.com/login/",children:" Sign In"});return(0,pr.jsxs)("div",{children:[(0,pr.jsxs)(Fg,{className:"justify-content-around align-items-center mb-5",children:[(0,pr.jsx)("img",{src:xN,alt:"Class Solver Logo",style:bK.logo,className:"mt-3"}),(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{children:"Already have an account?"}),r]})]}),(0,pr.jsxs)(nS,{sm:"12",md:{size:6,offset:3},children:[(0,pr.jsx)(nN,{data:t,onChange:this.onChange,errors:e}),(0,pr.jsxs)("div",{className:"pl-5",children:["Please make sure you are authorized to create an account for your school. Click to view"," ",(0,pr.jsx)("a",{href:fS,target:"_blank",rel:"noopener noreferrer",children:"Customer Terms"}),"\xa0and\xa0",(0,pr.jsx)("a",{href:mS,target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),".",(0,pr.jsx)(ld,{color:"primary",size:"md",className:"mt-4 mb-4",block:!0,onClick:this.onSubmit,children:"Create account"}),e.signUp&&(0,pr.jsx)($k,{text:e.signUp})]})]})]})}}const wK=({userProfile:e,refetchQueries:t})=>{const[n,r]=(0,o.useState)(!1),i=()=>r((e=>!e));return(0,pr.jsxs)("div",{className:"c-account-details pb-5 u-content-border-bottom",children:[(0,pr.jsxs)("div",{className:"mb-4 d-flex justify-between",children:[(0,pr.jsx)("h2",{className:"u-blue-primary",children:"My Profile"}),(0,pr.jsx)("a",{className:"text-primary",onClick:i,children:"Edit"})]}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("div",{className:" my-1",children:[(0,pr.jsx)("div",{className:"mb-3 u-bold",children:Uh(e)}),(0,pr.jsx)("div",{className:"mb-2",children:e.positionTitle}),(0,pr.jsx)("div",{className:"mb-2",children:e.email}),n&&(0,pr.jsx)(SK,{toggle:i,refetchQueries:t,user:e})]})})]})},SK=({user:e,toggle:t,cancelToggle:n,refetchQueries:r,title:i="Edit My Profile",modalClass:s,showDelete:a=!0,allowEditEmail:l=!0})=>{const[c,u]=(0,o.useState)({id:e.id,firstName:e.firstName,lastName:e.lastName,email:e.email,positionTitle:e.positionTitle}),[d,h]=(0,o.useState)({}),[p,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[v,{loading:y}]=Km(He,{refetchQueries:r}),[b,{loading:x}]=Km(We),{firstName:w,lastName:S,email:C,positionTitle:j}=c,_=e=>{const t=e.target.value;u((n=>({...n,[e.target.name]:t})))},k=e=>{const{firstName:t,lastName:n,email:r}=e;let o={};return aC(t)||(o.firstName="Required"),aC(n)||(o.lastName="Required"),lC(r)||(o.email="Invalid Email"),o},N=()=>{const e=k(c),n=()=>t(),r=()=>h({mutation:"Could not update User. Please try again."});0===Object.keys(e).length&&E(n,r),h(e)},E=(e,t)=>{const{id:n,firstName:r,lastName:o,positionTitle:i,email:s}=c;v({variables:{self:{id:n,firstName:r,lastName:o,positionTitle:i,email:s}}}).then(e).catch(t)};return(0,pr.jsxs)(Yf,{className:s,isOpen:!0,children:[(0,pr.jsx)(Kk,{title:i,toggle:n||t,className:"u-p-fix p-4"}),(0,pr.jsx)(Ig,{className:"p-4",children:(0,pr.jsx)(b_,{autoComplete:"off",children:(0,pr.jsxs)("div",{className:"container-fluid",children:[(0,pr.jsxs)("div",{className:"row mt-3",children:[(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"First name"}),(0,pr.jsx)(Zg,{type:"text",name:"firstName",placeholder:"First name",autoComplete:"off",value:w,onChange:_}),(0,pr.jsx)($k,{text:d.firstName})]}),(0,pr.jsxs)(Gg,{className:"col-6",children:[(0,pr.jsx)(Qg,{children:"Last name"}),(0,pr.jsx)(Zg,{type:"text",name:"lastName",placeholder:"Last name",autoComplete:"off",value:S,onChange:_}),(0,pr.jsx)($k,{text:d.lastName})]})]}),(0,pr.jsx)("div",{className:"row",children:(0,pr.jsxs)(Gg,{className:"col-12",children:[(0,pr.jsx)(Qg,{children:"Position Title"}),(0,pr.jsx)(Zg,{type:"text",name:"positionTitle",placeholder:"Position Title",autoComplete:"off",value:j||"",onChange:_})]})}),(0,pr.jsx)("div",{className:"row",children:(0,pr.jsxs)(Gg,{className:"col-12",children:[(0,pr.jsx)(Qg,{children:"Email address"}),(0,pr.jsx)(Zg,{disabled:!l,type:"text",name:"email",placeholder:"Email address",autoComplete:"off",value:C,onChange:_}),(0,pr.jsx)($k,{text:d.email})]})}),(0,pr.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-5 mb-3",children:[(0,pr.jsx)("div",{children:a&&(0,pr.jsx)("span",{className:"py-2 pr-3 mr-2 text-primary cursor-pointer",onClick:()=>f(!0),children:"Delete Profile"})}),(0,pr.jsx)(Ef,{buttonText:"Save",onButtonClick:()=>{c.email.trim()!==e.email.trim()?g(!0):N()},onCancelClick:n||t})]}),(0,pr.jsx)($k,{text:d.mutation})]})})}),p&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>f(!1),error:d.delete,loading:x,heading:"Delete My Profile?",text:"You will no longer be able to access Class Solver as an Administrator if you continue.   This will apply to all Class Solver accounts linked to your profile.  If you later decide that you require access, you will need to ask another Administrator to re-add you.",onButtonClick:()=>{const t={id:e.id};b({variables:t}).then((()=>{window.location.href="/logout"})).catch((()=>{h({delete:"Could not delete profile"})}))}}),m&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>g(!1),error:d.mutation,loading:y,heading:"Change your email?",text:"Are you sure you want to change your email? You will be logged out and a verification email will be sent to your new email address asking you to verify it. You will need to log back in with the new email address once it is verified.",onButtonClick:()=>{const e=k(c),n=()=>{t(),window.location.href="/logout"},r=()=>{g(!1),h({mutation:"Could not update User. Please try again."})};0===Object.keys(e).length&&E(n,r),g(!1),h(e)},buttonText:"Yes, change"})]})},CK=({userProfile:e})=>{const t=uw(),[n,r]=(0,o.useState)(""),[i]=Km(Ye,{refetchQueries:[{query:O}],onError:()=>{}}),[s,a]=(0,o.useState)(!1),[l,c]=(0,o.useState)();return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"c-account-details pb-5 u-content-border-bottom",children:[(0,pr.jsx)("h2",{className:"mb-4 u-blue-primary",children:"Accounts Linked to My Profile"}),0===e.schools.length&&(0,pr.jsx)("div",{children:"You do not have any schools linked to your profile."}),e.schools.map((e=>(0,pr.jsxs)("div",{className:"d-flex justify-between my-3",children:[(0,pr.jsx)("div",{children:e.name}),(0,pr.jsx)("span",{className:"cursor-pointer color-blue-mid text-primary",onClick:()=>{c(e.id),a(!0)},children:"Remove"})]},e.id)))]}),s&&(0,pr.jsx)(Ck,{isOpen:!0,toggle:()=>a(!1),heading:"Remove Linked Account?",text:" Are you sure? Your profile will no longer be linked to this account. Note: If this is your only linked account, you will no longer have access to Class Solver.",buttonText:"Yes, remove",onButtonClick:()=>{const n={userId:e.id,schoolIds:[l]};i({variables:n}).then((e=>{e.errors?r("Error unlinking user from school. Please try again."):(l===t&&dw(),a(!1),r(""))}))},error:n})]})},jK={maxWidth:150},_K=({userProfile:e,refetchQueries:t})=>{const[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(),[a]=Km(He,{refetchQueries:t}),l=!!e.acceptedUpdatesAndMarketing,c=t=>{const n={self:{id:e.id,mfa:t}};return a({variables:n})},u=cS(e.role)||e.schools.some((e=>e.requireMfa));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("h2",{className:"mb-5 u-blue-primary",children:"Profile Preferences"}),(0,pr.jsx)(k_,{id:"updateProductUpdateAndMarketingConsent",name:"updateProductUpdateAndMarketingConsent",title:"Product updates and marketing",description:"I'd like to receive important product updates (e.g. new features) and the occasional marketing related email (e.g. new products)",checked:l,onChangeHandler:()=>{const t=Qh()().utc().toISOString(),n={self:{id:e.id,acceptedUpdatesAndMarketing:l?null:t}};a({variables:n})}}),u&&(0,pr.jsx)(k_,{id:"updateMfa",name:"updateMfa",title:"Turn on Multi Factor Authentication (MFA)",description:"As an added security measure, you will be asked for a One Time Password from your Authenticator app (e.g. Google Authenticator) when you login to Class Solver",checked:e.mfa,onChangeHandler:()=>r(!0)}),n&&(0,pr.jsx)(Qf,{toggle:()=>r(!1),onButtonClick:()=>{c(!e.mfa).then((e=>{e.errors?s("There was an error turning MFA on, please try again."):window.location.href="/logout"}))},buttonText:"Yes",showCancel:!0,heading:"Change MFA Setting?",text:(0,pr.jsxs)("div",{children:["You are about to change your MFA setting. In order for it to take effect, you will be logged out. Please log back in to activate the change.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Are you sure you want to change it?"]}),error:i})]})},kK=({error:e,user:t})=>{const n=vl();if("GraphQL error: unauthorized"===e.message)return(0,pr.jsx)(Ml,{to:"/Unauthorized",replace:!0});const r=()=>n("/Logout"),o=(0,pr.jsxs)(pr.Fragment,{children:["If the issue persists, please take a screenshot of this message and send it to",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"})]});let i,s;return e.networkError&&"Failed to fetch"===e.networkError.message?(i="Network issue",s=(0,pr.jsxs)("span",{children:["Sorry, we were unable to connect you to Class Solver.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Please contact your school's network administrator to ensure Class Solver is not blocked by your school's Proxy or Firewall.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),o,(0,pr.jsx)("br",{})]})):"unauthorized"===e.message?(i="Unauthorized User",s=(0,pr.jsxs)("span",{children:["Your session may have expired or there is no account registered with the email address provided:",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),(0,pr.jsx)($k,{text:t.email}),(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Please check that the email address is correct and try it again.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If you are using \u201cLog in with Google\u201d, please ensure you are logged in with the Google account registered with Class Solver.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"If you are a teacher, you might not have a registered account, please contact your school administrator.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),o,(0,pr.jsx)("br",{})]})):(i="Something went wrong ...",s=(0,pr.jsxs)("span",{children:["Sorry, we have encountered an issue logging you into Class Solver.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Please completely close your browser window and try again.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),o,(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),(0,pr.jsx)($k,{text:e.message})]})),(0,pr.jsx)(Qf,{isOpen:!0,toggle:r,onButtonClick:r,buttonText:"Back to Login",showCancel:!1,heading:i,text:s})},NK=({children:e,restricted:t})=>{const{isAuthenticated:n,authenticationError:r}=nu();return r?(0,pr.jsx)(oK,{authenticationError:r}):n&&t?(0,pr.jsx)(Ml,{to:"/",replace:!0}):e},EK=({children:e,locked:t})=>{const{isAuthenticated:n,authenticationError:r,user:o}=nu();return r?(0,pr.jsx)(oK,{authenticationError:r}):n?(0,pr.jsx)(TK,{user:o,locked:t,children:e}):(0,pr.jsx)(Ml,{to:"/Login",replace:!0})},TK=({children:e,locked:t,user:n})=>{const r=function(e){fl()||Ms(!1);let{pathname:t}=ml();return o.useMemo((()=>na(e,t)),[t,e])}("/UserProfile"),{data:i,loading:s,error:a}=Gm(O,{fetchPolicy:"network-only"}),{data:l,loading:c}=Gm(Ge,{variables:{schoolId:uw()},fetchPolicy:"network-only",skip:s}),{data:u,loading:d}=Gm(Fe,{variables:{schoolId:uw()},fetchPolicy:"network-only",skip:s||!uw()});if(s||c||d)return null;if(a)return(0,pr.jsx)(kK,{error:a,user:n});const h=i.myprofile,p=(void 0===t||t)&&l&&!0===l.schoolSettings.newAccountLock,f=pw(h.schoolInvitations),m=null===h.firstName||null===h.lastName,g=1===h.schools.length?h.schools[0]:h.schools.find((e=>e.id===uw()));return!r&&g&&g.requireMfa&&!n["https://classsolver.com/mfa"]?(0,pr.jsx)(Ml,{to:"/RequireMfa"}):dS(h)?m?(0,pr.jsx)(Ml,{to:"/UpdateUserDetails"}):f?(0,pr.jsx)(Ml,{to:"/AcceptInvitation"}):p?(0,pr.jsx)(Ml,{to:"/",replace:!0}):(0,pr.jsx)(jw,{school:null===u||void 0===u?void 0:u.school,children:e}):(0,pr.jsx)(Ml,{to:"/Consent"})},OK=[{path:"/AcceptInvitation",component:()=>{const{data:e,loading:t}=Gm(O,{fetchPolicy:"network-only"}),n=vl(),[r]=Km(mt,{onCompleted:()=>n("/")}),[o]=Km(gt,{onCompleted:()=>n("/")});if(t)return(0,pr.jsx)(qk,{});const i=e.myprofile.schoolInvitations[0];if(!i)return(0,pr.jsx)(Ml,{to:"/"});return(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:"Accept Your Invitation",className:"mb-4"}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("b",{children:i.inviterFullName})," has invited you to the following Class Solver account:"]}),(0,pr.jsx)("div",{className:"u-bold py-4",children:i.school.name}),(0,pr.jsx)("div",{className:"align-self-start pb-4",children:"Would you like to continue?"}),(0,pr.jsx)(ld,{color:"primary",className:"w-50",onClick:()=>{r({variables:{inviteId:i.id}})},children:"Yes, Accept"}),(0,pr.jsx)(ld,{color:"link",className:"w-50",onClick:()=>{o({variables:{inviteId:i.id}})},children:"Decline"})]})]})})}},{path:"/Consent",component:()=>{const[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1),{data:a,loading:l}=Gm(O,{fetchPolicy:"network-only"}),c=vl(),[u]=Km(He,{onCompleted:()=>c("/"),onError:()=>c("/")});if(l)return(0,pr.jsx)(qk,{});const d=e&&i;return dS(a.myprofile)?(0,pr.jsx)(Ml,{to:"/"}):(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:"Terms and Conditions",className:"mb-4",toggle:()=>c("/Logout")}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center",style:{gap:"1rem"},children:[(0,pr.jsxs)("div",{children:["Please accept the user terms to continue, or if you have any questions, contact",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1",children:(0,pr.jsx)("u",{children:"support@classsolver.com"})}),"."]}),(0,pr.jsxs)(Gg,{check:!0,children:[(0,pr.jsxs)(Qg,{htmlFor:"acceptTerms",children:[(0,pr.jsx)(Zg,{type:"checkbox",name:"acceptTerms",id:"acceptTerms",checked:e,onChange:()=>t(!e)}),"I have read and accept the"," ",(0,pr.jsx)("a",{href:fS,target:"_blank",rel:"noopener noreferrer",children:"Customer Terms"}),", and I am authorized to accept the Customer Terms on behalf of my school or institution."]}),(0,pr.jsxs)(Qg,{htmlFor:"acceptPrivacy",children:[(0,pr.jsx)(Zg,{type:"checkbox",name:"acceptPrivacy",id:"acceptPrivacy",checked:i,onChange:()=>s(!i)}),"I understand that my information will be used and processed as detailed in the"," ",(0,pr.jsx)("a",{href:mS,target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),"."]}),(0,pr.jsxs)(Qg,{htmlFor:"acceptUpdatesAndMarketing",children:[(0,pr.jsx)(Zg,{type:"checkbox",name:"acceptUpdatesAndMarketing",id:"acceptUpdatesAndMarketing",checked:n,onChange:()=>r(!n)}),"I opt-in to receiving important product updates and the occasional marketing related email (note: you can always elect to opt out later)."]})]}),(0,pr.jsx)(ld,{color:"primary",className:"w-50",disabled:!d,onClick:()=>{if(d){const e=Qh()().utc().toISOString(),t={self:{id:a.myprofile.id,acceptedCustomerTermsAt:e,acceptedPrivacyPolicyAt:e,acceptedUpdatesAndMarketing:n?e:null}};u({variables:t})}},children:"Continue"})]})]})})}},{path:"/Login",restricted:!0,component:iK},{path:"/Logout",component:sK},{path:"/RequireMfa",component:()=>{const e=vl();return(0,pr.jsx)(Yf,{isOpen:!0,className:"modal-dialog-centered u-modal__w-30rem",children:(0,pr.jsxs)("div",{className:"p-4",children:[(0,pr.jsx)(Kk,{title:"Account requires MFA",className:"mb-4"}),(0,pr.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,pr.jsxs)("div",{className:"mb-4",children:["The account you are trying to access requires MFA and you currently do not have MFA turned on. ",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Please go to your profile page and turn on MFA to access this account."]}),(0,pr.jsx)(ld,{color:"primary",className:"w-50",onClick:()=>{e("/UserProfile")},children:"Go to Profile Page"}),(0,pr.jsx)(ld,{color:"link",className:"w-50",onClick:()=>{dw(),e("/")},children:"Cancel"})]})]})})}},{path:"/SharedSolution/:token",component:yK},{path:"/SharedSolution/:token/:subPath",component:yK},{path:"/Signup",restricted:!0,component:()=>{const[e]=Km(k),[t]=Km(E),n=vl();return(0,pr.jsx)(xK,{signupMutation:e,updateEmail:t,navigate:n})}},{path:"/Signup/Success",restricted:!0,component:()=>{const{data:{email:{email:e}}}=Gm(N);return(0,pr.jsxs)("div",{className:"c-email-success",children:[(0,pr.jsx)(tc,{to:"/",children:(0,pr.jsx)("img",{src:xN,alt:"Class Solver Logo",style:jK,className:"ml-5 mt-5"})}),(0,pr.jsxs)("div",{className:"c-email-success__container",children:[(0,pr.jsx)("div",{className:"c-email-success__icon-container",children:(0,pr.jsx)("i",{className:"fa fa-envelope"})}),(0,pr.jsx)("h1",{className:"mt-3",children:"Thank you for signing up!"}),(0,pr.jsx)("h2",{className:"mt-5",children:"We've sent an email to confirm your account."}),(0,pr.jsx)("div",{className:"c-email-success__email-container mt-3",children:(0,pr.jsx)("span",{children:e})}),(0,pr.jsxs)("div",{className:"c-email-success__highlighted-fine-print mt-3",children:[(0,pr.jsx)("h5",{children:"Don't see a message in your inbox?"}),(0,pr.jsxs)("ul",{children:[(0,pr.jsx)("li",{children:"Check your email is correct"}),(0,pr.jsxs)("li",{children:["Check your ",(0,pr.jsx)("b",{children:"junk"})," or ",(0,pr.jsx)("b",{children:"spam"})," folder"]}),(0,pr.jsxs)("li",{children:["Contact your IT to whitelist"," ",(0,pr.jsx)("a",{href:"https://classsolver.com",target:"_blank",rel:"noopener noreferrer",children:"classsolver.com"})]})]}),(0,pr.jsxs)("h5",{children:["Need help?",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-grey-mid-light",children:(0,pr.jsx)("u",{children:"support@classsolver.com"})})]})]})]})]})}},{path:"/Surveys/:token",component:()=>{const e={[lK]:{message:"To access your Survey, please click below to get a new link sent to your email.",info:{title:"Why do I need a new link to access the Survey?",body:"For your security, the links can only be opened a certain number of times within a set period of time. However, you can easily send yourself a new link by clicking \u201cSend email with new link\u201d. You will not lose any information."}},[aK]:{message:"Thank you! This survey has been closed. Please contact your school administrator if you would like it re-opened.",promoBanner:{title:"Help make a difference at another school and you both save $100",message:"Do you know someone at another school who could benefit from Class Solver? Or would you like to learn more about how Class Solver helps schools create their best lists in a fraction of the time?",button:{link:"https://classsolver.com/watch-demo/",title:"Watch Now"}}},[cK]:{message:"This link is invalid or incomplete. Please double check that you have copied the entire link and try again."}},[t,n,r,o]=vK({tokenType:"SURVEY",loginMutation:P,mutationName:"loginWithSurveyToken",errorMessages:e});return t?(o&&o.user&&sessionStorage.setItem(Jt,o.user.id),(0,pr.jsx)(MJ,{teacherId:sessionStorage.getItem(Jt)})):(0,pr.jsx)(n,{...r})}},{path:"/Unauthorized",component:()=>{const e=vl(),t=()=>e("/Logout"),n=(0,pr.jsxs)("div",{children:["Sorry, your email address is not set up to access Class Solver.",(0,pr.jsx)("br",{}),(0,pr.jsx)("br",{}),"Please contact",(0,pr.jsx)("a",{href:"mailto:support@classsolver.com",className:"ml-1 color-blue-mid",children:"support@classsolver.com"})," if you need any assistance."]});return(0,pr.jsx)(Qf,{isOpen:!0,toggle:t,onButtonClick:t,buttonText:"Dismiss",showCancel:!1,heading:"Something went wrong ...",text:n})}},{path:"/UpdateUserDetails",component:()=>{const{data:e,loading:t}=Gm(O,{fetchPolicy:"network-only"}),n=[{query:O}],r=vl();if(t)return(0,pr.jsx)(qk,{});return(0,pr.jsx)(SK,{toggle:()=>{r("/")},refetchQueries:n,user:e.myprofile,modalClass:"modal-dialog-centered",title:"Update Your Profile",showDelete:!1,allowEditEmail:!1,cancelToggle:()=>{r("/logout")}})}},{path:"/version",locked:!1,component:()=>(0,pr.jsx)("pre",{children:JSON.stringify({version:"0.1.0-8051ae4"})})},{path:"/UnavailableSurvey",locked:!1,component:()=>(0,pr.jsxs)("div",{className:"c-survey-login-error",children:[(0,pr.jsx)("img",{src:xN,alt:"Class Solver Logo",style:tK,className:"ml-5 mt-5"}),(0,pr.jsx)("div",{className:"c-survey-login-error__container",children:(0,pr.jsx)("div",{className:"h4 pb-2 w-75 text-center",children:"Sorry, this survey does not exist. Please resend the teacher a survey on the Teacher page if you require a new one."})})]})}].map((e=>{const t=e.component;return{path:e.path,element:(0,pr.jsx)(NK,{restricted:e.restricted,children:(0,pr.jsx)(t,{})}),errorElement:(0,pr.jsx)(SN,{})}})),IK=[{path:"/",locked:!1,component:()=>{const{data:e,loading:t}=Gm(Ze),{data:n,loading:r}=Gm(O),{data:o,loading:i,error:s}=Gm(Mw,{variables:{adminOnly:e.settings.adminOnlyRequests,schoolId:uw()},skip:!uw(),fetchPolicy:"network-only"});return aw(s),t||r||i?(0,pr.jsx)(qk,{}):(0,pr.jsx)(WD,{myprofile:null===n||void 0===n?void 0:n.myprofile,settings:null===e||void 0===e?void 0:e.settings,dashboard:null===o||void 0===o?void 0:o.dashboard})}},{path:"/AccountSettings",locked:!1,component:cT},{path:"/BillingSettings",locked:!1,component:()=>(0,pr.jsxs)("div",{className:"container u-mw-750 o-component",children:[(0,pr.jsx)(kw,{isSuper:!1}),(0,pr.jsx)("div",{className:"py-5 u-content-border-bottom",children:(0,pr.jsx)(dT,{})}),(0,pr.jsx)("div",{className:"my-5",children:(0,pr.jsx)(hT,{heading:"Please help us spread the word",message:"If you refer another school, they receive a $100 discount this year and a $100 credit will be applied to your school for next year."})})]})},{path:"/Characteristics",locked:!1,component:$D},{path:"/Classes",component:HD},{path:"/UserProfile",locked:!1,component:()=>{const{data:e,loading:t}=Gm(O,{fetchPolicy:"network-only"}),n=[{query:O}];return t?(0,pr.jsx)(qk,{}):(0,pr.jsxs)("div",{className:"container u-mw-750 o-component",children:[(0,pr.jsx)(wK,{userProfile:e.myprofile,refetchQueries:n}),(0,pr.jsx)("div",{className:"pt-5",children:(0,pr.jsx)(CK,{userProfile:e.myprofile,refetchQueries:n})}),(0,pr.jsx)("div",{className:"pt-5 u-content-border-bottom",children:(0,pr.jsx)(_K,{userProfile:e.myprofile,refetchQueries:n})})]})}},{path:"/Requests",component:s$},{path:"/AccountSettings/TransferStudentRequests",locked:!1,component:()=>{const e=vl(),[t,{loading:n}]=Km(_t,{variables:{schoolId:uw()}});return(0,pr.jsx)(JE,{title:"Transfer Student Requests",buttonExportText:"Export Student Requests",buttonImportText:"Import Student Requests",exportType:"student_requests",genericErrorMessage:"We\u2019re sorry, but something went wrong with your student requests upload.",importRequestsFileMutation:t,loading:n,navigate:e})}},{path:"/Requests/TeacherRequests/Transfer",locked:!1,component:()=>{const e=vl(),[t,{loading:n}]=Km(jt,{variables:{schoolId:uw()}});return(0,pr.jsx)(JE,{title:"Transfer Teacher Requests",buttonExportText:"Export Teacher Requests",buttonImportText:"Import Teacher Requests",exportType:"teacher_requests",genericErrorMessage:"We\u2019re sorry, but something went wrong with your teacher requests upload.",importRequestsFileMutation:t,loading:n,navigate:e})}},{path:"/Solver",component:JQ},{path:"/AccountSettings/ImportClassLists",component:()=>{const[e,t]=o.useState(void 0),[n,{loading:r}]=pE(),i=vl(),s=e=>{t(e.target.files[0])},[a,l]=o.useState(),[c,u,d]=a&&a.graphQLErrors.length>0?[a.graphQLErrors[0].message,a.graphQLErrors[0].details,a.graphQLErrors[0].job_id]:[void 0,void 0,void 0],h=o.useCallback((()=>n({variables:{file:e,schoolId:sessionStorage.getItem(Ht),type:"UPLOAD_SOLUTION"}}).then((e=>{if(e.data&&e.data.createBulkUploadJob){const t=e.data.createBulkUploadJob.id;i("/Solver/MapColumns",{state:{jobId:t}})}})).catch((e=>{l(e)}))),[n,e,i]),p=()=>i(-1);return void 0===e?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"row m-4",children:(0,pr.jsx)("h1",{className:"mx-4",children:"Import Class Lists"})}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"1. Download and complete the class list template"}),(0,pr.jsx)("p",{className:"py-2 text-center",children:(0,pr.jsx)("a",{href:$E,download:"class_list_template.csv",children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary",children:"Download Template"})})}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"2. Then upload the completed file"}),(0,pr.jsx)("input",{type:"file",id:"studentNotesCSV",name:"studentNotesCSV",onChange:s,hidden:!0}),(0,pr.jsx)("p",{className:"py-2 mb-0 text-center",children:(0,pr.jsx)("a",{href:"#",children:(0,pr.jsx)(Qg,{htmlFor:"studentNotesCSV",className:"btn-200-width btn-secondary",children:"Upload Completed File"})})}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Settings Page"})]})})})})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"row m-4",children:(0,pr.jsx)("h1",{className:"mx-4",children:"Import Class Lists"})}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-75 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:e.name}),(0,pr.jsx)("button",{onClick:h,disabled:r,className:"btn btn-primary m-2",children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",onChange:s,hidden:!0}),(0,pr.jsx)("label",{htmlFor:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Settings Page"}),(0,pr.jsxs)("div",{className:"c-note d-flex flex-column mx-auto my-3",children:[(0,pr.jsxs)("div",{className:"my-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("b",{children:"Important Tips"})]}),(0,pr.jsx)("ul",{children:(0,pr.jsx)("li",{children:"Ensure that the imported file includes the following column headings: Student ID and Student Notes"})}),(0,pr.jsx)("p",{className:"pb-0 mb-0 text-uppercase font-weight-bold",children:"Warning"}),(0,pr.jsx)("p",{children:"If student notes already exist in Class Solver for a student listed in your file, this function will over-write the existing student notes for this student. Any existing student notes will not be affected if the Student ID does not appear in your file."}),(0,pr.jsx)("p",{children:"If you are using a Mac, please save the file format as CSV UTF-8 (.csv)"})]}),a&&(0,pr.jsx)(Jj,{isOpen:!0,title:bC[c].title,type:"Student Notes",jobId:d,toggle:()=>l(void 0),actions:bC[c].actions(),children:bC[c].body("Student Notes",u)})]})]})})})})]})}},{path:"/Solver/MapColumns",component:()=>{const e=vl(),{state:t}=ml(),{fetch:[n,{error:r}],update:[i,{loading:s}],cancel:[a],import:[l,{loading:c}]}=bE(t.jobId),u=o.useCallback((()=>a().then((()=>{e(-2)}))),[a,e]);return r?(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Solution",jobId:t.jobId,toggle:u,actions:[{color:"warning",onClick:u,text:"Ok"}],children:qE.body(r)}):n?(0,pr.jsx)(VE,{navigate:e,uploadJob:n,isUpdatingJob:s,isImportingJob:c,updateBulkUploadJob:i,importBulkUploadJob:l,handleCancel:u}):(0,pr.jsx)(qk,{})}},{path:"/Teachers",locked:!1,component:rK},{path:"/Teachers/MapColumns",locked:!1,component:()=>{const e=vl(),{state:t}=ml(),{fetch:[n,{error:r}],update:[i,{loading:s}],cancel:[a]}=bE(t.jobId),l=o.useCallback((()=>a().then((()=>{e("/Teachers")}))),[a,e]);return r?(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Teachers",jobId:t.jobId,toggle:l,actions:[{color:"warning",onClick:l,text:"Ok"}],children:nT(r)}):n?(0,pr.jsx)(rT,{navigate:e,uploadJob:n,updateBulkUploadJob:i,isUpdatingJob:s,cancelUploadJob:a}):(0,pr.jsx)(qk,{})}},{path:"/Teachers/MapClassLabels",locked:!1,component:()=>{const e=vl(),{state:t}=ml(),[n,r]=o.useState(!1),[i,s]=o.useState(),{fetch:[a],cancel:[l],update:[c,{loading:u}],import:[d,{loading:h}]}=bE(t.jobId),p=o.useMemo((()=>a&&a.fileSummary?WS(a.fileSummary.currentClassesInSchool):[]),[a]),f=o.useMemo((()=>a&&a.fileSummary?WS(a.fileSummary.sourceClassLabels.filter((({label:e})=>""!==e))):[]),[a]),[m,g]=o.useState((()=>f.reduce(((e,t)=>{const n={...e};return n[t.label]=!1,n}),{}))),v=Object.fromEntries(f.flatMap((({label:e})=>{const t=p.find((({label:t})=>{return n=e,t.toLowerCase().replaceAll(/[-_\s]/gi,"")===n.toLowerCase().replaceAll(/[-_\s]/gi,"");var n}));return t?[[e,t.label]]:[]}))),[y,b]=o.useState(v),x=o.useMemo((()=>f.every((({label:e})=>m[e]||y[e]&&"empty"!==y[e]))),[y,f,m]),w=o.useCallback((()=>{r((e=>!e))}),[]);o.useEffect((()=>{let e=!0;for(const t of Object.values(f))void 0!==y[t.label]&&"empty"!==y[t.label]||(e=e&&!1)}),[y,f]);const S=o.useCallback((()=>e("/Teachers/MapColumns",{state:{jobId:t.jobId}})),[e,t]),C=o.useCallback((()=>{const t=JSON.stringify({class_map:y,classes_to_ignore:m});return c({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&d().then((()=>{e("/Teachers")})).catch((e=>{s(e.graphQLErrors[0])}))}))}),[y,c,e,d,m]),j=o.useCallback((()=>l().then((()=>{e("/Teachers")}))),[l,e]),_=o.useCallback(((e,t)=>{b((n=>({...n,[e]:t})))}),[]);return 0===f.length&&C(),(0,pr.jsxs)("div",{className:"container mt-5 pt-5 w-lg-75",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Match Your Teachers' Current Class Labels"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:w,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:n,toggle:w,jobId:a&&a.id,onSentNotification:w,type:"Teacher"})]}),(0,pr.jsx)("div",{className:"pt-3 pb-4",children:"The following class labels were found in your Teachers file. Please match these to the class labels in Class Solver that were generated based on the Student file previously imported."}),(0,pr.jsx)("div",{className:"pt-3 pb-4",children:"Note: If a teacher\u2019s current class was not imported on the Students page, please tick \u2018Ignore\u2019 for this class label (e.g. non-homeroom teachers)"}),(0,pr.jsxs)("div",{className:"container",children:[(0,pr.jsxs)("div",{className:"row pb-2 mb-4 u-content-border-bottom",children:[(0,pr.jsx)("div",{className:"col-6 font-weight-bold",children:"Class labels found in your Teachers file"}),(0,pr.jsx)("div",{className:"col-4 justify-between font-weight-bold",children:"Class labels in Class Solver"}),(0,pr.jsx)("div",{className:"col-1 pl-5 font-weight-bold",children:"Ignore"})]}),f.map((e=>{const t=y[e.label],n=!!m[e.label];return(0,pr.jsxs)("div",{className:"row mt-3",children:[(0,pr.jsxs)("div",{className:"col-6 pt-1 d-flex",children:[(0,pr.jsx)("div",{className:"w-75 pr-4",children:(0,pr.jsx)("div",{className:"text-center mb-1 c-grade-label-mapping__gradeLabel",children:e.label})}),(0,pr.jsx)("div",{className:"w-25 text-center",children:(0,pr.jsx)("em",{children:"match to"})})]}),(0,pr.jsx)("div",{className:"col-4",children:(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsxs)(Zg,{type:"select",value:t,disabled:n,onChange:t=>{_(e.label,t.target.value)},children:[(0,pr.jsx)("option",{value:"empty",children:"Select"}),p.map((e=>(0,pr.jsx)("option",{value:e.label,children:e.label},e.label)))]}),(0,pr.jsx)("div",{className:"pl-3 pr-5 text-success-or-danger",children:t&&"empty"!==t?(0,pr.jsx)("i",{className:"fa fa-check text-success "+(n?"invisible":"")}):(0,pr.jsx)("i",{className:"fa fa-warning text-danger "+(n?"invisible":"")})})]})}),(0,pr.jsx)("div",{className:"mx-4 pl-5 col-1",style:{display:"flex",justifyContent:"middle",alignItems:"middle"},children:(0,pr.jsx)(Zg,{type:"checkbox",checked:m[e.label],onChange:()=>{const t=m[e.label];g({...m,[e.label]:!t})}})})]})}))]}),(0,pr.jsx)("div",{className:"u-content-border-bottom",children:"\xa0"}),(0,pr.jsxs)("div",{className:"mt-3 d-flex align-items-center",children:[(0,pr.jsxs)("span",{className:"text-primary mr-a cursor-pointer",onClick:S,children:[(0,pr.jsx)("i",{className:"fa fa-chevron-left mr-2"})," Back to Mapping Columns"]}),(0,pr.jsx)(Ef,{buttonText:"Import Now",cancelText:"Cancel Import",className:"p-3",disabled:u||h||!x,onButtonClick:C,onCancelClick:j})]}),i&&(0,pr.jsx)(Jj,{isOpen:!0,title:(iT[i.message]||oT).title,type:"Teachers",jobId:a&&a.id,toggle:()=>s(),actions:[{color:"link",onClick:j,text:"Cancel"}],children:(iT[i.message]||oT).body(i)})]})}},{path:"/Teachers/Upload",locked:!1,component:aT},{path:"/Students",locked:!1,component:kJ},{path:"/Students/Characteristics/MapColumns",locked:!1,component:()=>{const[e,{loading:t}]=(()=>{const e=sessionStorage.getItem(Ht),[t,n]=Yw(Dw,{variables:{schoolId:e}});return(0,o.useEffect)((()=>{e&&!n.called&&t()}),[t,e,n.called]),[n.data&&n.data.schoolCharacteristics,n]})(),n=vl(),{state:r}=ml(),{fetch:[i,{error:s}],update:[a,{loading:l}],cancel:[c]}=bE(r.jobId),u=o.useCallback((()=>c().then((()=>{n("/Students")}))),[c,n]);return s?(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Student Characteristics",jobId:r.jobId,toggle:u,actions:[{color:"warning",onClick:u,text:"Ok"}],children:ME(s)}):i?(0,pr.jsx)(PE,{characteristics:e,isCharacteristicsLoading:t,navigate:n,uploadJob:i,updateBulkUploadJob:a,isUpdatingJob:l,cancelUploadJob:c}):(0,pr.jsx)(qk,{})}},{path:"/Students/Characteristics/MapResponseLabels",locked:!1,component:()=>{const e=vl(),{state:t}=ml(),[n,r]=o.useState(!1),[i,s]=o.useState(),[a,l]=o.useState(!1),{fetch:[c],cancel:[u],update:[d,{loading:h}],import:[p,{loading:f}]}=bE(t.jobId),m=o.useMemo((()=>c&&c.fileSummary?c.fileSummary.subjectCharacteristic.name:""),[c]),g=o.useMemo((()=>c&&c.fileSummary?c.fileSummary.subjectCharacteristic.characteristicResponses.map((e=>({id:e.id,label:e.label}))).concat([{id:"NEW",label:"Add As New"}]).concat([{id:"IGNORED",label:"Do Not Import"}]):[]),[c]),v=o.useMemo((()=>c&&c.fileSummary?c.fileSummary.sourceResponseLabels.filter((({label:e})=>""!==e)):[]),[c]),y=Object.fromEntries(v.flatMap((({label:e})=>{const t=g.find((({label:t})=>((e,t)=>{const n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith("no")&&r.startsWith("no")})(t,e)));return t?[[e,t.id]]:[]}))),[b,x]=o.useState(y),w=o.useMemo((()=>Object.keys(b).length>=v.length),[b,v]),S=o.useCallback((()=>{r((e=>!e))}),[]);o.useEffect((()=>{let e=!0;for(const t of Object.values(v))void 0!==b[t.label]&&"empty"!==b[t.label]||(e=e&&!1);l(e)}),[b,v]);const C=o.useCallback((()=>e("/Students/Characteristics/MapColumns",{state:{jobId:t.jobId}})),[e,t]),j=o.useCallback((()=>{const t=JSON.stringify({response_map:b});return d({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&p().then((()=>{e("/Students")})).catch((e=>{s(e.graphQLErrors[0])}))}))}),[b,d,e,p]),_=o.useCallback((()=>u().then((()=>{e("/Students")}))),[u,e]),k=o.useCallback((()=>{const t=JSON.stringify({response_map:b,ignore_student_code_errors:!0});return d({meta:t,overwriteMeta:!1}).then((t=>{t.data&&t.data.updateBulkUploadJob&&p().then((()=>{e("/Students")})).catch((e=>{s(e.graphQLErrors[0])}))}))}),[b,d,e,p]),N=o.useCallback(((e,t)=>{x((n=>({...n,[e]:t})))}),[]);return(0,pr.jsxs)("div",{className:"container mt-5 pt-5 w-lg-75",children:[(0,pr.jsxs)("div",{className:"mt-5 d-flex flex-row align-items-center",children:[(0,pr.jsx)("h1",{className:"mb-0",children:"Match Your Characteristic Response Labels"}),(0,pr.jsx)(ld,{className:"u-font-weight-medium",color:"link",onClick:S,children:"Need Help Importing?"}),(0,pr.jsx)(Kj,{isOpen:n,toggle:S,jobId:c&&c.id,onSentNotification:S,type:"StudentCharacteristics"})]}),(0,pr.jsx)("div",{className:"pt-3 pb-4",children:"The following Response Labels were found in your file. Please match these to the labels you have setup in Class Solver."}),(0,pr.jsxs)("div",{className:"container",children:[(0,pr.jsxs)("div",{className:"row pb-2 mb-4 u-content-border-bottom",children:[(0,pr.jsx)("div",{className:"col-6 font-weight-bold",children:"Response Labels in your file"}),(0,pr.jsxs)("div",{className:"col-6 justify-between font-weight-bold",children:["Response Labels for ",m.toUpperCase(),(0,pr.jsx)(ld,{className:"u-font-weight-medium p-0",color:"link",disabled:a,onClick:()=>{const e={...b};for(const t of v){const n=t.label;void 0!==b[n]&&"empty"!==b[n]||(e[n]="NEW")}x(e)},children:"Add All Unmatched As New"})]})]}),v.map(((e,t)=>(0,pr.jsxs)("div",{className:"row mt-3",children:[(0,pr.jsxs)("div",{className:"col-6 pt-1 d-flex",children:[(0,pr.jsxs)("div",{className:"w-75 pr-4",children:[(0,pr.jsx)("div",{className:"text-center mb-1 c-grade-label-mapping__gradeLabel",children:e.label}),(0,pr.jsxs)("div",{className:"text-center align-center font-italic color-grey-default c-grade-label-mapping__records",children:[e.studentCount," records"]})]}),(0,pr.jsx)("div",{className:"w-25 text-center",children:(0,pr.jsx)("em",{children:"match to"})})]}),(0,pr.jsx)("div",{className:"col-6",children:(0,pr.jsxs)("div",{className:"d-flex",children:[(0,pr.jsxs)(Zg,{type:"select",value:b[e.label],onChange:t=>{N(e.label,t.target.value)},children:[(0,pr.jsx)("option",{value:"empty",children:"Select"}),g.map((e=>(0,pr.jsx)("option",{value:e.id,children:e.label},e.id)))]}),(0,pr.jsx)("div",{className:"pl-3 text-success-or-danger",children:b[e.label]&&"empty"!==b[e.label]?(0,pr.jsx)("i",{className:"fa fa-check text-success"}):(0,pr.jsx)("i",{className:"fa fa-warning text-danger"})})]})})]},t)))]}),(0,pr.jsx)("div",{className:"u-content-border-bottom",children:"\xa0"}),(0,pr.jsxs)("div",{className:"mt-3 d-flex align-items-center",children:[(0,pr.jsxs)("span",{className:"text-primary mr-a cursor-pointer",onClick:C,children:[(0,pr.jsx)("i",{className:"fa fa-chevron-left mr-2"})," Back to Mapping Columns"]}),(0,pr.jsx)(Ef,{buttonText:"Import Now",cancelText:"Cancel Import",className:"p-3",disabled:h||f||!w,onButtonClick:j,onCancelClick:_})]}),i&&(0,pr.jsx)(Jj,{isOpen:!0,title:"Student IDs Not Found",type:"Student Characteristics",jobId:c&&c.id,toggle:()=>s(),actions:[{color:"link",onClick:_,text:"Cancel"},{color:"primary",onClick:k,text:"Import"}],children:(FE[i.message]||DE).body(i)})]})}},{path:"/Students/Characteristics/Upload",locked:!1,component:()=>{const[e,t]=o.useState(void 0),[n,{loading:r}]=pE(),i=vl(),s=e=>{t(e.target.files[0])},[a,l]=o.useState(),[c,u,d]=a&&a.graphQLErrors.length>0?[a.graphQLErrors[0].message,a.graphQLErrors[0].details,a.graphQLErrors[0].job_id]:[void 0,void 0,void 0],h=o.useCallback((()=>n({variables:{file:e,schoolId:sessionStorage.getItem(Ht),type:"STUDENT_CHARACTERISTIC"}}).then((e=>{if(e.data&&e.data.createBulkUploadJob){const t=e.data.createBulkUploadJob.id;i("/Students/Characteristics/MapColumns",{state:{jobId:t}})}})).catch((e=>{l(e)}))),[n,e,i]),p=()=>i("/Students");return void 0===e?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Characteristics"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/kb-sc/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"1. Download and complete the characteristic template"}),(0,pr.jsx)("p",{className:"py-2 text-center",children:(0,pr.jsx)("a",{href:fE,download:"student_characteristics_template.csv",children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary",children:"Download Template"})})}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"2. Then upload the completed file"}),(0,pr.jsx)("input",{type:"file",id:"characteristicCSV",name:"characteristicCSV",onChange:s,hidden:!0}),(0,pr.jsx)("p",{className:"py-2 mb-0 text-center",children:(0,pr.jsx)("a",{href:"#",children:(0,pr.jsx)(Qg,{htmlFor:"characteristicCSV",className:"btn-200-width btn-secondary",children:"Upload Completed File"})})}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Students page"})]})})})})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Characteristics"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/kb-sc/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-75 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:e.name}),(0,pr.jsx)("button",{onClick:h,disabled:r,className:"btn btn-primary m-2",children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",onChange:s,hidden:!0}),(0,pr.jsx)("label",{htmlFor:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Students page"}),(0,pr.jsxs)("div",{className:"c-note d-flex flex-column mx-auto my-3",children:[(0,pr.jsxs)("div",{className:"my-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("b",{children:"Important Tips"})]}),(0,pr.jsxs)("ul",{children:[(0,pr.jsx)("li",{children:"Check you have setup the Characteristic you wish to import in Settings"}),(0,pr.jsx)("li",{children:"Ensure the imported file contains column headings"}),(0,pr.jsx)("li",{children:"Note: You can only import one Characteristic at a time"})]}),(0,pr.jsx)("p",{className:"pb-0 mb-0 text-uppercase font-weight-bold",children:"Warning"}),(0,pr.jsx)("p",{children:"This function will over-write any information already entered against a student for the specified Characteristic. If a Student ID is not included in the file, the data for this student will not be changed."}),(0,pr.jsx)("p",{children:"If you are using a Mac, please save the file format as CSV UTF-8 (.csv)"})]}),a&&(0,pr.jsx)(Jj,{isOpen:!0,title:bC[c].title,type:"Student Characteristics",jobId:d,toggle:()=>l(void 0),actions:bC[c].actions(),children:bC[c].body("Student Characteristics",u)})]})]})})})})]})}},{path:"/Students/FriendshipPreferences/Upload",locked:!1,component:()=>{const e=uw(),{data:t,loading:n}=Gm(bt,{variables:{schoolId:e},fetchPolicy:"network-only",errorPolicy:"all"});if(n)return(0,pr.jsx)(qk,{});const{job:r}=vC(t,"FRIENDSHIP_PREFERENCE");return(0,pr.jsx)(AE,{currentUploadJob:r})}},{path:"/Students/FriendshipPreferences/MapStudents",locked:!1,component:()=>{const e=uw(),{data:t,loading:n}=Gm(bt,{variables:{schoolId:e},fetchPolicy:"network-only",errorPolicy:"all"});if(n)return(0,pr.jsx)(qk,{});const{job:r}=vC(t,"FRIENDSHIP_PREFERENCE");return(0,pr.jsx)(EE,{currentUploadJob:r,schoolId:e})}},{path:"/Students/StudentNotes/MapColumns",locked:!1,component:()=>{const e=vl(),{state:t}=ml(),{fetch:[n,{error:r}],update:[i,{loading:s}],cancel:[a],import:[l,{loading:c}]}=bE(t.jobId),u=o.useCallback((()=>a().then((()=>{e("/Students")}))),[a,e]);return r?(0,pr.jsx)(Jj,{isOpen:!0,title:"Error with uploaded file",type:"Student Notes",jobId:t.jobId,toggle:u,actions:[{color:"warning",onClick:u,text:"Ok"}],children:BE.body(r)}):n?(0,pr.jsx)(GE,{navigate:e,uploadJob:n,isUpdatingJob:s,isImportingJob:c,updateBulkUploadJob:i,importBulkUploadJob:l,handleCancel:u}):(0,pr.jsx)(qk,{})}},{path:"/Students/StudentNotes/Upload",locked:!1,component:()=>{const[e,t]=o.useState(void 0),[n,{loading:r}]=pE(),i=vl(),s=e=>{t(e.target.files[0])},[a,l]=o.useState(),[c,u,d]=a&&a.graphQLErrors.length>0?[a.graphQLErrors[0].message,a.graphQLErrors[0].details,a.graphQLErrors[0].job_id]:[void 0,void 0,void 0],h=o.useCallback((()=>n({variables:{file:e,schoolId:sessionStorage.getItem(Ht),type:"STUDENT_COMMENTS"}}).then((e=>{if(e.data&&e.data.createBulkUploadJob){const t=e.data.createBulkUploadJob.id;i("/Students/StudentNotes/MapColumns",{state:{jobId:t}})}})).catch((e=>{l(e)}))),[n,e,i]),p=()=>i("/Students");return void 0===e?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Student Notes"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/bulk-import-notes/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"1. Download and complete the student notes template"}),(0,pr.jsx)("p",{className:"py-2 text-center",children:(0,pr.jsx)("a",{href:LE,download:"student_notes_template.csv",children:(0,pr.jsx)(ld,{className:"btn-200-width",color:"primary",children:"Download Template"})})}),(0,pr.jsx)("h2",{className:"my-2 text-center",children:"2. Then upload the completed file"}),(0,pr.jsx)("input",{type:"file",id:"studentNotesCSV",name:"studentNotesCSV",onChange:s,hidden:!0}),(0,pr.jsx)("p",{className:"py-2 mb-0 text-center",children:(0,pr.jsx)("a",{href:"#",children:(0,pr.jsx)(Qg,{htmlFor:"studentNotesCSV",className:"btn-200-width btn-secondary",children:"Upload Completed File"})})}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Students page"})]})})})})]}):(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{className:"row m-4",children:[(0,pr.jsx)("h1",{className:"mx-4",children:"Import Student Notes"}),(0,pr.jsxs)("a",{className:"color-blue-mid mx-4 mt-1 font-size-14",href:"https://classsolver.com/bulk-import-notes/",target:"_blank",rel:"noopener noreferrer",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),"Learn more"]})]}),(0,pr.jsx)("div",{className:"c-solver u-row-fix u-layout-component-grow ",children:(0,pr.jsx)("div",{className:"c-solver__classes-container container-fluid ",children:(0,pr.jsx)("div",{className:"container-fluid d-flex justify-content-center align-items-center",children:(0,pr.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center align-self-center u-layout-component-grow",children:[(0,pr.jsx)("img",{height:"150px",src:mk,alt:"Excel Icon"}),(0,pr.jsx)("h2",{className:"m-2",children:"3. You have selected the following file to upload:"}),(0,pr.jsxs)("div",{className:"m-2 row flex-column w-75 align-items-center",children:[(0,pr.jsx)("div",{className:"m-2 u-text-20 u-bold",children:e.name}),(0,pr.jsx)("button",{onClick:h,disabled:r,className:"btn btn-primary m-2",children:"Confirm and Upload"}),(0,pr.jsx)("input",{type:"file",id:"fileUpload",name:"fileUpload",onChange:s,hidden:!0}),(0,pr.jsx)("label",{htmlFor:"fileUpload",className:"btn btn-secondary m-2",children:"Choose Another File"}),(0,pr.jsx)("button",{type:"button",className:"btn btn-link",onClick:p,children:"< Back to Students page"}),(0,pr.jsxs)("div",{className:"c-note d-flex flex-column mx-auto my-3",children:[(0,pr.jsxs)("div",{className:"my-2",children:[(0,pr.jsx)("i",{className:"fa fa-info-circle mr-2"}),(0,pr.jsx)("b",{children:"Important Tips"})]}),(0,pr.jsx)("ul",{children:(0,pr.jsx)("li",{children:"Ensure that the imported file includes the following column headings: Student ID and Student Notes"})}),(0,pr.jsx)("p",{className:"pb-0 mb-0 text-uppercase font-weight-bold",children:"Warning"}),(0,pr.jsx)("p",{children:"If student notes already exist in Class Solver for a student listed in your file, this function will over-write the existing student notes for this student. Any existing student notes will not be affected if the Student ID does not appear in your file."}),(0,pr.jsx)("p",{children:"If you are using a Mac, please save the file format as CSV UTF-8 (.csv)"})]}),a&&(0,pr.jsx)(Jj,{isOpen:!0,title:bC[c].title,type:"Student Notes",jobId:d,toggle:()=>l(void 0),actions:bC[c].actions(),children:bC[c].body("Student Notes",u)})]})]})})})})]})}},{path:"/Students/Upload/Columns",locked:!1,component:eJ},{path:"/Students/Upload/GradeLabels",locked:!1,component:KQ},{path:"/Students/Upload/Grades",locked:!1,component:XQ},{path:"/Students/Upload/IdChangeWarning",locked:!1,component:NJ},{path:"/Students/Upload/Success",locked:!1,component:()=>{const e=vl(),{state:t}=ml(),n=(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("p",{children:"If you used Class Solver last year, information about your students, like Requests, Friendship Preferences, characteristic Responses and Notes, have been automatically added into the program for the students you have imported."}),(0,pr.jsxs)("p",{children:["You can bulk delete this information by clicking on ",(0,pr.jsx)("b",{children:"Remove"})," on the"," ",(0,pr.jsx)("b",{children:"Students"})," tab."]})]});return(0,pr.jsx)(aN,{isOpen:!0,toggle:()=>e(t?t.redirectTo:"/"),heading:"All Done!",buttonText:"OK",text:n})}},{path:"/SummaryReport/Class",component:OF},{path:"/SummaryReport/School",component:RF},{path:"/SummaryReport/Sociogram",component:o$},{path:"/SuperAdmin",locked:!1,component:IJ}].map((e=>{const t=e.component;return{path:e.path,element:(0,pr.jsx)(EK,{locked:e.locked,children:(0,pr.jsxs)("div",{className:"u-layout-page",children:[(0,pr.jsx)(LN,{}),(0,pr.jsx)(t,{})]})}),errorElement:(0,pr.jsx)(SN,{})}})),RK=(AK=[...OK,...IK,{path:"*",element:(0,pr.jsx)(Ml,{to:"/",replace:!0})}],Na({basename:null==MK?void 0:MK.basename,future:Bl({},null==MK?void 0:MK.future,{v7_prependBasename:!0}),history:As({window:null==MK?void 0:MK.window}),hydrationData:(null==MK?void 0:MK.hydrationData)||ql(),routes:AK,mapRouteProperties:Dl,window:null==MK?void 0:MK.window}).initialize());var AK,MK;const PK=()=>(0,pr.jsx)(Kl,{router:RK}),DK=()=>{const e=nu();if(e.loading)return(0,pr.jsx)(qk,{});const t=(e=>{const t=new m.D,n=(0,x.d)({uri:"https://api.classsolver.com/api",fetch:Ts}),r=b((async(t,n)=>{if(e.isAuthenticated){const t=await e.getTokenSilently();return{...n,authToken:t}}return n})),o=b(((e,t)=>({...t,authToken:sessionStorage.getItem(Vt)}))),i=b(((e,t)=>{const{authToken:n,headers:r}=t;return{headers:{...r,authorization:n?`Bearer ${n}`:""}}})),s=g.C.from([window.location.pathname.startsWith("/surveys/")||window.location.pathname.startsWith("/sharedsolution/")?o:r,i,n]),a=new v.R({link:s,cache:t,resolvers:zt});return t.writeQuery({query:S,data:C}),a})(e),n="/signup"===window.location.pathname.toLowerCase();return(0,pr.jsx)(f,{client:t,children:(0,pr.jsxs)("div",{className:"container-fluid",children:[!n&&(0,pr.jsx)(dE,{}),(0,pr.jsx)(PK,{})]})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));const FK=(()=>{const e=Cs()||"us";return{...Ns.production[e],leeway:120}})(),LK=document.getElementById("root");(0,s.H)(LK).render((0,pr.jsx)(ru,{domain:FK.domain,clientId:FK.clientId,audience:FK.audience,leeway:FK.leeway,children:(0,pr.jsx)(DK,{})})),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((e=>{e.unregister()}))})()})();
//# sourceMappingURL=main.859d152e.js.map